From 6d00ea8cce7b61d91702e5661a222205b1264620 Mon Sep 17 00:00:00 2001 From: Andrew Raphael Lukasik Date: Sat, 17 Apr 2021 18:17:48 +0200 Subject: [PATCH] fixes #1 --- Assets/Graphics/Shader Graphs/Subgraphs/MainLight.hlsl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 +}