code wiki / _hdl_build / nx_assetvariant_gate.nx

nx_assetvariant_gate.nx

buildroot/runtime/_hdl_build/nx_assetvariant_gate.nx

10413 B219 linesdepth 4pulls 9 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_sdfrender.nx nx_assetvariant.nx nx_itrig.nx nx_gate_verdict.nx nx_png.nx nx_critvis_lib.nx nx_assetvariant_gate.nx

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

main hw sys_write sys_mmap sdf_bytes av_build sys_mmap ↻ av_base_human av_p av_base_wolf av_p ↻ av_base_goblin av_p ↻ av_slot_head av_p ↻ av_slot_ears av_p ↻ av_slot_tail av_p ↻ sdf_clear_ops tile_render it_cos4096 it_sin4096 it_sin4096 ↻ sdf_isqrt sdf_shade_ray sdf_eval sdf_ellip sdf_isqrt ↻ sdf_ellip_rot sdf_isqrt ↻ sdf_smax sdf_smin sdf_abs sdf_min sdf_smin ↻ sdf_isqrt ↻ sdf_softshadow sdf_eval ↻ sdf_gi

structs

none

consts

17const AV_GATE_ROWS: i64 = 5
34const SW: i64 = 384
35const SH: i64 = 216
36const TW: i64 = 96
37const TH: i64 = 72
38const TFOCAL: i64 = 109 // 586 * 96 / 512 (same FOV as production)

functions

21func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
22func pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
41func tile_render(base: i64, fb: *i64, tx0: i64, ty0: i64) -> i64
73func tile_cksum(fb: *i64, tx0: i64, ty0: i64) -> i64
called by 1: main
87func tile_fg(fb: *i64, tx0: i64, ty0: i64) -> i64
called by 1: main calls 1: cv_pl
103func main() -> i64