mirror of
https://github.com/storytold/spark.git
synced 2026-10-11 21:40:48 +00:00
16 lines
1.3 KiB
Markdown
16 lines
1.3 KiB
Markdown
# Performance Tuning
|
|
|
|
Rendering millions of Gsplats at 60+ fps can be a demanding task, especially for mobile-class GPUs. Each Gsplat is rendered as two triangles that span the footprint of a Gaussian up to `sqrt(8)` standard deviations (default value) from the center. Each Gsplat is rendered as a transparent object and must be blended back-to-front.
|
|
|
|
As a quick rule-of-thumb, the following "Gsplat budgets" are recommended:
|
|
|
|
- Quest 3: 1 million Gsplats or less, not too many Gsplats concentrated in a small area
|
|
- Android phone: 1-2 million Gsplats
|
|
- iPhone: 1-3 million Gsplats
|
|
- Computer: 1-5 million Gsplats (10-20+ million on some desktops)
|
|
|
|
Each Gsplat incurs overhead in transforming it via SplatAccumulator for sorting and rendering, and at around 1 million Gsplats this becomes a bottleneck on some systems. Unintuitively, when a large number of Gsplats are concentrated in a small area (for example 500K Gsplats from a Trellis object at a small screen scale) they can bottleneck the GPU's rendering and blending ability.
|
|
|
|
## maxStdDev
|
|
|
|
Adjust `ForgeRenderer.maxStdDev` (either directly on `ForgeRenderer` or via constructor options) to a value less than the default `Math.sqrt(8)`. This limits the extent of the Gaussian fall-off, which by default is approx 2.8. For VR a good value is `Math.sqrt(5)`, which is perceptually very similar to the default. |