FTI - Fix SceneTreeFTI depth limit behaviour

Fixes off by one bug, and increases the limit slightly.
This commit is contained in:
lawnjelly
2025-10-09 10:38:10 +01:00
parent 8c10cd6646
commit 758bc38071
2 changed files with 2 additions and 2 deletions

View File

@ -283,7 +283,7 @@ void SceneTreeFTI::_create_depth_lists() {
// This shouldn't happen, but wouldn't be terrible if it did.
DEV_ASSERT(depth >= 0);
depth = MIN(depth, (int32_t)data.scene_tree_depth_limit);
depth = MIN(depth, (int32_t)data.scene_tree_depth_limit - 1);
LocalVector<Spatial *> &dest_list = data.dirty_spatial_depth_lists[depth];
#ifdef GODOT_SCENE_TREE_FTI_EXTRA_CHECKS

View File

@ -80,7 +80,7 @@ class SceneTreeFTI {
};
struct Data {
static const uint32_t scene_tree_depth_limit = 32;
static const uint32_t scene_tree_depth_limit = 48;
// Prev / Curr lists of spatials having local xforms pumped.
LocalVector<Spatial *> tick_xform_list[2];