blob: 3af1492c6773ade045c1a555fbe193c2739d1e6d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#version 100
precision mediump float;
varying vec2 fragTexCoord;
varying vec4 fragColor;
uniform sampler2D texture0;
uniform vec4 colDiffuse;
uniform float u_time;
void main()
{
vec4 tex = texture2D(texture0, fragTexCoord);
vec3 a = vec3(1.0, 0.0, 1.0);
vec3 b = vec3(0.0, 1.0, 0.0);
float m = 0.5 + 0.5*(sin(0.2*gl_FragCoord.x + 5.0*u_time) + cos(0.2*gl_FragCoord.y + 5.0*u_time));
//float m = 0.5;
gl_FragColor = vec4(mix(a, b, m), tex.a);
}
|