mirror of https://github.com/godotengine/godot
Merge pull request #11959 from hi-ogawa/fix-shadow-atlas-invalidation
Track LightInstance::shadow_atlases so that it will be freed properly
This commit is contained in:
commit
dda64a3de6
|
|
@ -379,6 +379,7 @@ bool RasterizerSceneGLES3::shadow_atlas_update_light(RID p_atlas, RID p_light_in
|
||||||
sh->owner = p_light_intance;
|
sh->owner = p_light_intance;
|
||||||
sh->alloc_tick = tick;
|
sh->alloc_tick = tick;
|
||||||
sh->version = p_light_version;
|
sh->version = p_light_version;
|
||||||
|
li->shadow_atlases.insert(p_atlas);
|
||||||
|
|
||||||
//make new key
|
//make new key
|
||||||
key = new_quadrant << ShadowAtlas::QUADRANT_SHIFT;
|
key = new_quadrant << ShadowAtlas::QUADRANT_SHIFT;
|
||||||
|
|
@ -414,6 +415,7 @@ bool RasterizerSceneGLES3::shadow_atlas_update_light(RID p_atlas, RID p_light_in
|
||||||
sh->owner = p_light_intance;
|
sh->owner = p_light_intance;
|
||||||
sh->alloc_tick = tick;
|
sh->alloc_tick = tick;
|
||||||
sh->version = p_light_version;
|
sh->version = p_light_version;
|
||||||
|
li->shadow_atlases.insert(p_atlas);
|
||||||
|
|
||||||
//make new key
|
//make new key
|
||||||
uint32_t key = new_quadrant << ShadowAtlas::QUADRANT_SHIFT;
|
uint32_t key = new_quadrant << ShadowAtlas::QUADRANT_SHIFT;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue