diff options
author | Antonioya <blendergit@gmail.com> | 2018-09-24 23:10:08 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-09-24 23:10:08 +0300 |
commit | 2b628ba52b73eadec587354ed29ed59cf946b226 (patch) | |
tree | 7d66594bb106ef8ef7dc71e25307b373936fdb64 /source | |
parent | a6b125b06fd50c25bee5b4e26fbfe3ce0badca03 (diff) |
GP: Disable AA for material previews
This is not visible and it's using a lot of GPU memory
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_engine.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 */ |