perf(core): FI LOD0 attribution, exact Z-inner traversal; fix a mesh gap at the passage shaft foot (L57); R26
Sampled cycle attribution of FI LOD0 field work: grid fill 83%, boundary 13%, skirts 4%; island roots, columns and helix dominate, the column cache path is real but secondary (no thrashing). FI-only Z-inner traversal at LOD0 (same lattice samples, exact) cuts FI whole view 5.35 -> 5.03 s and moving p50 by 12%; global Z-inner and <=4-island culling were measured and rejected. The meshing band now includes the planned passage support column's conservative bounds, closing a real gap where the arrival shaft meets the floor (WorldAssemblyEvaluatorVersion 208 -> 209). fast/medium/full PASS, Clang and GCC. Research R26 (self-checked): native lattice (maze/shaft) generator design. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
1 parent
4e64b75044
commit
1e3e04bbac
14 files changed
+777
-48
No files matched your search
@@ -8,6 +8,7 @@
|
||||
#include "VoxelDensityPrimitives.h"
|
||||
#include "VoxelForgeCore/VoxelForgeCore.h"
|
||||
#include "VoxelForgeFieldShared.h"
|
||||
#include "VoxelForgeCore/FloatingIslandInstrumentation.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
@@ -414,6 +415,12 @@ public:
|
||||
return FindBoundStratumForChunk(FMath::FloorToInt(Z/LayoutWidth));
|
||||
}
|
||||
|
||||
bool IsFloatingIslandFieldAtZ(float Z) const
|
||||
{
|
||||
const FBoundStratumField* Bound=FindBoundStratumForZ(Z);
|
||||
return Bound&&Bound->Kind==FBoundStratumField::EKind::FloatingIslands;
|
||||
}
|
||||
|
||||
const FBoundStratumField* FindBoundStratumForManagerZ(float Z) const
|
||||
{
|
||||
if(!std::isfinite(Z)||!Owner||!(BoundManagerLayoutChunkWidthVoxels>0.0f))
|
||||
@@ -6139,6 +6146,7 @@ private:
|
||||
const auto* FieldAdapter=std::get_if<FFloatingIslandFieldAdapter>(
|
||||
&Bound->Evaluator);
|
||||
if(!FieldAdapter||!FieldAdapter->Evaluator.isValid())return false;
|
||||
VoxelForgeCore::floating_island_detail::FScopedIslandAttributionSample attributionSample;
|
||||
constexpr double Scale=static_cast<double>(VoxelForgeCore::WorldAssemblySubvoxelsPerVoxel);
|
||||
constexpr double Maximum=1000000000000.0/Scale;
|
||||
if(std::abs(static_cast<double>(X))>Maximum||std::abs(static_cast<double>(Y))>Maximum
|
||||
@@ -6266,8 +6274,12 @@ private:
|
||||
}
|
||||
if(mouthFilterWeight>0.0)
|
||||
{
|
||||
VoxelForgeCore::floating_island_detail::FScopedIslandAttributionTimer mouthFilterTimer(
|
||||
VoxelForgeCore::floating_island_detail::EIslandAttributionBucket::MouthFilter);
|
||||
constexpr std::int64_t FilterStep=8*VoxelForgeCore::WorldAssemblySubvoxelsPerVoxel;
|
||||
std::int64_t weightedSum=0;
|
||||
VoxelForgeCore::floating_island_detail::FScopedIslandFieldCaller passageFilterCaller(
|
||||
VoxelForgeCore::floating_island_detail::EIslandFieldCaller::PassageFilter);
|
||||
for(int dz=-1;dz<=1;++dz)
|
||||
for(int dy=-1;dy<=1;++dy)
|
||||
for(int dx=-1;dx<=1;++dx)
|
||||
@@ -6306,6 +6318,8 @@ private:
|
||||
{
|
||||
bool surroundedByAir=true;
|
||||
std::int64_t minimumAirDensity=std::numeric_limits<std::int64_t>::max();
|
||||
VoxelForgeCore::floating_island_detail::FScopedIslandFieldCaller passageFilterCaller(
|
||||
VoxelForgeCore::floating_island_detail::EIslandFieldCaller::PassageFilter);
|
||||
for(std::size_t axis=0;axis<3&&surroundedByAir;++axis)
|
||||
for(const int sign:{-1,1})
|
||||
{
|
||||
@@ -6323,6 +6337,8 @@ private:
|
||||
if(surroundedByAir)Density=std::max(Density,minimumAirDensity);
|
||||
}
|
||||
}
|
||||
VoxelForgeCore::floating_island_detail::FScopedIslandAttributionTimer boundaryTimer(
|
||||
VoxelForgeCore::floating_island_detail::EIslandAttributionBucket::Boundary);
|
||||
const std::int64_t Bottom=Plan->manifest.recipe.layoutMinimumZSubvoxels;
|
||||
const std::int64_t Top=Plan->manifest.recipe.layoutMaximumZSubvoxels;
|
||||
const std::int64_t Seal=Plan->manifest.recipe.boundarySealSubvoxels;
|
||||
|
||||
Reference in new issue
Block a user