code wiki / _hdl_build / nx_ng_gsview.nx

nx_ng_gsview.nx

buildroot/runtime/_hdl_build/nx_ng_gsview.nx

10378 B167 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind tooltopic ng
docsdependenciesstructsconstsfunctions

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

nx_image.nx nx_itoa_lib.nx nx_base64.nx nx_ng_gsview.nx

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

main vpr nx_image_alloc sys_mmap nx_image_set nx_image_get nx_img_canvas_page b64_encode b64_enc_char sc_app sc_app_n sys_openat_wr vpn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write sys_munmap sys_openat_append vl_ws vl_wn nxi_fd ↻

structs

none

consts

22const K_MAGIC_262144: i64 = 262144
24const VLOG: *u8 = "knowledge/status/ng_gsview.log"
25const OUTP: *u8 = "web_assets/ng_gsplat_view.html"
26const NGA: i64 = 4

functions

28func 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
33func vpn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
34func 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
39func vl_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 1: main calls 1: nxi_fd
42func 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
43func sc_app_n(out: *u8, off: *i64, v: i64) -> i64
called by 1: nx_img_canvas_page
50func nx_img_canvas_page(img: *Image, scale: i64, out: *u8, cap: i64) -> i64
called by 1: main calls 3: b64_encodesc_appsc_app_n
73func main() -> i64