Make screen texture and depth texture work in Multiview
This commit is contained in:
parent
eaf306e0b1
commit
85c478e170
15 changed files with 103 additions and 23 deletions
|
|
@ -1464,7 +1464,6 @@ bool LightStorage::reflection_probe_instance_begin_render(RID p_instance, RID p_
|
|||
fb.push_back(atlas->depth_buffer);
|
||||
atlas->depth_fb = RD::get_singleton()->framebuffer_create(fb);
|
||||
|
||||
atlas->render_buffers->cleanup();
|
||||
atlas->render_buffers->configure_for_reflections(Size2i(atlas->size, atlas->size));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -490,6 +490,16 @@ Ref<RenderBufferCustomDataRD> RenderSceneBuffersRD::get_custom_data(const String
|
|||
|
||||
// Depth texture
|
||||
|
||||
bool RenderSceneBuffersRD::has_depth_texture() {
|
||||
RendererRD::TextureStorage *texture_storage = RendererRD::TextureStorage::get_singleton();
|
||||
RID depth = texture_storage->render_target_get_override_depth(render_target);
|
||||
if (depth.is_valid()) {
|
||||
return true;
|
||||
} else {
|
||||
return has_texture(RB_SCOPE_BUFFERS, RB_TEX_DEPTH);
|
||||
}
|
||||
}
|
||||
|
||||
RID RenderSceneBuffersRD::get_depth_texture() {
|
||||
RendererRD::TextureStorage *texture_storage = RendererRD::TextureStorage::get_singleton();
|
||||
RID depth = texture_storage->render_target_get_override_depth(render_target);
|
||||
|
|
|
|||
|
|
@ -185,6 +185,9 @@ public:
|
|||
|
||||
// For our internal textures we provide some easy access methods.
|
||||
|
||||
_FORCE_INLINE_ bool has_internal_texture() const {
|
||||
return has_texture(RB_SCOPE_BUFFERS, RB_TEX_COLOR);
|
||||
}
|
||||
_FORCE_INLINE_ RID get_internal_texture() const {
|
||||
return get_texture(RB_SCOPE_BUFFERS, RB_TEX_COLOR);
|
||||
}
|
||||
|
|
@ -192,6 +195,7 @@ public:
|
|||
return get_texture_slice(RB_SCOPE_BUFFERS, RB_TEX_COLOR, p_layer, 0);
|
||||
}
|
||||
|
||||
bool has_depth_texture();
|
||||
RID get_depth_texture();
|
||||
RID get_depth_texture(const uint32_t p_layer);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue