GP: Fix render glitch when have collision with mesh
[blender.git] / source / blender / draw / engines / gpencil / gpencil_render.c
index 1fe008e4d444a968032dbdb2949fbccc7fc49963..9a1ac56324f45361982a69becc5f815e483c3d32 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);
+                                               }
                                        }
                                }
                        }