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_prim_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_prim_vert.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/object_particle_prim_vert.glsl | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/draw/modes/shaders/object_particle_prim_vert.glsl b/source/blender/draw/modes/shaders/object_particle_prim_vert.glsl index 3df5115db76..0f626626498 100644 --- a/source/blender/draw/modes/shaders/object_particle_prim_vert.glsl +++ b/source/blender/draw/modes/shaders/object_particle_prim_vert.glsl @@ -18,42 +18,42 @@ flat out vec4 finalColor; vec3 rotate(vec3 vec, vec4 quat) { - /* The quaternion representation here stores the w component in the first index */ - return vec + 2.0 * cross(quat.yzw, cross(quat.yzw, vec) + quat.x * vec); + /* The quaternion representation here stores the w component in the first index */ + return vec + 2.0 * cross(quat.yzw, cross(quat.yzw, vec) + quat.x * vec); } void main() { - if (screen_space == 1) { - gl_Position = ModelViewMatrix * vec4(pos, 1.0) + vec4(inst_pos * draw_size, 0.0); - gl_Position = ProjectionMatrix * gl_Position; - } - else { - float size = draw_size; + if (screen_space == 1) { + gl_Position = ModelViewMatrix * vec4(pos, 1.0) + vec4(inst_pos * draw_size, 0.0); + gl_Position = ProjectionMatrix * gl_Position; + } + else { + float size = draw_size; - if (axis > -1) { - size *= 2; - } + if (axis > -1) { + size *= 2; + } - gl_Position = ModelViewProjectionMatrix * vec4(pos + rotate(inst_pos * size, rot), 1.0); - } + gl_Position = ModelViewProjectionMatrix * vec4(pos + rotate(inst_pos * size, rot), 1.0); + } #ifdef USE_AXIS - if (axis == 0) { - finalColor = vec4(1.0, 0.0, 0.0, 1.0); - } - else if (axis == 1) { - finalColor = vec4(0.0, 1.0, 0.0, 1.0); - } - else { - finalColor = vec4(0.0, 0.0, 1.0, 1.0); - } + if (axis == 0) { + finalColor = vec4(1.0, 0.0, 0.0, 1.0); + } + else if (axis == 1) { + finalColor = vec4(0.0, 1.0, 0.0, 1.0); + } + else { + finalColor = vec4(0.0, 0.0, 1.0, 1.0); + } #else - if (val < 0.0) { - finalColor = vec4(color, 1.0); - } - else { - finalColor = vec4(texture(ramp, val).rgb, 1.0); - } + if (val < 0.0) { + finalColor = vec4(color, 1.0); + } + else { + finalColor = vec4(texture(ramp, val).rgb, 1.0); + } #endif } |