summaryrefslogtreecommitdiffstats
path: root/2ner.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-06-05 19:42:36 -0700
committeryum <yum.food.vr@gmail.com>2025-06-05 19:42:36 -0700
commit8b7ae8db808d76ddea503f94e142c7d37c1b43d3 (patch)
tree9c60f09943b314d47bd5f8df732465831d5a566d /2ner.cginc
parent50b0b6c8b292e966a43fe56c6e0bf0a20c1d5b62 (diff)
more work on fog & c30
Diffstat (limited to '2ner.cginc')
-rw-r--r--2ner.cginc11
1 files changed, 7 insertions, 4 deletions
diff --git a/2ner.cginc b/2ner.cginc
index 820236c..24931cc 100644
--- a/2ner.cginc
+++ b/2ner.cginc
@@ -205,9 +205,8 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace
_Raymarched_Fog_Density_Exponent,
#endif
#if defined(_RAYMARCHED_FOG_HEIGHT_DENSITY)
- _Raymarched_Fog_Height_Density_Min,
- _Raymarched_Fog_Height_Density_Max,
- _Raymarched_Fog_Height_Density_Power,
+ _Raymarched_Fog_Height_Density_Start,
+ _Raymarched_Fog_Height_Density_Half_Life,
#endif
};
FogResult fog_result = raymarched_fog(i, fog_params);
@@ -250,13 +249,16 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace
i.uv01.xy = eye_effect_00.uv;
#endif
-#if defined(_CUSTOM30) && defined(FORWARD_BASE_PASS) || (!defined(_DEPTH_PREPASS) && defined(SHADOW_CASTER_PASS))
+#if defined(_CUSTOM30)
+#if defined(FORWARD_BASE_PASS) || (!defined(_DEPTH_PREPASS) && defined(SHADOW_CASTER_PASS))
#if defined(_CUSTOM30_BASICCUBE)
Custom30Output c30_out = BasicCube(i);
#elif defined(_CUSTOM30_BASICWEDGE)
Custom30Output c30_out = BasicWedge(i);
#elif defined(_CUSTOM30_BASICPLATFORM)
Custom30Output c30_out = BasicPlatform(i);
+#else
+ Custom30Output c30_out = (Custom30Output) 0;
#endif
i.normal = c30_out.normal;
i.worldPos = mul(unity_ObjectToWorld, float4(c30_out.objPos, 1));
@@ -267,6 +269,7 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace
depth = c30_out.depth;
#endif
#endif
+#endif
float3x3 tangentToWorld = float3x3(i.tangent, i.binormal, i.normal);
float ssao = 1;