Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uniform sampler2D texture1;
- uniform sampler2D texture2;
- uniform sampler2D mask;
- uniform float angle;
- uniform mat2 textureMatrix;
- varying vec4 color;
- void main() {
- vec4 color1 = texture2D(texture1, gl_TexCoord[0].xy);
- vec4 color2 = texture2D(texture2, gl_TexCoord[0].xy);
- //mat2 textureMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));
- float mask = texture2D(mask, textureMatrix*gl_TexCoord[0].xy).a;
- gl_FragColor = color * mix(color1, color2, mask);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement