mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Make screen texture and depth texture work in Multiview
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user