summaryrefslogtreecommitdiff
path: root/bullet_vertex.glsl
blob: 0843be2e824f13ced9c4047f1ad8ead7d5c7a7ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
varying mat4 v_tex_rot;

void main() {
	vec4 l_position = gl_Vertex;
	vec2 l_direction = normalize(vec2(l_position.z, l_position.w));
	v_tex_rot = mat4(l_direction.x, l_direction.y, 0.0, 0.0,
					-l_direction.y, l_direction.x, 0.0, 0.0,
					0.0, 0.0, 1.0, 0.0,
					0.0, 0.0, 0.0, 1.0);
	l_position.z = 0.0;
	l_position.w = 1.0;
	gl_FrontColor = gl_Color;
	gl_Position = gl_ModelViewProjectionMatrix * l_position;
}