#version 100
precision mediump float;varying vec4 col;varying vec3 nrm,tan,bin;varying vec2 uv;uniform sampler2D tex0;uniform sampler2D tex1;uniform sampler2D tex2;void main(){vec3 normal;vec4 col = texture2D(tex0,uv);normal = nrm;vec4 light = texture2D(tex1,normal.xy * 0.5 + vec2(0.5,0.5) );vec4 envcol = texture2D(tex2,normal.xy * 0.5 + vec2(0.5,0.5) );col *= mix(envcol,light,col.a);gl_FragColor = vec4(col.xyz,1.0);}