varying vec2 texCoord;
uniform sampler2D envMap;
uniform sampler2D sceneMap;
uniform sampler2D logoMap;
uniform float anim2;
uniform float logoShow;
varying vec3 eye;
varying vec3 eyeSC;
void main()
{

	vec2 tNew = vec2(texCoord.x*1.5,texCoord.y*14.0 - anim2*1.7);
	vec4 envCol = texture2D(envMap,tNew);
	vec4 colol = vec4(1.0,1.0,1.0,1.0);
//	envCol.a = 0.002;
	float toner = 1.0/(length(eye.xyz)*0.001);
	toner = min(pow(toner,2.6),1.0);
	//envCol.a *=toner;
	vec3 modVec = refract(eyeSC, normalize(vec3(0,0,length(envCol.rgb))),0.8);
	vec2 tC = modVec.xy*0.5 + vec2(0.5);
	//tC.xy
	vec4 scene = texture2D(sceneMap,tC);
	vec4 logo = texture2D(logoMap,tNew);
//scene.a*=toner;
	scene.a*=0.6;
//	scene.r+=0.5;
//	gl_FragColor = envCol;
	gl_FragColor =  scene * logo*1.4 + logo*0.2;
	//gl_FragColor = vec4(1.0);
	
}