@@ -424,7 +424,7 @@ namespace lfs::core {
424424 constexpr size_t BYTES_PER_GAUSSIAN = 3 * 4 + 1 * 3 * 4 + 3 * 4 + 4 * 4 + 1 * 4 ;
425425 const size_t saved_mb = getTotalGaussianCount () * BYTES_PER_GAUSSIAN / (1024 * 1024 );
426426 LOG_INFO (" Consolidated {} nodes, saved ~{} MB VRAM" , consolidated, saved_mb);
427- notifyMutation (MutationType::MODEL_CHANGED );
427+ notifyMutation (MutationType::VISIBILITY_CHANGED );
428428 }
429429
430430 return consolidated;
@@ -439,7 +439,7 @@ namespace lfs::core {
439439 mask.reserve (consolidated_node_ids_.size ());
440440 for (const NodeId id : consolidated_node_ids_) {
441441 if (const auto * node = getNodeById (id)) {
442- mask.push_back (node->visible . get ( ));
442+ mask.push_back (isNodeEffectivelyVisible ( node->id ));
443443 } else {
444444 mask.push_back (true );
445445 }
@@ -859,6 +859,15 @@ namespace lfs::core {
859859 return ;
860860
861861 cached_transforms_.clear ();
862+ if (consolidated_ && !consolidated_node_ids_.empty ()) {
863+ cached_transforms_.reserve (consolidated_node_ids_.size ());
864+ for (const NodeId id : consolidated_node_ids_) {
865+ cached_transforms_.push_back (getWorldTransform (id));
866+ }
867+ transform_cache_valid_.store (true , std::memory_order_release);
868+ return ;
869+ }
870+
862871 for (const auto & node : nodes_) {
863872 if (node->model && isNodeEffectivelyVisible (node->id )) {
864873 cached_transforms_.push_back (getWorldTransform (node->id ));
@@ -921,6 +930,7 @@ namespace lfs::core {
921930 int Scene::getVisibleNodeIndex (const NodeId node_id) const {
922931 if (node_id == NULL_NODE )
923932 return -1 ;
933+
924934 int index = 0 ;
925935 for (const auto & node : nodes_) {
926936 if (!node->visible || !node->model )
0 commit comments