diff options
Diffstat (limited to 'source/blender/draw/engines/gpencil/shaders/gpencil_edit_point_geom.glsl')
-rw-r--r-- | source/blender/draw/engines/gpencil/shaders/gpencil_edit_point_geom.glsl | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_edit_point_geom.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_edit_point_geom.glsl index 0d2da00db66..b5d0a5bce71 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_edit_point_geom.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_edit_point_geom.glsl @@ -13,36 +13,36 @@ out vec2 mTexCoord; /* project 3d point to 2d on screen space */ vec2 toScreenSpace(vec4 vertex) { - return vec2(vertex.xy / vertex.w) * Viewport; + return vec2(vertex.xy / vertex.w) * Viewport; } void main(void) { - vec4 P0 = gl_in[0].gl_Position; - vec2 sp0 = toScreenSpace(P0); + vec4 P0 = gl_in[0].gl_Position; + vec2 sp0 = toScreenSpace(P0); - float size = finalThickness[0]; + float size = finalThickness[0]; - /* generate the triangle strip */ - mTexCoord = vec2(0, 1); - mColor = finalColor[0]; - gl_Position = vec4(vec2(sp0.x - size, sp0.y + size) / Viewport, 0, 1.0); - EmitVertex(); + /* generate the triangle strip */ + mTexCoord = vec2(0, 1); + mColor = finalColor[0]; + gl_Position = vec4(vec2(sp0.x - size, sp0.y + size) / Viewport, 0, 1.0); + EmitVertex(); - mTexCoord = vec2(0, 0); - mColor = finalColor[0]; - gl_Position = vec4(vec2(sp0.x - size, sp0.y - size) / Viewport, 0, 1.0); - EmitVertex(); + mTexCoord = vec2(0, 0); + mColor = finalColor[0]; + gl_Position = vec4(vec2(sp0.x - size, sp0.y - size) / Viewport, 0, 1.0); + EmitVertex(); - mTexCoord = vec2(1, 1); - mColor = finalColor[0]; - gl_Position = vec4(vec2(sp0.x + size, sp0.y + size) / Viewport, 0, 1.0); - EmitVertex(); + mTexCoord = vec2(1, 1); + mColor = finalColor[0]; + gl_Position = vec4(vec2(sp0.x + size, sp0.y + size) / Viewport, 0, 1.0); + EmitVertex(); - mTexCoord = vec2(1, 0); - mColor = finalColor[0]; - gl_Position = vec4(vec2(sp0.x + size, sp0.y - size) / Viewport, 0, 1.0); - EmitVertex(); + mTexCoord = vec2(1, 0); + mColor = finalColor[0]; + gl_Position = vec4(vec2(sp0.x + size, sp0.y - size) / Viewport, 0, 1.0); + EmitVertex(); - EndPrimitive(); + EndPrimitive(); } |