diff options
| -rw-r--r-- | Editor/tooner.cs | 5 | ||||
| -rw-r--r-- | globals.cginc | 1 | ||||
| -rw-r--r-- | pbr.cginc | 4 | ||||
| -rw-r--r-- | tooner.shader | 1 |
4 files changed, 10 insertions, 1 deletions
diff --git a/Editor/tooner.cs b/Editor/tooner.cs index ccd07c1..23fdafa 100644 --- a/Editor/tooner.cs +++ b/Editor/tooner.cs @@ -1591,6 +1591,11 @@ public class ToonerGUI : ShaderGUI { bc, "Indirect specular multiplier"); + bc = FindProperty("_Indirect_Specular_Lighting_Factor2"); + editor.RangeProperty( + bc, + "Secondary ind. spec. multiplier"); + bc = FindProperty("_Indirect_Diffuse_Lighting_Factor"); editor.RangeProperty( bc, diff --git a/globals.cginc b/globals.cginc index b02507a..26021ec 100644 --- a/globals.cginc +++ b/globals.cginc @@ -17,6 +17,7 @@ float _Lighting_Factor; float _Direct_Lighting_Factor; float _Vertex_Lighting_Factor; float _Indirect_Specular_Lighting_Factor; +float _Indirect_Specular_Lighting_Factor2; float _Indirect_Diffuse_Lighting_Factor; float _Reflection_Probe_Saturation; float _Min_Brightness; @@ -284,7 +284,9 @@ float4 getLitColor( indirect_light.diffuse[2] = sum_brightness * brightness_proportions[1]; direct_light.color[2] *= _Lighting_Factor * _Direct_Lighting_Factor * enable_direct; - indirect_light.specular[2] *= _Lighting_Factor * _Indirect_Specular_Lighting_Factor; + indirect_light.specular[2] *= _Lighting_Factor * + _Indirect_Specular_Lighting_Factor * + _Indirect_Specular_Lighting_Factor2; indirect_light.diffuse[2] *= _Lighting_Factor * _Indirect_Diffuse_Lighting_Factor; // Specular has to be clamped separately to avoid artifacting. diff --git a/tooner.shader b/tooner.shader index 80c1652..f815311 100644 --- a/tooner.shader +++ b/tooner.shader @@ -156,6 +156,7 @@ Shader "yum_food/tooner" _Direct_Lighting_Factor("Direct lighting factor", Range(0, 5)) = 1 _Vertex_Lighting_Factor("Vertex lighting factor", Range(0, 5)) = 1 _Indirect_Specular_Lighting_Factor("Indirect specular lighting factor", Range(0, 5)) = 1 + _Indirect_Specular_Lighting_Factor2("Indirect specular lighting factor", Range(0, 5)) = 1 _Indirect_Diffuse_Lighting_Factor("Indirect diffuse lighting factor", Range(0, 5)) = 1 _Reflection_Probe_Saturation("Reflection probe saturation", Range(0, 1)) = 1 _Min_Brightness("Min brightness", Range(0, 1)) = 0 |
