code wiki / _hdl_build / nx_retarget_showcase.nx

nx_retarget_showcase.nx

buildroot/runtime/_hdl_build/nx_retarget_showcase.nx

8867 B208 linesdepth 4pulls 10 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_retarget_showcase.nx -- NATIVE-TIER emit of the RETARGETED being (debt 1785902400: capability emits from nishi, not JS) for /compare/koikatsu (operator 2026-08-04, frank feedback: "we have no colors, we have a clay blob, no sense of human form"). The clay was the COARSE single-mesh export rendered with every quality feature OFF. This organ renders the being the estate can already build: DENSE atlas skin (GC=9, 2x the scene gate), per-part vertex colors (ba_part_color), Gouraud + Blinn-Phong specular + baked sun shadows + multi-octave albedo, SSAA still, plus a TOON still (posterize + z-edge lines = the cel-shade R rung, first bit native) and the lit turntable APNG. Writes STRAIGHT into the page dir (run from ~/nishihost). Composes nx_bodyatlas + nx_isosurf + nx_trimesh + nx_png + nx_apng_write -- zero foreign code. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_png.nx nx_trimesh.nx nx_isosurf.nx nx_bodyatlas.nx nx_apng_write.nx nx_retarget_showcase.nx

imports: nx_syscalls.nxnx_png.nxnx_trimesh.nxnx_isosurf.nxnx_bodyatlas.nxnx_apng_write.nx

imported by: nobody (leaf or entry point)

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

main bs_w sys_write ba_set_axes atlas_build ba_add sys_mmap ba_axis_x ba_ax_defaults ba_is_arm ba_is_leg ba_axis_y ba_ax_defaults ↻ ba_is_arm ↻ ba_knee_y ba_ax_defaults ↻ ba_max it_sin4096 it_cos4096 it_sin4096 ↻ ba_rig_setup sys_mmap ↻ ba_ax_defaults ↻ ba_nin atlas_sync_pose it_sin4096 ↻ it_cos4096 ↻ sys_mmap ↻ ba_fwd_fk sys_mmap ↻ fill_grid ba_sdf ba_part_sdf ba_isqrt ba_min ba_smin tm_reset sys_mmap ↻ surface_nets sys_mmap ↻

structs

none

consts

15const NB_MAGIC_1231: i64 = 1231
16const NB_MAGIC_1403: i64 = 1403
17const NB_MAGIC_1067: i64 = 1067
18const NB_MEASURED_CALF_1179: i64 = 1179 // theirs/ours fx1024 via the converged-thigh derivation (see nx_retarget_emit)
19const NB_MAGIC_1024: i64 = 1024
20const NB_MAGIC_2400: i64 = 2400
21const NB_MAGIC_1500: i64 = 1500
22const NB_MAGIC_2600: i64 = 2600
24const NB_W: i64 = 360
25const NB_H: i64 = 552
26const TT_W: i64 = 240
27const TT_H: i64 = 368
28const TT_FRAMES: i64 = 18
29const NB_BG: i64 = 24 + 26*256 + 34*65536
30const NB_MAGIC_65536: i64 = 65536
31const NB_ZFAR: i64 = 1999999999
32const NB_EDGE: i64 = 45
33const NB_LINE: i64 = 20 + 22*256 + 28*65536
34const NB_SKIN: i64 = 234 + 192*256 + 170*65536
35const NB_YAW: i64 = 450
36const NB_PITCH: i64 = 0-150
37const NB_CAMZ: i64 = 2600
38const NB_FOCAL: i64 = 780
39const NB_CIRCLE: i64 = 6283
41const GX: i64 = 64
42const GY: i64 = 220
43const GZ: i64 = 40
44const GC: i64 = 9
45const OX: i64 = 0-288
46const OY: i64 = 0-990
47const OZ: i64 = 0-180

functions

50func bs_w(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 2: bs_skin_paintmain calls 1: sys_write
51func bs_num(v: i64) -> i64
called by 2: bs_skin_paintmain calls 2: sys_mmapsys_write
63func fill_grid(mask: i64) -> i64
called by 1: main calls 1: ba_sdf
72func bs_skin_paint() -> i64
called by 1: main calls 4: tm_nvbs_wbs_numtm_vcol
86func bs_toon(fb: *i64, zb: *i64, W: i64, H: i64) -> i64
called by 1: main
135func main() -> i64