blob: d2f857d4d95805ba56477e88adeb7856b06ca832 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
SHADER_SOURCE(gDrawLinearGradientVertexShader,
attribute vec4 position;
uniform mat4 transform;
uniform float gradientLength;
uniform vec2 gradient;
uniform vec2 start;
uniform mat4 screenSpace;
varying float index;
void main(void) {
vec4 location = screenSpace * position;
index = dot(location.xy - start, gradient) * gradientLength;
gl_Position = transform * position;
}
);
|