summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/storage_rd
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2022-09-13 17:49:32 +1000
committerBastiaan Olij <mux213@gmail.com>2022-09-13 17:49:32 +1000
commit873366cb2db14a93cb84306cee1d635ab2726b77 (patch)
treed6d79f9042287b9560052ae6c42fd2b3459f7a45 /servers/rendering/renderer_rd/storage_rd
parent16228ba3e27b57df48256fcdf34670a25b3d52b0 (diff)
Fix uniform buffer being created every frame is SSAO and SSIL half_size is different
Diffstat (limited to 'servers/rendering/renderer_rd/storage_rd')
-rw-r--r--servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp b/servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp
index 84b65371e0..16fdbc07f5 100644
--- a/servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp
@@ -128,6 +128,11 @@ void RenderSceneBuffersRD::cleanup() {
ss_effects.linear_depth_slices.clear();
}
+ if (ss_effects.downsample_uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(ss_effects.downsample_uniform_set)) {
+ RD::get_singleton()->free(ss_effects.downsample_uniform_set);
+ ss_effects.downsample_uniform_set = RID();
+ }
+
sse->ssao_free(ss_effects.ssao);
sse->ssil_free(ss_effects.ssil);
sse->ssr_free(ssr);