render3d: place_rec.ludic, the one encoder and decoder of a baked placement
prec_put / prec_get / prec_size (Physics' spec): PREC_FULL, 12 bytes, for trees, boulders and stones (u16 x, z in 1/65536 of the chunk; u16 y in cm above y_base; u8 scale over the kind's lo..hi, yaw, seed, wind), and PREC_PACKED, 7 bytes, for the stream kinds (56 bits, least significant first: x 12, z 12, y 12 in cm, scale 6, yaw 6, seed 4, wind 4). An encode takes the cell a value falls in, a decode its centre, so a round trip is stable; a record is read from a []byte at an offset, never a pointer. stream_emit_baked and layer_chunk_put take (recs, at, fmt) and decode through it; the earlier sb7_* pair is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3f0bb07c16
commit
8589a5a7b4
6 changed files with 86 additions and 58 deletions
|
|
@ -829,6 +829,7 @@ export state Render3dState {
|
|||
ter_ortho_tex: int = 0 # a photograph of the same window, draped with distance
|
||||
ter_carpet: int = 0 # the distant-grass carpet (carpet_bake), 0 = none
|
||||
ter_shadow_tex: int = 0 # height-field sun shadow: R32F, the lowest lit height
|
||||
sb_rec: floats = floats(8) # one decoded baked record, reused (stream_baked.ludic)
|
||||
tt_dir: string = "" # terrain_tiles_to: where a map's tiles are written ("" keeps the whole copies)
|
||||
tt_key: string = ""
|
||||
tt_file: pointer = null # the tiles' file, open for reading (terrain_tiles.ludic)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue