feat(render3d): terrain_chunk_heights - the ground's B-spline heights a chunk at a time (23.5)
n x n samples of chunk (i, j) of a size_m grid from the terrain's corner, row-major into the caller's buffer with nothing allocated, each the (1 4 1) / 6 B-spline filter of the texels under it (ter_spline_at): what ludic.physics' jph_shape_heightfield_bspline makes of the whole map, so a chunk's physics ground matches the drawn one and its neighbours' to the bit. The read-back lives for the whole map (terrain_generate to terrain_unload). examples/rendering/chunks.ludic, in the suite, checks the shared edges, a sample against the filter by hand, and a short buffer refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3915af34c2
commit
ff658633fb
5 changed files with 132 additions and 0 deletions
10
changes/render3d-chunk-heights.md
Normal file
10
changes/render3d-chunk-heights.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
bump: minor
|
||||
type: feature
|
||||
**The ground's heights a chunk at a time: `terrain_chunk_heights(i, j, size_m, n, out)`.** For
|
||||
whatever is built per chunk (plan 23.5 of maroon-lake: the physics ground by 64 m chunks): n x n
|
||||
samples of chunk (i, j) of a grid laid from the terrain's corner, row-major into the caller's
|
||||
buffer, nothing allocated. Each is the ground's cubic B-spline at the texel under it - the
|
||||
separable (1 4 1) / 6 filter `ter_spline_at`, the same numbers ludic.physics' B-spline
|
||||
heightfield makes of the whole map - so neighbouring chunks share their edges bit for bit and
|
||||
agree with the drawn ground. The read-back lives from `terrain_generate` to `terrain_unload`.
|
||||
`examples/rendering/chunks.ludic` holds it.
|
||||
Loading…
Add table
Add a link
Reference in a new issue