Skip to content

Commit

Permalink
Properly free reflection probe atlas
Browse files Browse the repository at this point in the history
  • Loading branch information
clayjohn committed Mar 1, 2020
1 parent 2a15304 commit a422b8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a422b8c

Please sign in to comment.