summaryrefslogtreecommitdiffstats
path: root/Editor
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-11-04 17:50:55 -0800
committeryum <yum.food.vr@gmail.com>2024-11-04 17:50:55 -0800
commitc137315f90aa4658f0729bdc73400e1c11be350d (patch)
treefd97c36b38ec40cea76556125bd1ae47dc4e6d11 /Editor
parent88e674850f6eae56ea8cac2d735efad4518f0a14 (diff)
Add toggle to light fog emitter with normals
Diffstat (limited to 'Editor')
-rw-r--r--Editor/tooner.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Editor/tooner.cs b/Editor/tooner.cs
index 6358597..663a3d3 100644
--- a/Editor/tooner.cs
+++ b/Editor/tooner.cs
@@ -2104,6 +2104,16 @@ public class ToonerGUI : ShaderGUI {
if (bc.textureValue) {
EditorGUI.indentLevel += 1;
+ // TODO this is a misnomer, it's actually enabling normal-based
+ // lighting.
+ bc = FindProperty("_Gimmick_Fog_00_Emitter_Variable_Density");
+ enabled = (bc.floatValue != 0.0);
+ EditorGUI.BeginChangeCheck();
+ enabled = Toggle("Enable variable density", enabled);
+ EditorGUI.EndChangeCheck();
+ bc.floatValue = enabled ? 1.0f : 0.0f;
+ SetKeyword("_GIMMICK_FOG_00_EMITTER_VARIABLE_DENSITY", enabled);
+
bc = FindProperty("_Gimmick_Fog_00_Emitter0_Location");
VectorProperty(bc, "Location (world)");
bc = FindProperty("_Gimmick_Fog_00_Emitter0_Normal");