uniform sampler2D coltex;
uniform sampler2D coltex2;
uniform float distort;
uniform float mix;

varying float dist;
varying vec4 col;
varying vec2 coords;

void main(void) {
//  vec4 tcol=texture2D(coltex, gl_TexCoord[0].xy);
  vec4 tcol=texture2D(coltex, coords);
  vec4 tcol2=texture2D(coltex2, coords);

  gl_FragData[0] = tcol*mix*col*.5 + tcol2*(1-mix)*col*.5;
/*
  gl_FragData[1].r = 1.0;
  gl_FragData[1].r = dist;
*/

  gl_FragData[1].r = dist;


}
