#version 300 es

precision highp float;

in vec2 vUV;

uniform sampler2D uMistBgTex;
uniform sampler2D uMistTex;
uniform vec4 uMistColor;
out vec4 fragColor;

void main()
{
    vec4 color = texture(uMistBgTex, vUV.xy).rgba;
    color.rgb += uMistColor.rgb;
    color.a = texture(uMistTex, vUV.xy).r * uMistColor.a;
    fragColor = color.rgba;
}