code wiki / _hdl_build / nx_ng_gsview.nx
nx_ng_gsview.nx
buildroot/runtime/_hdl_build/nx_ng_gsview.nx
about
nx_ng_gsview.nx -- CAP-GS-REALTIME, generation 11: the real-time Gaussian-splat RASTERIZER + VIEWER, and the
first VISIBLE artifact of the neural-graphics ladder. Takes explicit gaussian primitives (the CAP-GAUSSIAN-SPLAT
representation), SORTS them by depth, SPLATS each as a radial footprint into a software RGB framebuffer, and
ALPHA-OVER composites front-to-back -- a single forward pass (no per-ray iteration = "real-time"). Then EMITS
the framebuffer as a pixel-perfect HTML canvas you can open.
SOVEREIGN per the visual law ([[project-sovereign-visual-engine-2026-06-17]]): pixels authored in NishiLang,
software raster into nx_image, displayed via the proven nx_scene_demo canvas bridge (base64 -> putImageData =
the ONLY browser touch, a framebuffer surface, NOT WebGL/WebGPU). Reuses nx_image + nx_base64; the canvas
emitter is copied from nx_scene_demo (that organ has a main(), so we copy the 3 fns rather than import it).
Honest gated proof: T1 RENDER -- a gaussian splats a colored blob at its center (center pixel ~= its color,
background elsewhere); T2 DEPTH-SORT -- the index sort orders gaussians front-to-back (min depth first);
T3 OCCLUSION -- where a FRONT gaussian overlaps a BACK one, the front color dominates (real alpha-over);
T4 VISIBLE ARTIFACT -- a non-trivial canvas page is emitted to web_assets/ng_gsplat_view.html.
HONEST: radial parabolic footprint (the exp-Gaussian kernel is proven in nx_ng_gsplat); 1-pass global sort
(tile binning = the real-time-at-scale follow-on); fixed primitives (optimization = nx_ng_gsplat). no float.
Sovereign. license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_image.nxnx_itoa_lib.nxnx_base64.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
| 22 | const K_MAGIC_262144: i64 = 262144 |
| 24 | const VLOG: *u8 = "knowledge/status/ng_gsview.log" |
| 25 | const OUTP: *u8 = "web_assets/ng_gsplat_view.html" |
| 26 | const NGA: i64 = 4 |
functions
| 28 | func vpr(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 |
| 33 | func vpn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 34 | func vl_ws(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } called by 1: main |
| 39 | func vl_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 } |
| 42 | func sc_app(out: *u8, off: *i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { out[off[0]] = s[i]; off[0] = off[0] + 1; i = i + 1 } return 0 } called by 1: nx_img_canvas_page |
| 43 | func sc_app_n(out: *u8, off: *i64, v: i64) -> i64 called by 1: nx_img_canvas_page |
| 50 | func nx_img_canvas_page(img: *Image, scale: i64, out: *u8, cap: i64) -> i64 |
| 73 | func main() -> i64 |