varying vec2 texCoord;
//varying vec4 vColor;
uniform sampler2D alphaMap;
uniform sampler2D backMap;

uniform float testvalue;

vec2 iResolution=vec2(1920.0,1080.0);

void main (void)
{
/*
    vec3 pos;
    vec2 fragCoord=gl_FragCoord.xy;

    vec2 uv = fragCoord.xy/iResolution.xy;
	vec2 p = uv*2.0-1.0;
	p.x*=(iResolution.x/iResolution.y);
	//vec3 col = vec3(0.05);
    vec3 ro = vec3(0.0,0.0,-2.0);
    vec3 rd = normalize(vec3(p,0.0)-ro);

    float fov=1.2;
*/
    vec4 alpha_ =texture2D(alphaMap, texCoord);
    vec4 back_ =texture2D(backMap, texCoord);
    //vec4 back_ =texture2D(alphaMap, vec2(1.0,1.0)-texCoord);//test
    float a=clamp(alpha_.a,0.0,1.0);
    vec3 res;
    //res=alpha_.rgb*a+back_.rgb*(1.0-a);
    res=alpha_.rgb+back_.rgb;
	gl_FragColor = vec4(res,1.0);
}
