diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-08 23:21:52 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-08 23:21:52 +0200 |
commit | 584e5bbf84e057e0f14f5ae802da4a48e1be4e4b (patch) | |
tree | 60b3a7424aef38ee2dd36449a5184cd512821f06 | |
parent | 5a92e27bfd25648c06f754dba5f49cae1c293bc8 (diff) | |
parent | 359aaa48eea02f1fc00c746e106e83d523c8acea (diff) | |
download | redot-engine-584e5bbf84e057e0f14f5ae802da4a48e1be4e4b.tar.gz |
Merge pull request #96509 from Rudolph-B/Issue-92091
Fix OpenGL shadow textures not honoring texture type when reusing textures
-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 aab1aadf02..9b976c2206 100644 --- a/drivers/gles3/storage/light_storage.cpp +++ b/drivers/gles3/storage/light_storage.cpp @@ -1521,6 +1521,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. |