uniform sampler2DRect Ytex;
uniform sampler2DRect Utex,Vtex;
uniform vec3 offset;
// RGB coefficients
uniform vec3 Rcoeff;
uniform vec3 Gcoeff;
uniform vec3 Bcoeff;
uniform vec4 cspace;
uniform    float  imgHeight;
void main(void) {
    vec3 RGB;
    float nx,ny;
    nx=0.5 + gl_TexCoord[0].x;
    ny=imgHeight-gl_TexCoord[0].y;
    RGB.r=texture2DRect(Ytex,vec2(nx,ny)).r;
//    if( offset.r != 0. ) {
        RGB.r += offset.r;
//        RGB.r = clamp( RGB.r * 1.17, 0. , 1.0);
//    };
    RGB.g=RGB.r ;
    RGB.b=RGB.r ;

    gl_FragColor = vec4(RGB, 1.0);
}
