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/gpencil/shaders/fx/gpencil_fx_wave_frag.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/gpencil/shaders/fx/gpencil_fx_wave_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_wave_frag.glsl | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_wave_frag.glsl b/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_wave_frag.glsl index 04ab1557d07..0a5df9f6d77 100644 --- a/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_wave_frag.glsl +++ b/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_wave_frag.glsl @@ -17,28 +17,28 @@ uniform vec2 wsize; void main() { - vec4 outcolor; - ivec2 uv = ivec2(gl_FragCoord.xy); - float stroke_depth; - - float value; - if (orientation == HORIZONTAL) { - float pval = (uv.x * M_PI) / wsize[0]; - value = amplitude * sin((period * pval) + phase); - outcolor = texelFetch(strokeColor, ivec2(uv.x, uv.y + value), 0); - stroke_depth = texelFetch(strokeDepth, ivec2(uv.x, uv.y + value), 0).r; - } - else { - float pval = (uv.y * M_PI) / wsize[1]; - value = amplitude * sin((period * pval) + phase); - outcolor = texelFetch(strokeColor, ivec2(uv.x + value, uv.y), 0); - stroke_depth = texelFetch(strokeDepth, ivec2(uv.x + value, uv.y), 0).r; - } - - FragColor = outcolor; - gl_FragDepth = stroke_depth; - - if (outcolor.a < 0.02f) { - discard; - } + vec4 outcolor; + ivec2 uv = ivec2(gl_FragCoord.xy); + float stroke_depth; + + float value; + if (orientation == HORIZONTAL) { + float pval = (uv.x * M_PI) / wsize[0]; + value = amplitude * sin((period * pval) + phase); + outcolor = texelFetch(strokeColor, ivec2(uv.x, uv.y + value), 0); + stroke_depth = texelFetch(strokeDepth, ivec2(uv.x, uv.y + value), 0).r; + } + else { + float pval = (uv.y * M_PI) / wsize[1]; + value = amplitude * sin((period * pval) + phase); + outcolor = texelFetch(strokeColor, ivec2(uv.x + value, uv.y), 0); + stroke_depth = texelFetch(strokeDepth, ivec2(uv.x + value, uv.y), 0).r; + } + + FragColor = outcolor; + gl_FragDepth = stroke_depth; + + if (outcolor.a < 0.02f) { + discard; + } } |