code wiki / _hdl_build / nx_assetvariant_gate.nx
nx_assetvariant_gate.nx
buildroot/runtime/_hdl_build/nx_assetvariant_gate.nx
about
nx_assetvariant_gate.nx -- prove SWAP-AS-DATA v0: ONE part-recipe system emits MANY distinct creature/person
variants by swapping slots (species x head x ears x tail x build), all rendered on the SAME photoreal-path
shader into a 4x3 CONTACT SHEET (the DnD bestiary card). Asserts:
T1 every variant visibly renders (foreground coverage per tile)
T2 all 12 variant tiles are pairwise DISTINCT (diversity is real, not one blob)
T3 a HEAD-SLOT-ONLY swap changes the render (plain vs horns on the same base = the swap works)
T4 species swap changes the render (human vs wolf)
Writes knowledge/synth_variants.png (384x216 sheet). license_tier: ORIGINAL expect_exit: 0
dependencies 7 imports · 0 importers
imports: nx_syscalls.nxnx_sdfrender.nxnx_assetvariant.nxnx_itrig.nxnx_gate_verdict.nxnx_png.nxnx_critvis_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 17 | const AV_GATE_ROWS: i64 = 5 |
| 34 | const SW: i64 = 384 |
| 35 | const SH: i64 = 216 |
| 36 | const TW: i64 = 96 |
| 37 | const TH: i64 = 72 |
| 38 | const TFOCAL: i64 = 109 // 586 * 96 / 512 (same FOV as production) |
functions
| 21 | func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 22 | func pn(v: i64) -> i64 |
| 41 | func tile_render(base: i64, fb: *i64, tx0: i64, ty0: i64) -> i64 |
| 73 | func tile_cksum(fb: *i64, tx0: i64, ty0: i64) -> i64 called by 1: main |
| 87 | func tile_fg(fb: *i64, tx0: i64, ty0: i64) -> i64 |
| 103 | func main() -> i64 |