GP: Fix render glitch when have collision with mesh
authorAntonioya <blendergit@gmail.com>
Thu, 10 Jan 2019 15:25:34 +0000 (16:25 +0100)
committerAntonioya <blendergit@gmail.com>
Thu, 10 Jan 2019 15:26:05 +0000 (16:26 +0100)
source/blender/draw/engines/gpencil/gpencil_render.c

index 1fe008e..9a1ac56 100644 (file)
@@ -338,7 +338,12 @@ void GPENCIL_render_to_image(void *vedata, RenderEngine *engine, struct RenderLa
                                        }
                                        else {
                                                /* blend gp render */
-                                               blend_pixel(tmp, gp_pixel_rgba);
+                                               if (tmp[3] < 1.0f) {
+                                                       blend_pixel(tmp, gp_pixel_rgba);
+                                               }
+                                               else {
+                                                       copy_v4_v4(gp_pixel_rgba, tmp);
+                                               }
                                        }
                                }
                        }