//fbTEX1 + fbTEX3 to framebuffer
uniform float shadetone;
uniform float noisex;
uniform float noisey;
varying vec2 texCoord;
uniform sampler2D colorMap;
uniform sampler2D shadeMap;
uniform sampler2D scanlines;
uniform sampler2D noisepic;
void main (void)
{
vec4 pixel=texture2D(colorMap, texCoord);
float scanline=texture2D(scanlines, texCoord).r;
float grayscale=(pixel.r+pixel.g+pixel.b)/3.0f;
	gl_FragColor =texture2D(shadeMap,vec2(grayscale,shadetone))
	 *scanline
	 *texture2D(noisepic, vec2(texCoord.x+noisex,texCoord.y+noisey));
}
