diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-10-06 23:31:49 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-10-06 23:32:02 +0300 |
commit | 198e3a35c884fe18a3abc2cbbe82c1c2398eb556 (patch) | |
tree | 28fb40195b13826808d27e97d1b5081fb4ce9985 /source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl | |
parent | 86e439e3119ce752e2456a01ca16180b1959a2b3 (diff) |
OpenGL: another built-in shader for 2D points
GPU_SHADER_2D_POINT_VARYING_SIZE_VARYING_COLOR
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl new file mode 100644 index 00000000000..4cdd43a0a97 --- /dev/null +++ b/source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl @@ -0,0 +1,19 @@ + +#if __VERSION__ == 120 + attribute vec2 pos; + attribute float size; + attribute vec4 color; + varying vec4 finalColor; +#else + in vec2 pos; + in float size; + in vec4 color; + out vec4 finalColor; +#endif + +void main() +{ + gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); + gl_PointSize = size; + finalColor = color; +} |