uniform sampler2D tex0;

uniform sampler1D tone;

void main(void)
{
	vec4 texel = texture2D(tex0, gl_TexCoord[0].st);

	float rr = texture1D(tone, texel.r).r;
	float rg = texture1D(tone, texel.g).r;
	float rb = texture1D(tone, texel.b).r;

	gl_FragData[0] = vec4(rr,rg,rb,texel.a);
}


