Skip to content

Commit

Permalink
Fix for skybox washed out colors
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsmalm committed Oct 5, 2023
1 parent c00a71f commit d041015
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/skybox/shader/skybox.frag
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ vec3 decodeRGBE(vec4 rgbe) {

void main() {
vec4 color = textureCube(u_EnvironmentSampler, v_Position);
gl_FragColor = vec4(color.rgb * u_Exposure, 1.0);
if (u_RGBE) {
color = vec4(decodeRGBE(color), 1.0);
gl_FragColor = vec4(linearToSRGB(color.rgb * u_Exposure), 1.0);
}
gl_FragColor = vec4(linearToSRGB(color.rgb * u_Exposure), 1.0);
}
Binary file modified test/snapshots/ugdpm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/snapshots/ygihm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d041015

Please sign in to comment.