- " vec4 canvas = texture2D(tex2, gl_FragCoord.xy / tex2_dimensions);\n"
- " gl_FragColor.a = canvas.a;\n"
+ " gl_FragColor.a *= texture2D(tex1, gl_TexCoord[0].st).r;\n"
+ "}\n";
+
+static const char *multiply_mask3_frag =
+ "uniform sampler2D tex;\n"
+ "uniform sampler2D tex1;\n"
+ "void main()\n"
+ "{\n"
+ " gl_FragColor = texture2D(tex, gl_TexCoord[0].st);\n"
+ " float a = texture2D(tex1, gl_TexCoord[0].st).r;\n"
+ " gl_FragColor.rgb *= vec3(a, a, a);\n"
+ "}\n";
+
+static const char *multiply_yuvmask3_frag =
+ "uniform sampler2D tex;\n"
+ "uniform sampler2D tex1;\n"
+ "void main()\n"
+ "{\n"
+ " gl_FragColor = texture2D(tex, gl_TexCoord[0].st);\n"
+ " float a = texture2D(tex1, gl_TexCoord[0].st).r;\n"
+ " gl_FragColor.gb -= vec2(0.5, 0.5);\n"
+ " gl_FragColor.rgb *= vec3(a, a, a);\n"
+ " gl_FragColor.gb += vec2(0.5, 0.5);\n"