blob: 7c317ecfb8ca54ca91a41544abc8df84bfda777d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/*
* Vertex Shader for dashed lines with 3D coordinates,
* with uniform multi-colors or uniform single-color, and unary thickness.
*
* Dashed is performed in screen space.
*/
uniform mat4 ModelViewProjectionMatrix;
#ifdef USE_WORLD_CLIP_PLANES
uniform mat4 ModelMatrix;
#endif
uniform vec4 color;
in vec3 pos;
out vec4 color_vert;
void main()
{
vec4 pos_4d = vec4(pos, 1.0);
gl_Position = ModelViewProjectionMatrix * pos_4d;
color_vert = color;
#ifdef USE_WORLD_CLIP_PLANES
world_clip_planes_calc_clip_distance((ModelMatrix * pos_4d).xyz);
#endif
}
|