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
path: root/source
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2019-04-12 10:09:37 +0300
committerAntonioya <blendergit@gmail.com>2019-04-12 10:09:37 +0300
commit0ee23d0f5f613c4418a3ab2b2c67d47b936350de (patch)
tree8661956b34f1e4bae6b02562932aafe09744fabe /source
parentd1cda823e0a84487915fa81617dbec5b582fe4b6 (diff)
Fix T63452: View Port/render artifacts while camera movement in
Patch provided by @matc
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/gpencil/shaders/gpencil_stroke_geom.glsl3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_geom.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_geom.glsl
index 1ebb6797f63..aa38ff26a62 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_geom.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_geom.glsl
@@ -84,6 +84,9 @@ void main(void)
if (sp2.x < -area.x || sp2.x > area.x) return;
if (sp2.y < -area.y || sp2.y > area.y) return;
+ /* culling behind camera */
+ if (P1.w < 0 || P2.w < 0) return;
+
/* determine the direction of each of the 3 segments (previous, current, next) */
vec2 v0 = normalize(sp1 - sp0);
vec2 v1 = normalize(sp2 - sp1);