diff options
author | Rudolph Bester <Rudolph.f.Bester@gmail.com> | 2024-09-03 07:12:51 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-17 08:57:44 +0200 |
commit | 3fac9e43af2ff81bf1882193c1f26dabd431551d (patch) | |
tree | fda625bf2250b933cb576a7da28b1e680d792751 /drivers/gles3 | |
parent | 1d790deedb53c5b7f82ab225c74829284436484a (diff) | |
download | redot-engine-3fac9e43af2ff81bf1882193c1f26dabd431551d.tar.gz |
Fixed OpenGL shadow textures not honoring texture type when reusing textures
(cherry picked from commit 359aaa48eea02f1fc00c746e106e83d523c8acea)
Diffstat (limited to 'drivers/gles3')
-rw-r--r-- | drivers/gles3/storage/light_storage.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gles3/storage/light_storage.cpp b/drivers/gles3/storage/light_storage.cpp index f9547502f4..e0daa2dc29 100644 --- a/drivers/gles3/storage/light_storage.cpp +++ b/drivers/gles3/storage/light_storage.cpp @@ -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). 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); if (!sli) { // Found a released light instance. |