Bläddra i källkod

Merge pull request #96509 from Rudolph-B/Issue-92091

Fix OpenGL shadow textures not honoring texture type when reusing textures
Rémi Verschelde 1 år sedan
förälder
incheckning
584e5bbf84
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. 5 0
      drivers/gles3/storage/light_storage.cpp

+ 5 - 0
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.