From 2377ec7548542fc6119fa0296888c70935866f46 Mon Sep 17 00:00:00 2001 From: Xonk Date: Sat, 26 Apr 2025 16:29:09 -0400 Subject: [PATCH] un-kill SSGI and RTAO --- shaders/lib/indirect_lighting_effects.glsl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/shaders/lib/indirect_lighting_effects.glsl b/shaders/lib/indirect_lighting_effects.glsl index 01cfebf..db10be0 100644 --- a/shaders/lib/indirect_lighting_effects.glsl +++ b/shaders/lib/indirect_lighting_effects.glsl @@ -222,9 +222,7 @@ vec3 RT_alternate(vec3 dir, vec3 position, float noise, float stepsizes, bool ha float minZ = spos.z; float maxZ = spos.z; - CURVE = 0.0; - - bool intersected = false; + CURVE = 0.0; for(int i = 0; i < iterations; i++){ if (spos.x < 0.0 || spos.y < 0.0 || spos.z < 0.0 || spos.x > 1.0 || spos.y > 1.0 || spos.z > 1.0) return vec3(1.1); @@ -241,7 +239,7 @@ vec3 RT_alternate(vec3 dir, vec3 position, float noise, float stepsizes, bool ha float biasamount = 0.00005; - minZ = maxZ; + minZ = maxZ-biasamount / currZ; maxZ += stepv.z; spos += stepv; @@ -301,7 +299,7 @@ vec3 ApplySSRT( #endif #else #ifdef OVERWORLD_SHADER - skycontribution = unchangedIndirect;// * (max(rayDir.y,pow(1.0-lightmap,2))*0.95+0.05); + skycontribution = unchangedIndirect * (max(rayDir.y,pow(1.0-lightmap,2))*0.95+0.05); #endif #endif