Skip to content

Commit a88785b

Browse files
committed
demo: Add ideal DAG depth metric
This helps, at a glance, to see if the DAG is truncated early or is too deep compared to the "optimal" depth. The optimal depth by itself is not necessarily a good target to chase, as long as the real depth is within a couple levels the DAG should be just fine.
1 parent d909484 commit a88785b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

demo/nanite.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,8 @@ void nanite(const std::vector<Vertex>& vertices, const std::vector<unsigned int>
549549
xformed_initial += measureUnique(parents, clusters[i].indices);
550550
}
551551

552+
printf("ideal lod chain: %.1f levels\n", log2(double(indices.size() / 3) / double(kClusterSize)));
553+
552554
printf("lod 0: %d clusters (%.1f tri/cl, %.1f vtx/cl, %.2f connected), %d triangles\n",
553555
int(clusters.size()),
554556
double(indices.size() / 3) / double(clusters.size()),

0 commit comments

Comments
 (0)