diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-07-13 17:44:02 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-07-13 17:47:58 +0300 |
commit | 474454be3976f51d59aff327491a5fd2ab48abc2 (patch) | |
tree | 895407db5881d98958dd2b56ea4e95b042f7e3d6 /source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl | |
parent | c9aef27326d54ed053edb37d27fe5571805139b9 (diff) |
Cleanup/rename etc. dashed line shaders.
Goal is to make them more modular, to allow more variants (variable
single-color, thickness, ...) to be added without having to
copy-and-change-one-line of whole chain of shaders.
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl new file mode 100644 index 00000000000..2fe08896585 --- /dev/null +++ b/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl @@ -0,0 +1,21 @@ + +/* + * 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; + +uniform vec4 color; + +in vec3 pos; + +out vec4 color_vert; + +void main() +{ + gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); + color_vert = color; +} |