Closed redeff closed 6 years ago
Here is a working version of the fragment shader, although I think there must be a way of adjusting the gamma configuration from inside of gfx
#version 150 core in vec2 v_Uv; uniform sampler2D t_Image; out vec4 Target0; float exponent = 2.0; void main() { vec4 tex = texture(t_Image, v_Uv); Target0 = vec4( pow(tex.x, exponent), pow(tex.y, exponent), pow(tex.z, exponent), pow(tex.w, exponent) ); }
Thanks for pointing this out. I solved it by changing gfx's ColorFormat to sRGB.
Very helpful article on that: https://gamedevelopment.tutsplus.com/articles/gamma-correction-and-why-it-matters--gamedev-14466
Here is a working version of the fragment shader, although I think there must be a way of adjusting the gamma configuration from inside of gfx