Fixed OpenGL shadow textures not honoring texture type when reusing textures

(cherry picked from commit 359aaa48ee)
This commit is contained in:
Rudolph Bester 2024-09-03 07:12:51 +02:00 committed by Rémi Verschelde
parent 1d790deedb
commit 3fac9e43af
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 5 additions and 0 deletions

View File

@ -1518,6 +1518,11 @@ bool LightStorage::_shadow_atlas_find_shadow(ShadowAtlas *shadow_atlas, int *p_i
uint64_t min_pass = 0; // Pass of the existing one, try to use the least recently used one (LRU fashion). uint64_t min_pass = 0; // Pass of the existing one, try to use the least recently used one (LRU fashion).
for (int j = 0; j < sc; j++) { for (int j = 0; j < sc; j++) {
if (sarr[j].owner_is_omni != is_omni) {
// Existing light instance type doesn't match new light instance type skip.
continue;
}
LightInstance *sli = light_instance_owner.get_or_null(sarr[j].owner); LightInstance *sli = light_instance_owner.get_or_null(sarr[j].owner);
if (!sli) { if (!sli) {
// Found a released light instance. // Found a released light instance.