Skip to content

Commit

Permalink
FIX - cancel hdr on cubemap, as it does not compute lights
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreLamure committed Jan 17, 2020
1 parent c2cfb47 commit fc6c1e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shaders/cubemap/fragment.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@ uniform samplerCube texture_cubemap;
void main()
{
output_color = texture(texture_cubemap, tex_coords);

// Cancel HDR luminosity
// The color of cubemap texture does not compute lights, so the value is already between 0 and 1.
output_color.rgb = -log(-output_color.rgb + 1.0001);

}

0 comments on commit fc6c1e7

Please sign in to comment.