Cat paw mode.
[pwl6.git] / src / data / shaders / noisyquads.vert
1 /* This is free and unencumbered software released into the public
2 domain. To the extent possible under law, the author of this file
3 waives all copyright and related or neighboring rights to it.
4 */
5
6 precision mediump float;
7
8 attribute vec3 position;
9 attribute vec2 texCoord;
10 attribute vec4 color;
11
12 uniform mat4 model;
13 uniform mat4 view;
14 uniform mat4 projection;
15
16 uniform float cut;
17 uniform float range;
18
19 varying vec4 fColor;
20
21 void main(void) {
22 gl_Position = projection * view * model * vec4(position, 1.0);
23 vec2 n = vec2(texCoord.x, cut);
24 float p = 1.0 - range * abs(snoise(n));
25 fColor = vec4(p * color.rgb, color.a);
26 }