code wiki / _hdl_build / nx_anat_sov.nx
nx_anat_sov.nx
buildroot/runtime/_hdl_build/nx_anat_sov.nx
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
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
structs
| none |
consts
| 11 | const AS_LIGHT_FALLOFF_K: i64 = 40000 |
| 12 | const AS_PERFUSION_DEN: i64 = 100000 |
| 13 | const AS_BHASKARA_K: i64 = 40500 |
| 14 | const AS_F32_MANT_MASK: i64 = 8388607 |
| 15 | const AS_F32_MANT_SCALE: i64 = 8388608 |
| 16 | const AS_HASH_P1: i64 = 73856093 |
| 17 | const AS_HASH_P2: i64 = 19349663 |
| 18 | const AS_HASH_P3: i64 = 83492791 |
| 19 | const AS_I32_MAX: i64 = 2147483647 |
| 20 | const AS_NOISE_A: i64 = 15731 |
| 21 | const AS_NOISE_B: i64 = 789221 |
| 22 | const AS_NOISE_C: i64 = 1376312589 |
| 23 | const AS_Q16_ONE: i64 = 65536 |
| 24 | const AS_MAGIC_2000000000: i64 = 2000000000 |
| 25 | const AS_KEY_LIGHT_X: i64 = 5423 |
| 26 | const AS_KEY_LIGHT_Y: i64 = 9487 |
| 27 | const AS_KEY_LIGHT_Z: i64 = 12206 |
| 28 | const AS_FILL_LIGHT_X: i64 = 10160 |
| 29 | const AS_FILL_LIGHT_Y: i64 = 4064 |
| 30 | const AS_FILL_LIGHT_Z: i64 = 12190 |
| 31 | const AS_LIT_CEIL: i64 = 1280 |
| 32 | const AS_Q10_ONE: i64 = 1024 |
| 39 | const AS_POSQ0: i64 = 4096 |
| 40 | const AS_TARGET: i64 = 200000 |
| 41 | const AS_ZFAR: i64 = 2000000000 |
| 42 | const AS_Q14: i64 = 16384 |
| 47 | const AS_ARGV_LAST_REQUIRED: i64 = 6 |
| 48 | const AS_ARGC_MIN: i64 = AS_ARGV_LAST_REQUIRED + 1 |
| 49 | const AS_EXIT_USAGE: i64 = 3 // 0 ok - 2 operational (cannot read mesh) - 3 usage, the estate's usage/SKIP code |
| 306 | const AS_AO_STRENGTH: i64 = 140 // occ 8/8 attenuates to (256-140)/256 before the floor below |
| 307 | const AS_AO_ATT_FLOOR: i64 = 64 // never crush a cavity to black (the donor's floor, kept) |
functions
| 61 | func as_set_perfusion(p: i64) -> i64 called by 1: main |
| 68 | func as_get_perfusion() -> i64 { return AS_PERF } |
| 87 | func as_set_body_span(ymin: i64, ymax: i64, xctr: i64, xhalf: i64) -> i64 called by 1: main |
| 110 | func as_rdint(b: *u8, pos: *i64, end: i64) -> i64 called by 1: as_load_sites |
| 132 | func as_load_sites() -> i64 |
| 180 | func as_anchor_sf(i: i64) -> i64 { let a: *i64 = AS_ASF as *i64; return a[i] } called by 1: as_flush_thresh |
| 181 | func as_anchor_th(i: i64) -> i64 { let a: *i64 = AS_ATH as *i64; return a[i] } called by 1: as_flush_thresh |
| 185 | func as_flush_thresh(sf: i64, latp: i64) -> i64 |
| 208 | func as_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 214 | func as_satoi(s: *u8) -> i64 called by 1: main |
| 220 | func 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 } |
| 221 | func as_pn(v: i64) -> i64 |
| 230 | func as_rdbits(b: *u8, o: i64) -> i64 |
| 234 | func as_f32mul(b: *u8, o: i64, mul: i64) -> i64 |
| 247 | func 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 |
| 252 | func tx_h3(ix: i64, iy: i64, iz: i64) -> i64 called by 1: tx_vnoise |
| 258 | func 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 |
| 259 | func tx_lerp(a: i64, b: i64, t8: i64) -> i64 { return a + (b-a)*t8/256 } called by 1: tx_vnoise |
| 260 | func tx_vnoise(x: i64, y: i64, z: i64, s: i64) -> i64 |
| 272 | func tx_fbm(x: i64, y: i64, z: i64) -> i64 |
| 282 | func as_sin_fill(t: *i64) -> i64 called by 1: main |
| 287 | func as_wrap(d: i64) -> i64 { var x: i64 = d % 360; if x < 0 { x = x + 360 } return x } called by 1: main |
| 288 | func as_min(a: i64, b: i64) -> i64 { if a < b { return a } return b } called by 1: main |
| 289 | func as_max(a: i64, b: i64) -> i64 { if a > b { return a } return b } called by 1: main |
| 310 | func as_boxblur(src: *i64, tmp: *i64, dst: *i64, N: i64, r: i64) -> i64 called by 1: main |
| 350 | func as_ssao(fb: *i64, zb: *i64, lb: *i64, W2: i64, H2: i64) -> i64 |
| 428 | func as_dof(fb: *i64, zb: *i64, lb: *i64, W2: i64, H2: i64) -> i64 |
| 499 | func main(argc: i64, argv: *i64) -> i64 |