2026-04-16 오브젝트 그림자
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
Shader "Hidden/BadDog/URP/PreIntegratedFGD_Marschner"
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
Tags{ "RenderPipeline" = "UniversalPipeline" }
|
||||
Pass
|
||||
{
|
||||
ZTest Always Cull Off ZWrite Off
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma editor_sync_compilation
|
||||
|
||||
#pragma vertex Vert
|
||||
#pragma fragment Frag
|
||||
#pragma target 4.5
|
||||
#pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch
|
||||
|
||||
#define PREFER_HALF 0
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/ImageBasedLighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Pre-Integration
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
uint vertexID : SV_VertexID;
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float2 texCoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
Varyings Vert(Attributes input)
|
||||
{
|
||||
Varyings output;
|
||||
|
||||
output.positionCS = GetFullScreenTriangleVertexPosition(input.vertexID);
|
||||
output.texCoord = GetFullScreenTriangleTexCoord(input.vertexID);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
float4 Frag(Varyings input) : SV_Target
|
||||
{
|
||||
// Currently, we do not implement the pre-integration of Marschner for two reason:
|
||||
// 1) Area Light support for anisotropic LTC is not supported, and we fall back to GGX.
|
||||
// 2) Environment lighting is evaluated with the BSDF directly.
|
||||
|
||||
float4 preFGD = 0;
|
||||
|
||||
return float4(preFGD.xyz, 1.0);
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
Fallback Off
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user