diff options
Diffstat (limited to 'servers/rendering/renderer_rd/renderer_scene_render_rd.cpp')
-rw-r--r-- | servers/rendering/renderer_rd/renderer_scene_render_rd.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp index 329deeb1ae..502ea859e2 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp @@ -1781,6 +1781,11 @@ void RendererSceneRenderRD::_free_render_buffer_data(RenderBuffers *rb) { rb->ambient_buffer = RID(); rb->reflection_buffer = RID(); } + + if (rb->gi.voxel_gi_buffer.is_valid()) { + RD::get_singleton()->free(rb->gi.voxel_gi_buffer); + rb->gi.voxel_gi_buffer = RID(); + } } void RendererSceneRenderRD::_process_sss(RID p_render_buffers, const CameraMatrix &p_camera) { |