uniform float u_opacity;
uniform vec4 u_color;

uniform vec2 u_scaleCenter;
uniform vec2 u_scaleEnvelope;
uniform float u_raySelector;

varying vec2 v_animatedCenter;
varying vec2 v_animatedEnvelope;

void main()
{
    vec4 colorCenter = texture2D(CC_Texture1, v_animatedCenter);
    vec4 colorEnvelope = texture2D(CC_Texture2, v_animatedEnvelope);
    
    gl_FragColor = mix(colorCenter , colorEnvelope, colorEnvelope.a * u_raySelector) * u_opacity ;
}
	