// hpl1_gamma_correction.fragment

in vec2 vUv;

uniform sampler2DRect tex0;
uniform float gamma;

OUTPUT

void main()
{
    vec4 color = texture2DRect(tex0, vUv);
    outColor = vec4(pow(color.r, 1/gamma), pow(color.g, 1/gamma), pow(color.b, 1/gamma), color.a);
}