[Bf-blender-cvs] [46a228c93e4] greasepencil-object: GPencil: Fix masking material on top error

Antonio Vazquez noreply at git.blender.org
Thu Jul 9 17:04:20 CEST 2020


Commit: 46a228c93e4d097370749d5c3c34f342cbdda44e
Author: Antonio Vazquez
Date:   Sun Jun 21 19:18:58 2020 +0200
Branches: greasepencil-object
https://developer.blender.org/rB46a228c93e4d097370749d5c3c34f342cbdda44e

GPencil: Fix masking material on top error

===================================================================

M	source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl

===================================================================

diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl
index 2c6aee5428a..d10eda3b0f6 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_frag.glsl
@@ -99,15 +99,14 @@ void main()
     fragColor = texture(matMaskColorTexture, uv);
     revealColor = texture(matMaskRevealTexture, uv);
     gl_FragDepth = texture(matMaskDepthTexture, uv).r;
-    return;
   }
-
-  /* For compatibility with colored alpha buffer.
-   * Note that we are limited to mono-chromatic alpha blending here
-   * because of the blend equation and the limit of 1 color target
-   * when using custom color blending. */
-  revealColor = vec4(0.0, 0.0, 0.0, fragColor.a);
-
+  else {
+    /* For compatibility with colored alpha buffer.
+     * Note that we are limited to mono-chromatic alpha blending here
+     * because of the blend equation and the limit of 1 color target
+     * when using custom color blending. */
+    revealColor = vec4(0.0, 0.0, 0.0, fragColor.a);
+  }
   if (fragColor.a < 0.001) {
     discard;
   }



More information about the Bf-blender-cvs mailing list