code wiki / (root) / nx_nxa_texbake_region_gate.nx

nx_nxa_texbake_region_gate.nx

buildroot/runtime/nx_nxa_texbake_region_gate.nx

20724 B359 linesdepth 8pulls 31 transitivereach 0 importersview sourcekind gate/prooftopic nxa
docsdependenciesstructsconstsfunctions

about

nx_nxa_texbake_region_gate.nx -- GATE for the per-region skin atlas + periodic micro-relief tile (TEXR), /compare/graphics GR29 gpe_skin_microsurface asset half (2026-08-30). WHAT IT PROVES, and the operator's bar it answers ("make sure we aren't just doing more smooth surface painting"): the relief is GEOMETRY. Every relief tooth below measures a HEIGHT field in microns or a normal DERIVED from one, never a colour. In-process over the SAME implementation the CLI ships (nx_nxa_texbake_region_lib), on the SHIPPED asset (gv_need), with runtime fixtures in /tmp/<gate>/. structural (res 256, all regions): TEXR appended additively, TEXM byte-identical, every prior section carried with its wordlen, 4 sets, adequacy predicate, idempotent, deterministic, seed-grain live, neg-control: sets disabled FAILS adequacy. geometry-not-paint (the micro tile, 480 px = 24mm): mean slope of the full-band tile exceeds the primary-only SMOOTH CONTROL by a factor derived from the band law; the dominant pore period measured on the height field equals the law's 800um pitch within one texel, and the smooth control has NO pits; the tile is exactly periodic; the normal map re-derives byte-for-byte from the height. anatomy (torso set at 2048 through the lib's probes): albedo at the mesh-derived apex darker than the skin ring by the ledger's lightness step; the estate's own nx_areola_pigment referee returns MATCH on the baked disc; height relief inside the areola exceeds the control ring outside. tension: no stretch field exists in the asset -- named as the next contract, not faked. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_nxa_texbake_region_lib.nx nx_gate_verdict.nx nx_image.nx nx_areola_pigment.nx nx_nxa_texbake_region_gate.nx

imports: nx_syscalls.nxnx_nxa_texbake_region_lib.nxnx_gate_verdict.nxnx_image.nxnx_areola_pigment.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mkdir sys_unlinkat rg_exists sys_openat_rd sys_close gv_check gv_puts ↻ gv_need gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap

structs

none

consts

26const RG_DIR: *u8 = "/tmp/nx_nxa_texbake_region_gate"
27const RG_OUT_A: *u8 = "/tmp/nx_nxa_texbake_region_gate/a.nxa"
28const RG_OUT_A2: *u8 = "/tmp/nx_nxa_texbake_region_gate/a2.nxa"
29const RG_OUT_B: *u8 = "/tmp/nx_nxa_texbake_region_gate/b.nxa"
30const RG_OUT_C: *u8 = "/tmp/nx_nxa_texbake_region_gate/c.nxa"
31const RG_OUT_T: *u8 = "/tmp/nx_nxa_texbake_region_gate/t.nxa"
32const RG_ASSET: *u8 = "sites/nishifamily/world/ref9d.nxa"
33const RG_MODEDIR: i64 = 493
34const RG_RES_STRUCT: i64 = 256
35const RG_RES_PROBE: i64 = 2048
36const RG_SEED_A: i64 = 7
37const RG_SEED_B: i64 = 8
38const RG_HDR: i64 = 32
39const RG_TOCE: i64 = 32
40const RG_WORD: i64 = 8
41const RG_E3: i64 = 1000
46const RG_TILT_BAR_NUM: i64 = 1
47const RG_TILT_BAR_DEN: i64 = 2
49const RG_DL_NUM: i64 = 3
50const RG_DL_DEN: i64 = 4
52const RG_RELIEF_FACTOR: i64 = 2
54const RG_RING_LO: i64 = 3
55const RG_RING_HI: i64 = 6

functions

57func rg_flen(path: *u8, bout: *i64) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
64func rg_exists(path: *u8) -> i64
called by 1: main calls 2: sys_openat_rdsys_close
70func rg_nsec(b: *u8) -> i64 { return nt_rd64(b, 16) }
called by 2: rg_tocmain calls 1: nt_rd64
72func rg_toc(b: *u8, tag: *u8) -> i64
called by 2: rg_payload_eqmain calls 2: rg_nsecnt_tageq
78func rg_wl(b: *u8, s: i64) -> i64 { return nt_rd64(b, RG_HDR + s*RG_TOCE + 16) }
called by 2: rg_payload_eqmain calls 1: nt_rd64
79func rg_off(b: *u8, s: i64) -> i64 { return nt_rd64(b, RG_HDR + s*RG_TOCE + 8) }
called by 1: rg_payload_eq calls 1: nt_rd64
81func rg_payload_eq(b1: *u8, b2: *u8, tag: *u8) -> i64
called by 1: main calls 3: rg_tocrg_wlrg_off
94func rg_texr_nsets(b: *u8, flen: i64) -> i64
called by 1: main calls 1: ntr_texr_find
101func main() -> i64