Fudge irradiance map lookup to avoid precision issues

This commit is contained in:
clayjohn 2021-10-24 12:02:38 -07:00
parent 4febf69f2a
commit 3f03b60718

View file

@ -1938,7 +1938,7 @@ FRAGMENT_SHADER_CODE
norm = normalize((radiance_inverse_xform * vec4(norm, 0.0)).xyz);
norm.xy /= 1.0 + abs(norm.z);
norm.xy = norm.xy * vec2(0.5, 0.25) + vec2(0.5, 0.25);
if (norm.z > 0.0) {
if (norm.z > 0.0001) {
norm.y = 0.5 - norm.y + 0.5;
}