]> git.tdb.fi Git - libs/gl.git/blob - shaderlib/occluder.glsl
Set color write mask if no blending is used
[libs/gl.git] / shaderlib / occluder.glsl
1 import msp_interface;
2
3 #pragma MSP stage(vertex)
4 virtual vec4 get_vertex_position()
5 {
6         return vertex;
7 }
8
9 virtual mat4 get_vertex_transform()
10 {
11         return world_obj_matrix;
12 }
13
14 virtual void clipping(vec3 eye_vertex)
15 {
16 }
17
18 void main()
19 {
20         vec4 eye_vertex = eye_world_matrix*get_vertex_transform()*get_vertex_position();
21         clipping(eye_vertex.xyz);
22         gl_Position = clip_eye_matrix*eye_vertex;
23 }