From 8b7ae8db808d76ddea503f94e142c7d37c1b43d3 Mon Sep 17 00:00:00 2001 From: yum Date: Thu, 5 Jun 2025 19:42:36 -0700 Subject: more work on fog & c30 --- 2ner.cginc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to '2ner.cginc') 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)); @@ -266,6 +268,7 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace #if !defined(_DEPTH_PREPASS) depth = c30_out.depth; #endif +#endif #endif float3x3 tangentToWorld = float3x3(i.tangent, i.binormal, i.normal); -- cgit v1.2.3