diff --git a/Assets/Graphics/Shader Graphs/Subgraphs/MainLight.hlsl b/Assets/Graphics/Shader Graphs/Subgraphs/MainLight.hlsl index cc1f08f..1b7f7c7 100644 --- a/Assets/Graphics/Shader Graphs/Subgraphs/MainLight.hlsl +++ b/Assets/Graphics/Shader Graphs/Subgraphs/MainLight.hlsl @@ -1,13 +1,13 @@ void MainLight_half(float3 WorldPos, out half3 Direction, out half3 Color, out half DistanceAtten, out half ShadowAtten) { - #if SHADERGRAPH_PREVIEW + #if defined(SHADERGRAPH_PREVIEW) Direction = half3(0.5, 0.5, 0); Color = 1; DistanceAtten = 1; ShadowAtten = 1; #else - #if SHADOWS_SCREEN + #if defined(SHADOWS_SCREEN) half4 clipPos = TransformWorldToHClip(WorldPos); half4 shadowCoord = ComputeScreenPos(clipPos); #else @@ -22,7 +22,7 @@ void MainLight_half(float3 WorldPos, out half3 Direction, out half3 Color, out h ShadowAtten = 1.0h; #endif - #if SHADOWS_SCREEN + #if defined(SHADOWS_SCREEN) ShadowAtten = SampleScreenSpaceShadowmap(shadowCoord); #else ShadowSamplingData shadowSamplingData = GetMainLightShadowSamplingData(); @@ -32,4 +32,4 @@ void MainLight_half(float3 WorldPos, out half3 Direction, out half3 Color, out h shadowSamplingData, shadowStrength, false); #endif #endif -} \ No newline at end of file +}