summaryrefslogtreecommitdiffstats
path: root/servers/rendering/renderer_rd/storage_rd/light_storage.cpp
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2024-05-03 17:11:05 -0700
committerclayjohn <claynjohn@gmail.com>2024-05-03 17:11:05 -0700
commitcaeef3473bfc0168f275a973aa8f0b703d40c6ef (patch)
treef3fbc75d673cf9b713ab516086e5070ccac173c0 /servers/rendering/renderer_rd/storage_rd/light_storage.cpp
parent03e6fbb010c3546593bd91a0dabc045a9882705a (diff)
downloadredot-engine-caeef3473bfc0168f275a973aa8f0b703d40c6ef.tar.gz
Properly set size of shadow atlas quadrant when subdivision is 8 or higher.
Also fix renderpass rect validation
Diffstat (limited to 'servers/rendering/renderer_rd/storage_rd/light_storage.cpp')
-rw-r--r--servers/rendering/renderer_rd/storage_rd/light_storage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/light_storage.cpp b/servers/rendering/renderer_rd/storage_rd/light_storage.cpp
index d1ff9fc362..3d294ca8cb 100644
--- a/servers/rendering/renderer_rd/storage_rd/light_storage.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/light_storage.cpp
@@ -2025,7 +2025,7 @@ void LightStorage::shadow_atlas_set_size(RID p_atlas, int p_size, bool p_16_bits
for (int i = 0; i < 4; i++) {
//clear subdivisions
shadow_atlas->quadrants[i].shadows.clear();
- shadow_atlas->quadrants[i].shadows.resize(int64_t(1) << int64_t(shadow_atlas->quadrants[i].subdivision));
+ shadow_atlas->quadrants[i].shadows.resize(int64_t(shadow_atlas->quadrants[i].subdivision * shadow_atlas->quadrants[i].subdivision));
}
//erase shadow atlas reference from lights