diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-23 23:44:02 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-23 23:44:02 +0100 |
commit | f064898956786e587c1757b642140b14115fe307 (patch) | |
tree | fbb729be9ec995045b3efe31327bb2860ff09d75 /servers/rendering/renderer_rd/renderer_scene_render_rd.cpp | |
parent | d8a0382e3f0d835db8d2ddedd0bca8ff70abae4c (diff) | |
parent | e886a7af818be3287deefab9b18f87014ee60182 (diff) |
Merge pull request #70253 from BastiaanOlij/cleanup_sky_render
Cleanup and improve sky render
Diffstat (limited to 'servers/rendering/renderer_rd/renderer_scene_render_rd.cpp')
-rw-r--r-- | servers/rendering/renderer_rd/renderer_scene_render_rd.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp index e4c01ebf5c..1242c11bea 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp @@ -909,10 +909,20 @@ bool RendererSceneRenderRD::is_using_radiance_cubemap_array() const { } void RendererSceneRenderRD::_update_vrs(Ref<RenderSceneBuffersRD> p_render_buffers) { - if (p_render_buffers.is_valid() && vrs) { + if (p_render_buffers.is_null()) { + return; + } + + RID render_target = p_render_buffers->get_render_target(); + if (render_target.is_null()) { + // must be rendering reflection probes + return; + } + + if (vrs) { RendererRD::TextureStorage *texture_storage = RendererRD::TextureStorage::get_singleton(); - RS::ViewportVRSMode vrs_mode = texture_storage->render_target_get_vrs_mode(p_render_buffers->get_render_target()); + RS::ViewportVRSMode vrs_mode = texture_storage->render_target_get_vrs_mode(render_target); if (vrs_mode != RS::VIEWPORT_VRS_DISABLED) { RID vrs_texture = p_render_buffers->get_texture(RB_SCOPE_VRS, RB_TEXTURE); @@ -1064,7 +1074,7 @@ void RendererSceneRenderRD::render_scene(const Ref<RenderSceneBuffers> &p_render } Color clear_color; - if (p_render_buffers.is_valid()) { + if (p_render_buffers.is_valid() && p_reflection_probe.is_null()) { clear_color = texture_storage->render_target_get_clear_request_color(rb->get_render_target()); } else { clear_color = RSG::texture_storage->get_default_clear_color(); |