summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2021-09-28 20:19:20 +1000
committerGitHub <noreply@github.com>2021-09-28 20:19:20 +1000
commit03205328763204dd4a25f9f145f7c8f3ef2dbc07 (patch)
tree4c5f47e2fab44df4884b537af5d2f83edae71198 /servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
parent46607ec08eea8f0c4c6af02725dbc4408a316adc (diff)
parentcbdde9dff9b46d1fdd4335cabe5c6670de4a152f (diff)
Merge pull request #52864 from BastiaanOlij/xr_extension_return_buffers
Fix access to render target texture for XR interfaces
Diffstat (limited to 'servers/rendering/renderer_rd/renderer_scene_render_rd.cpp')
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
index b0fdd0b0a9..0f98417215 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
@@ -2415,6 +2415,13 @@ RID RendererSceneRenderRD::render_buffers_get_back_depth_texture(RID p_render_bu
return rb->depth_back_texture;
}
+RID RendererSceneRenderRD::render_buffers_get_depth_texture(RID p_render_buffers) {
+ RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
+ ERR_FAIL_COND_V(!rb, RID());
+
+ return rb->depth_texture;
+}
+
RID RendererSceneRenderRD::render_buffers_get_ao_texture(RID p_render_buffers) {
RenderBuffers *rb = render_buffers_owner.getornull(p_render_buffers);
ERR_FAIL_COND_V(!rb, RID());