summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/storage_rd
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2023-03-01 18:59:59 +1100
committerYuri Sizov <yuris@humnom.net>2023-03-13 21:48:02 +0100
commitc8f64c68a5437242212311afa3dc83cac754fc43 (patch)
tree7525d304a01335317d1868a4149cabf9221108b7 /servers/rendering/renderer_rd/storage_rd
parent4e90cc55ecf379a7cfe426fa7263cc604220b644 (diff)
Use MSAA 2D texture in multipass tonemapper
(cherry picked from commit 903aa0e385ac79ca747029c0e12823b2671304a8)
Diffstat (limited to 'servers/rendering/renderer_rd/storage_rd')
-rw-r--r--servers/rendering/renderer_rd/storage_rd/texture_storage.cpp7
-rw-r--r--servers/rendering/renderer_rd/storage_rd/texture_storage.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp
index a1346661e1..1aab52d1c3 100644
--- a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp
@@ -2911,6 +2911,13 @@ RID TextureStorage::render_target_get_rd_texture_slice(RID p_render_target, uint
}
}
+RID TextureStorage::render_target_get_rd_texture_msaa(RID p_render_target) {
+ RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
+ ERR_FAIL_COND_V(!rt, RID());
+
+ return rt->color_multisample;
+}
+
RID TextureStorage::render_target_get_rd_backbuffer(RID p_render_target) {
RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
ERR_FAIL_COND_V(!rt, RID());
diff --git a/servers/rendering/renderer_rd/storage_rd/texture_storage.h b/servers/rendering/renderer_rd/storage_rd/texture_storage.h
index b6bb9fa52f..f710de1100 100644
--- a/servers/rendering/renderer_rd/storage_rd/texture_storage.h
+++ b/servers/rendering/renderer_rd/storage_rd/texture_storage.h
@@ -741,6 +741,7 @@ public:
RID render_target_get_rd_framebuffer(RID p_render_target);
RID render_target_get_rd_texture(RID p_render_target);
RID render_target_get_rd_texture_slice(RID p_render_target, uint32_t p_layer);
+ RID render_target_get_rd_texture_msaa(RID p_render_target);
RID render_target_get_rd_backbuffer(RID p_render_target);
RID render_target_get_rd_backbuffer_framebuffer(RID p_render_target);