Make screen texture and depth texture work in Multiview

This commit is contained in:
Bastiaan Olij
2023-01-15 16:07:59 +11:00
parent eaf306e0b1
commit 85c478e170
15 changed files with 103 additions and 23 deletions

View File

@@ -253,6 +253,11 @@ void RendererSceneRenderRD::_render_buffers_copy_screen_texture(const RenderData
Ref<RenderSceneBuffersRD> rb = p_render_data->render_buffers;
ERR_FAIL_COND(rb.is_null());
if (!rb->has_internal_texture()) {
// We're likely rendering reflection probes where we can't use our backbuffers.
return;
}
RD::get_singleton()->draw_command_begin_label("Copy screen texture");
rb->allocate_blur_textures();
@@ -292,6 +297,11 @@ void RendererSceneRenderRD::_render_buffers_copy_depth_texture(const RenderDataR
Ref<RenderSceneBuffersRD> rb = p_render_data->render_buffers;
ERR_FAIL_COND(rb.is_null());
if (!rb->has_depth_texture()) {
// We're likely rendering reflection probes where we can't use our backbuffers.
return;
}
RD::get_singleton()->draw_command_begin_label("Copy depth texture");
// note, this only creates our back depth texture if we haven't already created it.