diff options
Diffstat (limited to 'source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_glow_resolve_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_glow_resolve_frag.glsl | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_glow_resolve_frag.glsl b/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_glow_resolve_frag.glsl index 5bff7a20523..e2aceb9eefe 100644 --- a/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_glow_resolve_frag.glsl +++ b/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_glow_resolve_frag.glsl @@ -11,36 +11,36 @@ out vec4 FragColor; void main() { - vec4 outcolor; - ivec2 uv = ivec2(gl_FragCoord.xy); + vec4 outcolor; + ivec2 uv = ivec2(gl_FragCoord.xy); - float stroke_depth = texelFetch(strokeDepth, uv.xy, 0).r; - vec4 src_pixel= texelFetch(strokeColor, uv.xy, 0); - vec4 glow_pixel= texelFetch(glowColor, uv.xy, 0); - float glow_depth = texelFetch(glowDepth, uv.xy, 0).r; + float stroke_depth = texelFetch(strokeDepth, uv.xy, 0).r; + vec4 src_pixel = texelFetch(strokeColor, uv.xy, 0); + vec4 glow_pixel = texelFetch(glowColor, uv.xy, 0); + float glow_depth = texelFetch(glowDepth, uv.xy, 0).r; - if (alpha_mode == 0) { - outcolor = src_pixel + glow_pixel; - } - else { - if ((src_pixel.a < 0.1) || (glow_pixel.a < 0.1)) { - outcolor = src_pixel + glow_pixel; - } - else { - outcolor = src_pixel; - } - } + if (alpha_mode == 0) { + outcolor = src_pixel + glow_pixel; + } + else { + if ((src_pixel.a < 0.1) || (glow_pixel.a < 0.1)) { + outcolor = src_pixel + glow_pixel; + } + else { + outcolor = src_pixel; + } + } - if (src_pixel.a < glow_pixel.a) { - gl_FragDepth = glow_depth; - } - else { - gl_FragDepth = stroke_depth; - } + if (src_pixel.a < glow_pixel.a) { + gl_FragDepth = glow_depth; + } + else { + gl_FragDepth = stroke_depth; + } - if (outcolor.a < 0.001) { - discard; - } + if (outcolor.a < 0.001) { + discard; + } - FragColor = outcolor; + FragColor = outcolor; } |