[Bf-blender-cvs] [2b628ba52b7] blender2.8: GP: Disable AA for material previews

Antonioya noreply at git.blender.org
Mon Sep 24 22:10:56 CEST 2018


Commit: 2b628ba52b73eadec587354ed29ed59cf946b226
Author: Antonioya
Date:   Mon Sep 24 22:10:08 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB2b628ba52b73eadec587354ed29ed59cf946b226

GP: Disable AA for material previews

This is not visible and it's using a lot of GPU memory

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

M	source/blender/draw/engines/gpencil/gpencil_engine.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index a74040648fa..6c456bb0182 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -750,7 +750,10 @@ void GPENCIL_draw_scene(void *ved)
 				 * draw only a subset that usually start with a fill and end with stroke because the
 				 * shading groups are created by pairs */
 				if (end_grp >= init_grp) {
-					MULTISAMPLE_GP_SYNC_ENABLE(stl->storage->multisamples, fbl);
+					/* previews don't use AA */
+					if (!stl->storage->is_mat_preview) {
+						MULTISAMPLE_GP_SYNC_ENABLE(stl->storage->multisamples, fbl);
+					}
 
 					DRW_draw_pass_subset(
 					        psl->stroke_pass,
@@ -758,7 +761,9 @@ void GPENCIL_draw_scene(void *ved)
 					        stl->shgroups[init_grp].shgrps_fill : stl->shgroups[init_grp].shgrps_stroke,
 					        stl->shgroups[end_grp].shgrps_stroke);
 
-					MULTISAMPLE_GP_SYNC_DISABLE(stl->storage->multisamples, fbl, fbl->temp_fb_a, txl);
+					if (!stl->storage->is_mat_preview) {
+						MULTISAMPLE_GP_SYNC_DISABLE(stl->storage->multisamples, fbl, fbl->temp_fb_a, txl);
+					}
 				}
 
 				/* Current buffer drawing */



More information about the Bf-blender-cvs mailing list