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/engines/eevee/shaders/volumetric_geom.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/engines/eevee/shaders/volumetric_geom.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl | 94 |
1 files changed, 48 insertions, 46 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl b/source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl index 72545302fd3..96b891c929f 100644 --- a/source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl +++ b/source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl @@ -2,10 +2,10 @@ #ifdef MESH_SHADER /* TODO tight slices */ layout(triangles) in; -layout(triangle_strip, max_vertices=3) out; +layout(triangle_strip, max_vertices = 3) out; #else /* World */ layout(triangles) in; -layout(triangle_strip, max_vertices=3) out; +layout(triangle_strip, max_vertices = 3) out; #endif in vec4 vPos[]; @@ -14,28 +14,29 @@ flat out int slice; #ifdef MESH_SHADER /* TODO tight slices */ -void main() { - gl_Layer = slice = int(vPos[0].z); - -#ifdef USE_ATTR - pass_attr(0); -#endif - gl_Position = vPos[0].xyww; - EmitVertex(); - -#ifdef USE_ATTR - pass_attr(1); -#endif - gl_Position = vPos[1].xyww; - EmitVertex(); - -#ifdef USE_ATTR - pass_attr(2); -#endif - gl_Position = vPos[2].xyww; - EmitVertex(); - - EndPrimitive(); +void main() +{ + gl_Layer = slice = int(vPos[0].z); + +# ifdef USE_ATTR + pass_attr(0); +# endif + gl_Position = vPos[0].xyww; + EmitVertex(); + +# ifdef USE_ATTR + pass_attr(1); +# endif + gl_Position = vPos[1].xyww; + EmitVertex(); + +# ifdef USE_ATTR + pass_attr(2); +# endif + gl_Position = vPos[2].xyww; + EmitVertex(); + + EndPrimitive(); } #else /* World */ @@ -43,28 +44,29 @@ void main() { /* This is just a pass-through geometry shader that send the geometry * to the layer corresponding to it's depth. */ -void main() { - gl_Layer = slice = int(vPos[0].z); - -#ifdef USE_ATTR - pass_attr(0); -#endif - gl_Position = vPos[0].xyww; - EmitVertex(); - -#ifdef USE_ATTR - pass_attr(1); -#endif - gl_Position = vPos[1].xyww; - EmitVertex(); - -#ifdef USE_ATTR - pass_attr(2); -#endif - gl_Position = vPos[2].xyww; - EmitVertex(); - - EndPrimitive(); +void main() +{ + gl_Layer = slice = int(vPos[0].z); + +# ifdef USE_ATTR + pass_attr(0); +# endif + gl_Position = vPos[0].xyww; + EmitVertex(); + +# ifdef USE_ATTR + pass_attr(1); +# endif + gl_Position = vPos[1].xyww; + EmitVertex(); + +# ifdef USE_ATTR + pass_attr(2); +# endif + gl_Position = vPos[2].xyww; + EmitVertex(); + + EndPrimitive(); } #endif |