Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpu_shader_3D_line_dashed_uniform_color_vert.glsl « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 68835cb1d0fc8b1ddae26b8ca96d9e760edd3f0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma BLENDER_REQUIRE(gpu_shader_cfg_world_clip_lib.glsl)

/*
 * 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.
 */

void main()
{
  vec4 pos_4d = vec4(pos, 1.0);
  gl_Position = ModelViewProjectionMatrix * pos_4d;
  stipple_start = stipple_pos = viewport_size * 0.5 * (gl_Position.xy / gl_Position.w);
#ifdef USE_WORLD_CLIP_PLANES
  world_clip_planes_calc_clip_distance((ModelMatrix * pos_4d).xyz);
#endif
}