summaryrefslogtreecommitdiffstats
path: root/pbr.cginc
diff options
context:
space:
mode:
Diffstat (limited to 'pbr.cginc')
-rw-r--r--pbr.cginc9
1 files changed, 7 insertions, 2 deletions
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;