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/draw/modes/shaders/object_particle_dot_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/draw/modes/shaders/object_particle_dot_vert.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/object_particle_dot_vert.glsl | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/source/blender/draw/modes/shaders/object_particle_dot_vert.glsl b/source/blender/draw/modes/shaders/object_particle_dot_vert.glsl index 6dfc212a776..e51b829adb5 100644 --- a/source/blender/draw/modes/shaders/object_particle_dot_vert.glsl +++ b/source/blender/draw/modes/shaders/object_particle_dot_vert.glsl @@ -10,26 +10,28 @@ in float val; out vec4 radii; flat out float finalVal; -void main() { - gl_Position = ModelViewMatrix * vec4(pos, 1.0); +void main() +{ + gl_Position = ModelViewMatrix * vec4(pos, 1.0); - float psize = (ProjectionMatrix[3][3] == 0.0) ? (size / (-gl_Position.z * pixel_size)) : (size / pixel_size); + float psize = (ProjectionMatrix[3][3] == 0.0) ? (size / (-gl_Position.z * pixel_size)) : + (size / pixel_size); - gl_PointSize = psize; + gl_PointSize = psize; - // calculate concentric radii in pixels - float radius = 0.5 * psize; + // calculate concentric radii in pixels + float radius = 0.5 * psize; - // start at the outside and progress toward the center - radii[0] = radius; - radii[1] = radius - 1.0; - radii[2] = radius - 1.0; - radii[3] = radius - 2.0; + // start at the outside and progress toward the center + radii[0] = radius; + radii[1] = radius - 1.0; + radii[2] = radius - 1.0; + radii[3] = radius - 2.0; - // convert to PointCoord units - radii /= psize; + // convert to PointCoord units + radii /= psize; - gl_Position = ProjectionMatrix * gl_Position; + gl_Position = ProjectionMatrix * gl_Position; - finalVal = val; + finalVal = val; } |