blob: 96281cd03eec57c4217d09e0019666f748574b5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#version 120
varying out mat3x4 v_tex_rot;
void main() {
vec4 l_position = gl_Vertex;
vec2 l_direction = normalize(l_position.zw);
v_tex_rot = mat3x4(
l_direction.x, l_direction.y, 0.0, 0.0,
-l_direction.y, l_direction.x, 0.0, 0.0,
1.0 - l_direction.x + l_direction.y, 1.0 - l_direction.y - l_direction.x, 0.0, 0.0);
l_position.zw = vec2(0.0, 1.0);
gl_FrontColor = gl_Color;
gl_Position = gl_ModelViewProjectionMatrix * l_position;
}
|