From a13a00f2a28a2ea024dcc93eadd87ecf707f3ab4 Mon Sep 17 00:00:00 2001 From: yum Date: Wed, 4 Jun 2025 13:26:27 -0700 Subject: fix ssao --- fog.cginc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fog.cginc') diff --git a/fog.cginc b/fog.cginc index c71fa97..ed99927 100644 --- a/fog.cginc +++ b/fog.cginc @@ -40,7 +40,7 @@ FogResult raymarched_fog(v2f i, FogParams p) const float ro_epsilon = 1E-3; ro += rd * ro_epsilon; - float2 screen_uv = (i.pos.xy + 0.5) / _ScreenParams.xy; + const float2 screen_uv = (i.pos.xy + 0.5) / _ScreenParams.xy; float zDepthFromMap = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screen_uv); float linearZ = GetLinearZFromZDepth_WorksWithMirrors(zDepthFromMap, screen_uv); @@ -96,10 +96,10 @@ FogResult raymarched_fog(v2f i, FogParams p) } FogResult r; - r.color.rgb = _Raymarched_Fog_Color; + //r.color.rgb = _Raymarched_Fog_Color; //r.color.rgb = saturate(log(linearZ) / 5.0); + r.color.rgb = float3(screen_uv, 0); r.color.a = d; - //r.color.a = 1; r.depth = 0.0001; // Very small depth value to render in front return r; } -- cgit v1.2.3