uniform sampler2D tex; void main() { const vec3 invgamma3 = vec3(1.0 / 2.2); vec3 texel = texture2D(tex, gl_TexCoord[0].st).xyz; gl_FragColor.rgb = pow(texel, invgamma3); gl_FragColor.a = 1.0; }