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_empty_image_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/modes/shaders/object_empty_image_frag.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/object_empty_image_frag.glsl | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/draw/modes/shaders/object_empty_image_frag.glsl b/source/blender/draw/modes/shaders/object_empty_image_frag.glsl index c20d70e3b06..386d05636f9 100644 --- a/source/blender/draw/modes/shaders/object_empty_image_frag.glsl +++ b/source/blender/draw/modes/shaders/object_empty_image_frag.glsl @@ -17,30 +17,30 @@ uniform bool useAlphaTest; void main() { #ifdef USE_WIRE - fragColor = finalColor; + fragColor = finalColor; #else - vec4 tex_col = texture(image, texCoord_interp); - fragColor = finalColor * tex_col; - - if (useAlphaTest) { - /* Arbitrary discard anything below 5% opacity. - * Note that this could be exposed to the User. */ - if (tex_col.a < 0.05) { - discard; - } - else { - fragColor.a = 1.0; - } - } + vec4 tex_col = texture(image, texCoord_interp); + fragColor = finalColor * tex_col; + + if (useAlphaTest) { + /* Arbitrary discard anything below 5% opacity. + * Note that this could be exposed to the User. */ + if (tex_col.a < 0.05) { + discard; + } + else { + fragColor.a = 1.0; + } + } #endif - if (depthMode == DEPTH_BACK) { - gl_FragDepth = 0.999999; - } - else if (depthMode == DEPTH_FRONT) { - gl_FragDepth = 0.000001; - } - else if (depthMode == DEPTH_UNCHANGED) { - gl_FragDepth = gl_FragCoord.z; - } + if (depthMode == DEPTH_BACK) { + gl_FragDepth = 0.999999; + } + else if (depthMode == DEPTH_FRONT) { + gl_FragDepth = 0.000001; + } + else if (depthMode == DEPTH_UNCHANGED) { + gl_FragDepth = gl_FragCoord.z; + } } |