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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl36
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl
index 50166bc4e95..3f3bfa5410c 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl
@@ -15,30 +15,30 @@ out vec4 radii;
/* TODO: Port drawing to draw manager and
* remove constants duplications. */
-#define VERT_UV_SELECT (1 << 3)
-#define VERT_UV_PINNED (1 << 4)
+#define VERT_UV_SELECT (1 << 3)
+#define VERT_UV_PINNED (1 << 4)
void main()
{
- gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
- gl_PointSize = pointSize;
+ gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
+ gl_PointSize = pointSize;
- bool is_selected = (flag & VERT_UV_SELECT) != 0;
- bool is_pinned = (flag & VERT_UV_PINNED) != 0;
+ bool is_selected = (flag & VERT_UV_SELECT) != 0;
+ bool is_pinned = (flag & VERT_UV_PINNED) != 0;
- vec4 deselect_col = (is_pinned) ? pinnedColor : vertColor;
- fillColor = (is_selected) ? selectColor : deselect_col;
- outlineColor = (is_pinned) ? pinnedColor : vec4(fillColor.rgb, 0.0);
+ vec4 deselect_col = (is_pinned) ? pinnedColor : vertColor;
+ fillColor = (is_selected) ? selectColor : deselect_col;
+ outlineColor = (is_pinned) ? pinnedColor : vec4(fillColor.rgb, 0.0);
- // calculate concentric radii in pixels
- float radius = 0.5 * pointSize;
+ // calculate concentric radii in pixels
+ float radius = 0.5 * pointSize;
- // start at the outside and progress toward the center
- radii[0] = radius;
- radii[1] = radius - 1.0;
- radii[2] = radius - outlineWidth;
- radii[3] = radius - outlineWidth - 1.0;
+ // start at the outside and progress toward the center
+ radii[0] = radius;
+ radii[1] = radius - 1.0;
+ radii[2] = radius - outlineWidth;
+ radii[3] = radius - outlineWidth - 1.0;
- // convert to PointCoord units
- radii /= pointSize;
+ // convert to PointCoord units
+ radii /= pointSize;
}