From a636bf47daec2b967ec62dba94dd9d94197e1e26 Mon Sep 17 00:00:00 2001 From: King Arthur Date: Sun, 19 May 2019 17:02:20 -0400 Subject: [PATCH] 2.6.14 fix in metallic additive lighting --- _PoiyomiToonShader/Includes/PoiFrag.cginc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_PoiyomiToonShader/Includes/PoiFrag.cginc b/_PoiyomiToonShader/Includes/PoiFrag.cginc index e1d0e12..fd04eda 100644 --- a/_PoiyomiToonShader/Includes/PoiFrag.cginc +++ b/_PoiyomiToonShader/Includes/PoiFrag.cginc @@ -21,7 +21,7 @@ { _light_direction_var = _WorldSpaceLightPos0; } - _flat_lighting_var = clamp(getNewPoiLighting(_light_direction_var, i.normal, _ShadowStrength, attenuation, _AttenuationMultiplier,AOMap), _MinBrightness, _MaxBrightness); + _flat_lighting_var = clamp(getNewPoiLighting(_light_direction_var, i.normal, _ShadowStrength, attenuation, _AttenuationMultiplier, AOMap), _MinBrightness, _MaxBrightness); #else #if defined(POINT) || defined(SPOT) float3 _light_direction_var = normalize(_WorldSpaceLightPos0.xyz - i.worldPos); @@ -230,7 +230,9 @@ #ifdef LIGHTING #if(defined(POINT) || defined(SPOT)) - finalColor *= (1 - _metallic_map_var); + #ifdef METALLIC + finalColor *= (1 - _metallic_map_var); + #endif #ifdef TRANSPARENT finalColor.rgb *= finalColor.a; #endif