code wiki / _hdl_build / nx_anat_sov.nx

nx_anat_sov.nx

buildroot/runtime/_hdl_build/nx_anat_sov.nx

48728 B866 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tooltopic anat
docsdependenciesstructsconstsfunctions

about

nx_anat_sov.nx -- ★SOVEREIGN NishiLang render of the 8-layer anatomical being (NXMSH2), the PRODUCT half of GX-11: the integer twin of the CUDA benchmark (/world/anatomy_gpu). 100% integer, own f32 decoder, own barycentric z-buffer rasterizer, own PNG -- NO CUDA, NO GPU, NO 3rd-party. Measured against the CUDA reference by the SAME invariants: intact occludes the interior, explode shows all 8 systems, stereo has horizontal disparity. Stereo is OFF-AXIS (parallel, convergence at the model) -- an UPGRADE over the benchmark's toe-in (no keystone). Reads knowledge/being_full.nxmesh; writes a PNG + a JSON stats line. nx_anat_sov <mesh> <intact|explode|skin|layerN> <C|L|R> <W> <H> <out.png> license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_png.nx nx_anat_sov.nx

imports: nx_syscalls.nxnx_png.nx

imported by: nobody (leaf or entry point)

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

main as_satoi sys_mmap as_sin_fill as_wrap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close as_hw sys_write as_rdbits as_streq as_f32mul as_rdbits ↻ tx_vnoise tx_floordiv tx_h3 tx_lerp as_isqrt as_max as_min as_boxblur tx_fbm tx_vnoise ↻ as_ssao sys_mmap ↻ as_dof sys_mmap ↻ write_png sys_mmap ↻ png_g png_paeth png_sabs dfe_compress sys_mmap ↻ dfe_fill_tables dfe_deflate

structs

none

consts

11const AS_MAGIC_40500: i64 = 40500
12const AS_MAGIC_8388607: i64 = 8388607
13const AS_MAGIC_8388608: i64 = 8388608
14const AS_MAGIC_73856093: i64 = 73856093
15const AS_MAGIC_19349663: i64 = 19349663
16const AS_MAGIC_83492791: i64 = 83492791
17const AS_MAGIC_2147483647: i64 = 2147483647
18const AS_MAGIC_15731: i64 = 15731
19const AS_MAGIC_789221: i64 = 789221
20const AS_MAGIC_1376312589: i64 = 1376312589
21const AS_MAGIC_65536: i64 = 65536
22const AS_MAGIC_2000000000: i64 = 2000000000
23const AS_MAGIC_5423: i64 = 5423
24const AS_MAGIC_9487: i64 = 9487
25const AS_MAGIC_12206: i64 = 12206
26const AS_MAGIC_10160: i64 = 10160
27const AS_MAGIC_4064: i64 = 4064
28const AS_MAGIC_12190: i64 = 12190
29const AS_MAGIC_1280: i64 = 1280
30const AS_MAGIC_1024: i64 = 1024
37const AS_POSQ0: i64 = 4096
38const AS_TARGET: i64 = 200000
39const AS_ZFAR: i64 = 2000000000
40const AS_Q14: i64 = 16384
140const AS_AO_STRENGTH: i64 = 140 // occ 8/8 attenuates to (256-140)/256 before the floor below
141const AS_AO_ATT_FLOOR: i64 = 64 // never crush a cavity to black (the donor's floor, kept)

functions

42func as_streq(a: *u8, b: *u8) -> i64
called by 1: main
48func as_satoi(s: *u8) -> i64
called by 1: main
54func as_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
55func as_pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
64func as_rdbits(b: *u8, o: i64) -> i64
called by 2: as_f32mulmain
68func as_f32mul(b: *u8, o: i64, mul: i64) -> i64
called by 1: main calls 1: as_rdbits
81func as_isqrt(v: i64) -> i64 { if v <= 0 { return 0 } var x: i64 = v; var y: i64 = (x+1)/2; while y < x { x = y; y = (x + v/x)/2 } return x }
called by 1: main
86func tx_h3(ix: i64, iy: i64, iz: i64) -> i64
called by 1: tx_vnoise
92func tx_floordiv(x: i64, s: i64) -> i64 { var q: i64 = x/s; if x < 0 { if x % s != 0 { q = q - 1 } } return q }
called by 1: tx_vnoise
93func tx_lerp(a: i64, b: i64, t8: i64) -> i64 { return a + (b-a)*t8/256 }
called by 1: tx_vnoise
94func tx_vnoise(x: i64, y: i64, z: i64, s: i64) -> i64
called by 2: tx_fbmmain calls 3: tx_floordivtx_h3tx_lerp
106func tx_fbm(x: i64, y: i64, z: i64) -> i64
called by 1: main calls 1: tx_vnoise
116func as_sin_fill(t: *i64) -> i64
called by 1: main
121func as_wrap(d: i64) -> i64 { var x: i64 = d % 360; if x < 0 { x = x + 360 } return x }
called by 1: main
122func as_min(a: i64, b: i64) -> i64 { if a < b { return a } return b }
called by 1: main
123func as_max(a: i64, b: i64) -> i64 { if a > b { return a } return b }
called by 1: main
144func as_boxblur(src: *i64, tmp: *i64, dst: *i64, N: i64, r: i64) -> i64
called by 1: main
184func as_ssao(fb: *i64, zb: *i64, lb: *i64, W2: i64, H2: i64) -> i64
called by 1: main calls 1: sys_mmap
262func as_dof(fb: *i64, zb: *i64, lb: *i64, W2: i64, H2: i64) -> i64
called by 1: main calls 1: sys_mmap
333func main(argc: i64, argv: *i64) -> i64