diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
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.glsl | 36 |
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; } |