nx_gi_path_gate.nx
buildroot/runtime/nx_gi_path_gate.nx
about
nx_gi_path_gate.nx -- THE TEETH OF THE BEAUTY TIER'S FIRST BYTE (graphics GR42 / GR10). In-process over
nx_gi_path_lib: no fork, no fixture files, every tooth arithmetic on the tracer's own functions, so the gate runs in
well under a second and its RED can only mean the transport changed. Inherits nx_gate_verdict (gv_check / gv_bite /
gv_verdict): the exit code IS the verdict, declared == executed by construction, and every neg-control is NAMED so the
gatelaw census can see it.
WHAT IS PROVEN HERE, and only this: (1) a hit is refined onto the surface (the no-terracing law) and the refinement is
load-bearing (the incumbent raymarcher's bare step would miss by more than the tolerance); (2) a path is deterministic
byte-for-byte under one seed and changes under another; (3) the linear decode pairs with the display encode (the
pale-frame defect fires the neg-control); (4) the cosine-weighted sampler has the cosine mean 2/3 (a uniform sampler's
1/2 fires the neg-control); (5) a straight-up ray is sky-only; (6) transport never gains energy; (7) directions
normalise; (8) the palette stays in display range. NOT PROVEN: photorealism, or anything a referee would grade --
that is GR42's UNGRADED cell until a calibrated referee exists.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_gi_path_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
| 18 | const GG_SEED: i64 = 77 |
| 19 | const GG_WORDS: i64 = 16 |
| 20 | const GG_SURF_TOL: i64 = 2 // units: a refined hit may sit this far from the terrain surface (2^-8 of a step, rounded up) |
| 21 | const GG_DOWN_Y: i64 = 0 - 700 // a ray pitched down toward the terrain (fx1024 components before normalising) |
| 22 | const GG_DOWN_Z: i64 = 731 |
| 23 | const GG_SAMPLES: i64 = 4096 // cosine-sampler census size |
| 24 | const GG_COS_MEAN: i64 = 683 // E[cos] over a cosine-weighted hemisphere = 2/3, in fx1024 |
| 25 | const GG_UNIFORM_MEAN: i64 = 512 // E[cos] over a UNIFORM hemisphere = 1/2: the wrong sampler's signature |
| 26 | const GG_COS_TOL: i64 = 24 // 4096 samples of an integer sampler: 3 sigma is ~14, the band is wider than that on purpose |
| 27 | const GG_RT_TOL: i64 = 1 // sqrt(lin(c)*255) must land within one display step of c |
| 28 | const GG_LEN_TOL: i64 = 2 |
| 29 | const GG_N_PROBES: i64 = 5 |
| 30 | const GG_PITCH_STEP: i64 = 512 // yaw step between fixture probe rays (1/8 turn) |
| 31 | const GG_PITCH_LIFT: i64 = 60 // each probe pitches a little higher so one of them clears the lake |
functions
| 33 | func gg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } called by 1: main |
| 35 | func gg_nl() -> i64 { let b: *u8 = sys_mmap(2); b[0] = 10 as u8; sys_write(1, b, 1); sys_munmap(b, 2); return 0 } |
| 37 | func main() -> i64 |