cccluder bounds are block cells, so a model reaching outside its cell could be culled while still on screen. the frustum test already allows a 1-block model extent, but the rasterizer's one-pixel test dilation doesn't substitute for that. margin is now folded into the bounds at build time, clamped to inside the section, which costs very little cull rate. sections running a mesh appender take the whole section.
a section awaiting a remesh was tested against its last built mesh's bounds. VisibleChunkCollector only schedules rebuilds for visible sections, so one whose stale bounds tested hidden while its section box was clear was never rebuilt, and kept testing the same stale bounds. now falls back to the section box until the new mesh is put.
optimizations
BoxFinder returns once the section pass has consumed every voxel; the passes that follow emit nothing on empty input.
the camera section is visited inline and never reached rasterTest, so its walls never entered the coverage buffer. Now drawn after scene prep, before the queue.
numbers from rasterCullRerport
world / camera
before
after
SURFACE surface
10 915 (−21.3%)
10 922 (−21.3%)
SURFACE treetop
12 262 (−20.6%)
12 268 (−20.5%)
CAVES surface
10 (−99.5%)
7 (−99.6%)
CAVES high
384 (−65.8%)
384 (−65.8%)
BoxFinderBench.findBoxes:
SURFACE 82.04 ± 0.68 → 79.39 ± 0.36 µs/op
CAVES 70.54 ± 1.51 → 66.75 ± 0.58.
rasterStats SURFACE frametime still at ~0.99 ms
## fixes
- cccluder bounds are block cells, so a model reaching outside its cell could be culled while still on screen. the frustum test already allows a 1-block model extent, but the rasterizer's one-pixel test dilation doesn't substitute for that. margin is now folded into the bounds at build time, clamped to inside the section, which costs very little cull rate. sections running a mesh appender take the whole section.
- a section awaiting a remesh was tested against its last built mesh's bounds. `VisibleChunkCollector` only schedules rebuilds for visible sections, so one whose stale bounds tested hidden while its section box was clear was never rebuilt, and kept testing the same stale bounds. now falls back to the section box until the new mesh is put.
## optimizations
- `BoxFinder` returns once the section pass has consumed every voxel; the passes that follow emit nothing on empty input.
- the camera section is visited inline and never reached `rasterTest`, so its walls never entered the coverage buffer. Now drawn after scene prep, before the queue.
## numbers from `rasterCullRerport`
| world / camera | before | after |
|---|---|---|
| SURFACE surface | 10 915 (−21.3%) | 10 922 (−21.3%) |
| SURFACE treetop | 12 262 (−20.6%) | 12 268 (−20.5%) |
| CAVES surface | 10 (−99.5%) | 7 (−99.6%) |
| CAVES high | 384 (−65.8%) | 384 (−65.8%) |
`BoxFinderBench.findBoxes`:
- SURFACE 82.04 ± 0.68 → 79.39 ± 0.36 µs/op
- CAVES 70.54 ± 1.51 → 66.75 ± 0.58.
`rasterStats` SURFACE frametime still at ~0.99 ms
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
fixes
VisibleChunkCollectoronly schedules rebuilds for visible sections, so one whose stale bounds tested hidden while its section box was clear was never rebuilt, and kept testing the same stale bounds. now falls back to the section box until the new mesh is put.optimizations
BoxFinderreturns once the section pass has consumed every voxel; the passes that follow emit nothing on empty input.rasterTest, so its walls never entered the coverage buffer. Now drawn after scene prep, before the queue.numbers from
rasterCullRerportBoxFinderBench.findBoxes:rasterStatsSURFACE frametime still at ~0.99 msae37aa9959to32bda10337