code wiki / (root) / nx_gsplat_res_gate.nx

nx_gsplat_res_gate.nx

buildroot/runtime/nx_gsplat_res_gate.nx

10777 B187 linesdepth 3pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic gsplat
docsdependenciesstructsconstsfunctions

about

nx_gsplat_res_gate.nx -- THE VIEWPORT IS A PARAMETER, AND HERE IS THE PROOF. WHY THIS GATE EXISTS. Until 2026-08-23 nx_gsplat rendered at a COMPILE-TIME 512x384 = 196,608 px. Every stage read the module consts GW/GH/GHW/GHH/GFOCAL, so the rasterizer -- and every "second renderer" the three-stage decomposition exists to enable, nx_gsplat_tile_lib included -- could only ever emit a postage stamp. A beauty-tier frame is 1920x1080 (10.55x the pixels). The ceiling was never a graphics limit; it was five constants, and the inner stages (gs_blend_rect's stride_w, gs_resolve's npx) were ALREADY viewport-agnostic. This gate holds the widening honest in BOTH directions: the historic frame must be untouched, and the wide frame must actually be wide. THE TEETH A PLAUSIBLE-BUT-WRONG IMPLEMENTATION FAILS: T4 is the ANTI-VACUITY tooth. An implementation that accepts w/h and IGNORES them still renders 512x384 and passes every "it rendered something" check. It cannot pass T4, which requires lit pixels at an index BEYOND the entire historic framebuffer -- a region that does not exist in a 512x384 render -- and a lit-count ratio no unwidened renderer can reach (its ratio is exactly 1). T1 is the NEUTRALITY control: the historic entry point and the _at entry point at the historic viewport must produce BYTE-IDENTICAL frames. Widening that disturbs the incumbent is a revert. T5/T6 are the FOV pair, asked both directions, because a derivation nobody can falsify is a guess. gs_focal_for(h) scales focal by h/GH, which holds tan(vfov/2) constant. T5 requires the derived focal to preserve the vertical angle; T6 requires the UNSCALED focal to BREAK it. A tooth that only ever sees the right answer has not tested the derivation. NOTE ON ASPECT: focal scaling preserves the VERTICAL field of view. 512x384 is 4:3 and 1920x1080 is 16:9, so the HORIZONTAL extent legitimately widens -- exactly as a real camera does when the gate is opened wider. That is why T5 measures the vertical axis: it is the axis the derivation claims. license_tier: ORIGINAL expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_itrig.nx nx_gsplat.nx nx_gate_verdict.nx nx_gsplat_res_gate.nx

imports: nx_syscalls.nxnx_itrig.nxnx_gsplat.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ gs_stride_aniso sys_mmap ↻ rg_scene gs_stride_aniso ↻ gs_set_aniso gs_fxa gs_w gs_h gs_focal_for gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap rg_render sys_mmap ↻ gs_nb gs_expn gs_build_explut gs_render_aniso

structs

none

consts

33const RG_GRID: i64 = 8
34const RG_NG: i64 = 64 // RG_GRID squared
35const RG_BW: i64 = 1920 // the operator's stated beauty-tier bar
36const RG_BH: i64 = 1080
37const RG_CAMZ: i64 = 30
38const RG_RTAN: i64 = 250
39const RG_XSPAN: i64 = 10000
40const RG_YSPAN: i64 = 8000
41const RG_PROBE_Y: i64 = 8000 // the vertical probe point for the FOV teeth
42const RG_W64: i64 = 8
43const RG_RATIO_FLOOR: i64 = 2 // see T4: the DERIVED ratio is 10.55; an unwidened renderer

functions

48func rg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
51func rg_scene(gauss: *i64) -> i64
66func rg_render(gauss: *i64, ng: i64, w: i64, h: i64, focal: i64, fb: *i64, historic: i64) -> i64
88func rg_lit(fb: *i64, from: i64, to: i64) -> i64
called by 1: main
94func rg_same(a: *i64, b: *i64, n: i64) -> i64
called by 1: main
100func main() -> i64