diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-03-09 18:27:24 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-03-09 18:27:24 +0300 |
commit | 29f3af95272590d26f610ae828b2eeee89c82a00 (patch) | |
tree | a696a58a2561c48f7ec6166e369e22081e0a64d8 /source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_glow_resolve_frag.glsl | |
parent | dcb93126876879d969a30a7865700abd072066f8 (diff) |
GPencil: Refactor of Draw Engine, Vertex Paint and all internal functions
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes.
Also, a huge code cleanup has been done at all levels.
Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development.
Differential Revision: https://developer.blender.org/D6293
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 | 46 |
1 files changed, 0 insertions, 46 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 deleted file mode 100644 index e2aceb9eefe..00000000000 --- a/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_glow_resolve_frag.glsl +++ /dev/null @@ -1,46 +0,0 @@ -/* ******************************************************************* */ -/* Resolve GLOW pass */ -/* ******************************************************************* */ -uniform sampler2D strokeColor; -uniform sampler2D strokeDepth; -uniform sampler2D glowColor; -uniform sampler2D glowDepth; -uniform int alpha_mode; - -out vec4 FragColor; - -void main() -{ - 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; - - 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 (outcolor.a < 0.001) { - discard; - } - - FragColor = outcolor; -} |