X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=sdr%2Fpost_gamma.p.glsl;fp=sdr%2Fpost_gamma.p.glsl;h=6b323f8e4dfa741de31f74917aa250161259623c;hp=0000000000000000000000000000000000000000;hb=3aacec4aee795e703e8eb9d6852ca47a3be065ee;hpb=c5c29f4044110dd153ee5ca3b018c812d518a053 diff --git a/sdr/post_gamma.p.glsl b/sdr/post_gamma.p.glsl new file mode 100644 index 0000000..6b323f8 --- /dev/null +++ b/sdr/post_gamma.p.glsl @@ -0,0 +1,10 @@ +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; +}