Skip to content

Commit

Permalink
Merge pull request #54197 from clayjohn/GLES3-irradiance-map
Browse files Browse the repository at this point in the history
Fudge irradiance map lookup to avoid precision issues
  • Loading branch information
akien-mga authored Oct 29, 2021
2 parents f0223ea + 3f03b60 commit ecedc7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gles3/shaders/scene.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ecedc7d

Please sign in to comment.