blob: 67be8891c2131988c95a2f47717a7349f7bd4b44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#VERTEX_SHADER
uniform float dt;
Vertex vert(Vertex v)
{
if(v.xy.x > 3)
v.xy += vec2(100, 100) * sin(dt);
return v;
}
#END_VERTEX_SHADER
#FRAGMENT_SHADER
uniform float dt;
Color frag(Color col, Texture tex, Vertex v)
{
vec4 c = texel(tex, v.uv) * col;
c.gb *= sin(dt);
return c;
}
#END_FRAGMENT_SHADER
|