From a422b8c497b126d6cd01c75f04f7d544c09f6e3c Mon Sep 17 00:00:00 2001 From: clayjohn Date: Sat, 29 Feb 2020 23:26:57 -0800 Subject: Properly free reflection probe atlas --- servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp index bfe98857d9..4a78fa89ba 100644 --- a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp +++ b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp @@ -653,8 +653,11 @@ void RasterizerSceneRD::reflection_atlas_set_size(RID p_ref_atlas, int p_reflect //clear and invalidate everything RD::get_singleton()->free(ra->reflection); ra->reflection = RID(); + RD::get_singleton()->free(ra->depth_buffer); + ra->depth_buffer = RID(); for (int i = 0; i < ra->reflections.size(); i++) { + _clear_reflection_data(ra->reflections.write[i].data); if (ra->reflections[i].owner.is_null()) { continue; } -- cgit v1.2.3