Skip to content

Commit 4298508

Browse files
tweak the sun pre-filtering trick
1 parent 90ee195 commit 4298508

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples_tests/22.RaytracedAO/raytraceCommon.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ void Contribution_initMiss(out Contribution contrib)
396396
{
397397
vec2 uv = SampleSphericalMap(-normalizedV);
398398
// funny little trick borrowed from things like Progressive Photon Mapping
399-
const float bias = 0.25*sqrt(pc.cummon.rcpFramesDispatched);
399+
const float bias = 0.0625f*pow(pc.cummon.rcpFramesDispatched,0.08f);
400400
contrib.albedo = contrib.color = textureGrad(envMap, uv, vec2(bias*0.5,0.f), vec2(0.f,bias)).rgb;
401401
contrib.worldspaceNormal = normalizedV;
402402
}

0 commit comments

Comments
 (0)