Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-11-02 20:05:13 +0300
committerAntonioya <blendergit@gmail.com>2018-11-02 21:28:36 +0300
commit74737091c009d95eb46a6e1db3b0c9729c4f7f3f (patch)
treed7052e8e123fabc496528530226e4dc250ea781b /source/blender
parent55a743fade8c166303dc6d1226cd5697a9cf5bc9 (diff)
GP: Fix problem when alpha is too low
There are still some color when the alpha is set to 0
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/draw/engines/gpencil/shaders/gpencil_point_frag.glsl2
-rw-r--r--source/blender/draw/engines/gpencil/shaders/gpencil_stroke_frag.glsl3
2 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_point_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_point_frag.glsl
index 0d6d2b22a55..439642f52e5 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_point_frag.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_point_frag.glsl
@@ -46,4 +46,6 @@ void main()
/* mult both alpha factor to use strength factor with color alpha limit */
fragColor.a = min(text_color.a * mColor.a, mColor.a);
}
+ if(fragColor.a < 0.0035)
+ discard;
}
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_frag.glsl
index d57921c1629..205b7a7fe64 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_frag.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_frag.glsl
@@ -43,4 +43,7 @@ void main()
/* mult both alpha factor to use strength factor with color alpha limit */
fragColor.a = min(text_color.a * tColor.a, tColor.a);
}
+
+ if(fragColor.a < 0.0035)
+ discard;
}