#version 330 core in VSOUT { vec2 texcoords; } vsout; out vec4 frag_color; uniform sampler2D texture0; void main(void) { const float gamma = 2.2; vec3 color = vec3(texture(texture0, vsout.texcoords)); color = pow(color, vec3(1.0/gamma)); frag_color = vec4(color, 0.5); }