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
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-04-24 00:11:29 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-05-02 21:49:38 +0300
commita56561dcd28d5a8ee45948afb62cc7296c212a44 (patch)
treea07ec757465628dc60c932c83ae7ca76cb5ba865 /source/blender/draw/intern/DRW_render.h
parent33356b7be0ace84e1d0ab7235c68541939a7ab9c (diff)
DRW: Make use of new multisample resolve pass.
Diffstat (limited to 'source/blender/draw/intern/DRW_render.h')
-rw-r--r--source/blender/draw/intern/DRW_render.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h
index cc0bb01adec..c0f5a0df3bf 100644
--- a/source/blender/draw/intern/DRW_render.h
+++ b/source/blender/draw/intern/DRW_render.h
@@ -102,20 +102,21 @@ typedef char DRWViewportEmptyList;
}
/* Use of multisample framebuffers. */
-#define MULTISAMPLE_SYNC_ENABLE(dfbl) { \
+#define MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl) { \
if (dfbl->multisample_fb != NULL) { \
DRW_stats_query_start("Multisample Blit"); \
- GPU_framebuffer_blit(dfbl->default_fb, 0, dfbl->multisample_fb, 0, GPU_COLOR_BIT | GPU_DEPTH_BIT); \
GPU_framebuffer_bind(dfbl->multisample_fb); \
+ /* TODO clear only depth but need to do alpha to coverage for transparencies. */ \
+ GPU_framebuffer_clear_color_depth(dfbl->multisample_fb, (const float[4]){0.0f}, 1.0f); \
DRW_stats_query_end(); \
} \
}
-#define MULTISAMPLE_SYNC_DISABLE(dfbl) { \
+#define MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl) { \
if (dfbl->multisample_fb != NULL) { \
DRW_stats_query_start("Multisample Resolve"); \
- GPU_framebuffer_blit(dfbl->multisample_fb, 0, dfbl->default_fb, 0, GPU_COLOR_BIT | GPU_DEPTH_BIT); \
GPU_framebuffer_bind(dfbl->default_fb); \
+ DRW_multisamples_resolve(dtxl->multisample_depth, dtxl->multisample_color); \
DRW_stats_query_end(); \
} \
}