render3d: the terrain's questions never page - ter_h and ter_o read a resident tile in place and any other through the file scratch (heights and now the photograph, four tiles each, sized when the tiles open, forgotten when they close), so terrain_height, _smooth, terrain_ortho, the chunk heightfields, ground_fill, grass, water and shadow no longer take slots or move the clock. Only the loaders page: tp_fill reads through tt_h_load / tt_n_load / tt_o_load, and terrain_tiles_prefetch as before. terrain_height_file is now terrain_height, kept as the name callers wrote against. No answer changes: every read was already the whole copy's texel. tests/height_file_test: heights and photograph equal the texels written, resident or not; a whole-map sweep of the questions, and a ground layer's fill over the map (a one-layer LGD2 written in the test), leave the slots, their contents, the clock and the read counts unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-30 02:43:17 +03:00
parent 2288feeb59
commit 130b9091d1
6 changed files with 249 additions and 101 deletions

View file

@ -18,8 +18,8 @@ function tp_fill(render3d_st: mut Render3dState, t: int, base: int, k: int) -> v
for a in 0 .. hs {
let tx = min(max(i0 + a, 0), TERRAIN_RES - 1)
let o = (b * hs + a) * 4
Vk.put_i32(p, ho + o, float_bits(ter_h(render3d_st, tx, tz)))
Vk.put_i32(p, no + o, ter_n(render3d_st, tx, tz))
Vk.put_i32(p, ho + o, float_bits(tt_h_load(render3d_st, tx, tz)))
Vk.put_i32(p, no + o, tt_n_load(render3d_st, tx, tz))
}
}
tp_fill_ortho(render3d_st, t, base + n * n * 4 + 2 * TP_BUDGET * hb, k)
@ -38,7 +38,7 @@ function tp_fill_ortho(render3d_st: mut Render3dState, t: int, at: int, k: int)
for b in 0 .. os {
let pz = min(max(j0 + b, 0), top)
for a in 0 .. os {
let v = ter_o(render3d_st, min(max(i0 + a, 0), top), pz)
let v = tt_o_load(render3d_st, min(max(i0 + a, 0), top), pz)
let o = o0 + (b * os + a) * 4
p[o] = (v >> 16) & 255
p[o + 1] = (v >> 8) & 255