From 474454be3976f51d59aff327491a5fd2ab48abc2 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 13 Jul 2017 16:44:02 +0200 Subject: 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. --- ...pu_shader_3D_line_dashed_uniform_color_vert.glsl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl (limited to 'source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl') 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; +} -- cgit v1.2.3