wip(L6, side branch): screen-space far gate; no-op cutoff removed; cost within noise vs L4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ED33VnqepD4YY6gDAAA832
This commit is contained in:
1 parent
b21a19d561
commit
aa67bd31f5
13 files changed
+474
-615
No files matched your search
@@ -646,16 +646,14 @@ public:
|
||||
int32 GetWorkerCount()const{return WorkerCount;}
|
||||
uint64 GetCacheHits()const{return CacheHitCount.load(std::memory_order_relaxed);}
|
||||
|
||||
void SetVisualDetailCutoffBudgets(const std::array<std::int64_t,9>& Budgets,bool Apply)
|
||||
{VisualDetailBudgetSubvoxels=Budgets;bEnableVisualDetailCutoff=true;bApplyVisualDetailCutoff=Apply;}
|
||||
void SetVisualDetailProfilingEnabled(bool Enabled)
|
||||
{bProfileVisualDetailOctaves=Enabled;}
|
||||
void SetMesherStageProfilingEnabled(bool Enabled)
|
||||
{bProfileMesherStages=Enabled;}
|
||||
FStandaloneCpuTile GenerateDiagnostic(const FVoxelTileKey& Key,
|
||||
std::uint32_t GlobalOctaveDrop=0,std::uint32_t CellStride=1,
|
||||
bool ForceExactVisualDetail=false)
|
||||
bool ForceGenerate=false)
|
||||
{
|
||||
FStandaloneTileJob Job;Job.Key=Key;Job.StartedAt=FClock::now();Job.QueuedAt=Job.StartedAt;
|
||||
return Generate(Job,GlobalOctaveDrop,CellStride,0,ForceExactVisualDetail);
|
||||
return Generate(Job,GlobalOctaveDrop,CellStride,ForceGenerate);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -775,13 +773,12 @@ private:
|
||||
}
|
||||
FStandaloneCpuTile Generate(const FStandaloneTileJob& Job,
|
||||
std::uint32_t DiagnosticGlobalOctaveDrop=0,std::uint32_t DiagnosticCellStride=1,
|
||||
std::int64_t DiagnosticVisualBudgetSubvoxels=0,
|
||||
bool ForceExactVisualDetail=false)
|
||||
bool ForceGenerate=false)
|
||||
{
|
||||
const auto StartTime=Job.StartedAt;
|
||||
FStandaloneCpuTile Out;Out.Key=Job.Key;Out.RequestedCrossing=Job.RequestedCrossing;
|
||||
Out.QueuedAt=Job.QueuedAt;Out.StartedAt=Job.StartedAt;
|
||||
if(MeshCache&&!ForceExactVisualDetail)
|
||||
if(MeshCache&&!ForceGenerate)
|
||||
{
|
||||
if(const FStandaloneCpuTile* Cached=MeshCache->Find(Job.Key))
|
||||
{
|
||||
@@ -820,19 +817,9 @@ private:
|
||||
Options.skipMaterialGroups=bSkipMaterialGroups;Options.skipUv=bSkipUV;Options.skipColors=bSkipColors;
|
||||
Options.captureColumnCoordinates=bCaptureColumnCoordinates;
|
||||
Options.lod8HorizonInteriorStepVoxels=Lod8HorizonInteriorStepVoxels;
|
||||
Options.visualDetailPixelBudgetSubvoxels=DiagnosticVisualBudgetSubvoxels;
|
||||
if(DiagnosticVisualBudgetSubvoxels==0&&bEnableVisualDetailCutoff
|
||||
&&Level>=3&&Level<static_cast<int32>(VisualDetailBudgetSubvoxels.size()))
|
||||
Options.visualDetailPixelBudgetSubvoxels=
|
||||
VisualDetailBudgetSubvoxels[static_cast<std::size_t>(Level)];
|
||||
Options.visualDetailSampleStepVoxels=FMath::Max(1,Extent/Cells);
|
||||
Options.profileVisualDetailOctaves=bProfileVisualDetailOctaves&&!ForceExactVisualDetail;
|
||||
Options.visualDetailCutoffEnabled=bApplyVisualDetailCutoff
|
||||
&&!ForceExactVisualDetail&&Level>=3
|
||||
&&Options.visualDetailPixelBudgetSubvoxels>0;
|
||||
Options.visualDetailContractVersion=Options.visualDetailCutoffEnabled
|
||||
?VoxelForgeCore::CurrentVisualDetailCutoffContractVersion:0;
|
||||
Options.profileMesherStages=bProfileMesherStages&&!ForceGenerate;
|
||||
Options.diagnosticGlobalOctaveDrop=DiagnosticGlobalOctaveDrop;
|
||||
Options.diagnosticCellStride=std::max<std::uint32_t>(1,DiagnosticCellStride);
|
||||
Options.diagnosticColumnInterpolationStride=
|
||||
std::max<std::uint32_t>(1,DiagnosticCellStride);
|
||||
std::string Error;
|
||||
@@ -1007,10 +994,7 @@ private:
|
||||
bool bSkipColors=false;
|
||||
bool bCaptureColumnCoordinates=false;
|
||||
int32 Lod8HorizonInteriorStepVoxels=0;
|
||||
std::array<std::int64_t,9> VisualDetailBudgetSubvoxels{};
|
||||
bool bEnableVisualDetailCutoff=false;
|
||||
bool bApplyVisualDetailCutoff=false;
|
||||
bool bProfileVisualDetailOctaves=false;
|
||||
bool bProfileMesherStages=false;
|
||||
std::atomic<uint64> CacheHitCount{0};
|
||||
mutable std::mutex Mutex;
|
||||
std::condition_variable Wake;
|
||||
|
||||
Reference in new issue
Block a user