I was recently reading this article http://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/ and I was trying to apply gamma color correction to my sketch.
After reading this article:
I have simply add this line
glEnable(GL_FRAMEBUFFER_SRGB); at the beginning of my setup method and I have change this line in the fragment shader from
vec3 texColor = texture(tex0, vTexCoord).xyz;
vec3 texColor = pow(texture(tex0, vTexCoord).rgb, vec3(2.2));
This is the image without gamma color correction:
And this is the image with gamma color correction:
I prefer that one with gamma correction because the image looks brighter and the contrast are more visible but I am wondering if I am doing it correctly or not, or if there is another way to do this with openFrameworks. I would like to avoid to call
How are you doing gamma color correction in OF?