From 0592c85cd172369625e084be6b037f8c122cbf16 Mon Sep 17 00:00:00 2001 From: yum Date: Thu, 18 Jul 2024 17:13:06 -0700 Subject: Temporarily disable direct lighting in outlines --- pbr.cginc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'pbr.cginc') diff --git a/pbr.cginc b/pbr.cginc index 7c9d8ab..9710ff5 100644 --- a/pbr.cginc +++ b/pbr.cginc @@ -174,7 +174,12 @@ float4 getLitColor( float4 albedo, float3 worldPos, float3 normal, - float metallic, float smoothness, float2 uv, float ao, + float metallic, + float smoothness, + float2 uv, + float ao, + // hack while i figure out view-dependent flickering in outlines + bool enable_direct, v2f i) { float3 specular_tint; @@ -218,7 +223,7 @@ float4 getLitColor( } #endif - direct_light.color *= _Lighting_Factor * _Direct_Lighting_Factor; + direct_light.color *= _Lighting_Factor * _Direct_Lighting_Factor * enable_direct; indirect_light.specular *= _Lighting_Factor * _Indirect_Specular_Lighting_Factor; indirect_light.diffuse *= _Lighting_Factor * _Indirect_Diffuse_Lighting_Factor; -- cgit v1.2.3