Professional Documents
Culture Documents
Pixel Colour Correct Multi
Pixel Colour Correct Multi
///
/// COLOR CORRECTION (final pass) on a bitmap but blending between to luts...
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D al_tex;
uniform sampler2D depthTexture;
void main()
{
if (al_use_tex) {
//gl_FragColor = lutSample;
///add noise
gl_FragColor = finalLutSample + (noiseamount *
clamp(rand( vec2(randSeed+gl_FragCoord.x, randSeed2 +gl_FragCoord.y)), 0.0,1.0));
///just output..
//gl_FragColor = finalLutSample;
//get alpha value but ... yeah
gl_FragColor.a = texture2D(al_tex, varying_texcoord).a;
if (gl_FragColor.a < 0.001) {
gl_FragColor.r=0.0;
gl_FragColor.g=0.0;
gl_FragColor.b=0.0;
gl_FragColor.a=0.0;
}
} else {
gl_FragColor = varying_color;
}
}