#version 120 // -*- c++ -*-
#extension GL_EXT_gpu_shader4 : require

#if __VERSION__ == 120
#   define          texelFetch texelFetch2D
#endif

uniform sampler2D myColor;
uniform sampler2D myDepth;
uniform sampler2D myIntensity;

void main(void)
{
  ivec2 SP = ivec2(gl_FragCoord.xy);

  vec4
    cColor = texelFetch(myColor, SP,0);
  float
    rDepth = texelFetch(myDepth,SP,0).r;

  cColor.rgb *= texelFetch(myIntensity,SP,0).rrr;
  gl_FragColor = cColor;
  gl_FragDepth = rDepth;
}                                                  
