Skip to content

Commit

Permalink
Fix sRGB cutoff value
Browse files Browse the repository at this point in the history
put the right cutoff value in for srgb!  don't know where the old one
came from.
  • Loading branch information
snagy committed Oct 19, 2017
1 parent 80f3df9 commit c44d9cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shaders/pbr-frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ vec4 SRGBtoLINEAR(vec4 srgbIn)
#ifdef SRGB_FAST_APPROXIMATION
vec3 linOut = pow(srgbIn.xyz,vec3(2.2));
#else //SRGB_FAST_APPROXIMATION
vec3 bLess = step(vec3(0.03928),srgbIn.xyz);
vec3 bLess = step(vec3(0.04045),srgbIn.xyz);
vec3 linOut = mix( srgbIn.xyz/vec3(12.92), pow((srgbIn.xyz+vec3(0.055))/vec3(1.055),vec3(2.4)), bLess );
#endif //SRGB_FAST_APPROXIMATION
return vec4(linOut,srgbIn.w);;
Expand Down

0 comments on commit c44d9cf

Please sign in to comment.