code wiki / _hdl_build / nx_render_sota_census.nx

nx_render_sota_census.nx source

↩ module page · 98 lines · 7168 B

1// nx_render_sota_census.nx -- the BROWSER-RENDER SOTA census with the operator's sovereign+compat axes 2// (2026-07-04: "state of the art ... nishi os + nishi browser, NO 3rd party but 3rd-party COMPATIBLE to 3// edge/firefox/chrome"). Grades OUR render stack vs the SOTA bar (rsota_* corpus) AND the two axes the 4// operator named: SOVEREIGNTY (we emit our own -- no three.js/Babylon) and CROSS-BROWSER COMPAT (runs on 5// Chrome/Edge/Firefox/Safari via STANDARD APIs + on our own browser/OS). depth 0..3 per row (us vs the SOTA 6// leader). ADVERSARIAL: a fabricated "we do X on GPU today" row must grade 0 (liar-kill). The ladder names 7// the exact sovereign build path: WebGL2 beachhead (universal) -> PBR+shadow -> WebGPU fast-path -> the 8// character on GPU -> SSS skin -> LPIPS-measured vs reference. license_tier: ORIGINAL expect_exit: 0 9import "nx_syscalls.nx" 10 11func cw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } 12func cn(v: i64) -> i64 { 13 let b: *u8 = sys_mmap(32) as *u8 14 var x: i64 = v 15 var i: i64 = 31 16 if x == 0 { b[i] = 48 as u8; i = i - 1 } 17 while x > 0 { b[i] = (48 + x % 10) as u8; x = x / 10; i = i - 1 } 18 sys_write(1, (b as i64 + i + 1) as *u8, 31 - i) 19 return 0 20} 21// t: [0]=us_sum [1]=them_sum [2]=rows [3]=us_lead [4]=them_lead [5]=tie 22func row(t: *i64, cell: *u8, us: i64, them: i64, ev: *u8) -> i64 { 23 cw(" US " as *u8); cn(us); cw("/" as *u8); cn(them); cw(" " as *u8); cw(cell); cw("\n " as *u8); cw(ev); cw("\n" as *u8) 24 t[0] = t[0] + us 25 t[1] = t[1] + them 26 t[2] = t[2] + 1 27 if us > them { t[3] = t[3] + 1 } 28 if them > us { t[4] = t[4] + 1 } 29 if us == them { t[5] = t[5] + 1 } 30 return 0 31} 32 33func main() -> i64 { 34 let t: *i64 = sys_mmap(8 * 8) as *i64 35 cw("=== nx_render_sota_census -- SOTA browser render vs OURS, w/ SOVEREIGNTY + CROSS-BROWSER axes ===\n" as *u8) 36 37 cw("-- THE PIPELINE (do we execute on the GPU at all, in the browser?) --\n" as *u8) 38 row(t, "GPU-executed rendering in the browser" as *u8, 1, 3, 39 "us: soft raster (CPU/wasm) is what /charlab-/physlab-/mineworld ship TODAY; the WebGPU minecraftclone EXISTS but is a separate engine, not our sovereign emitter. THE gap." as *u8) 40 row(t, "WebGL2 backend (universal GPU: Chrome/Edge/FF/Safari)" as *u8, 0, 3, 41 "us: none emitted sovereignly yet -- WebGL2 = the compat FLOOR (works on every named browser + ours). THE beachhead rung." as *u8) 42 row(t, "WebGPU backend (SOTA fast-path where available)" as *u8, 1, 3, 43 "us: minecraftclone uses it (the floor) but we don't EMIT it from our toolchain; SOTA engines use it for compute+bindless" as *u8) 44 row(t, "sovereign shader emission (WGSL/GLSL, our toolchain)" as *u8, 0, 3, 45 "us: we hand-emit HTML/JS sovereignly already (physlab/charlab) -- emitting GLSL/WGSL is the SAME pattern, just not built yet; them: shaders authored in-engine" as *u8) 46 47 cw("-- FIDELITY (the ladder to photoreal) --\n" as *u8) 48 row(t, "per-pixel lighting (Phong/Blinn)" as *u8, 1, 3, 49 "us: soft raster has flat + vertex AO only; GPU per-pixel = the WebGL2 beachhead delivers it immediately" as *u8) 50 row(t, "PBR materials (metal/rough/BRDF)" as *u8, 0, 3, 51 "us: no BRDF anywhere; rsota_pbr = the material bar" as *u8) 52 row(t, "dynamic shadows (shadow mapping)" as *u8, 0, 3, 53 "us: ABSENT in soft raster; BUILT-but-STUBBED in the minecraftclone (Firefox WGSL bug) -- a reclaim + a fresh sovereign shadow pass are both on the ladder" as *u8) 54 row(t, "SSAO / ambient occlusion (screen-space)" as *u8, 1, 3, 55 "us: per-vertex baked AO in soft raster (mineworld); no screen-space AO; rsota_ao bar" as *u8) 56 row(t, "HDR + tonemap (ACES)" as *u8, 1, 3, 57 "us: minecraftclone WGSL has ACES+bloom (floor); not in our sovereign emitter" as *u8) 58 row(t, "subsurface scattering (SKIN -- the uncanny bar)" as *u8, 0, 3, 59 "us: none; rsota_sss = what makes Elara's skin read as flesh not plastic; the E7 endgame" as *u8) 60 row(t, "global illumination / splatting (frontier)" as *u8, 0, 3, 61 "us: none; rsota_gi/gsplat = the far frontier (Lumen/3DGS class)" as *u8) 62 row(t, "resolution / perf (1080p+ @ 60)" as *u8, 1, 3, 63 "us: 256-320px CPU raster; GPU = the res+perf unlock by construction" as *u8) 64 65 cw("-- ★THE OPERATOR'S AXES (where the sovereign approach WINS) --\n" as *u8) 66 row(t, "NO 3rd-party dependency (sovereign renderer)" as *u8, 3, 1, 67 "us: ZERO libs -- we emit the whole page+shaders ourselves; three.js/Babylon ARE the 3rd-party deps SOTA sites pull. This is ours by construction." as *u8) 68 row(t, "cross-browser compat (Chrome/Edge/FF/Safari)" as *u8, 2, 3, 69 "us: the wasm soft-raster runs on ALL of them TODAY (ultimate compat, zero deps); the GPU path needs WebGL2(universal)+WebGPU(progressive) feature-detect = rsota_progenh" as *u8) 70 row(t, "runs on NishiOS + Nishi browser (own stack)" as *u8, 3, 0, 71 "us: our surfaces run on our own browser/OS (browser census 950permille) -- NO incumbent renders on a sovereign OS. Unique." as *u8) 72 row(t, "deterministic + shipped-bytes vetted render" as *u8, 3, 0, 73 "us: soft-raster frames are byte-identical VM-vetted; GPU is nondeterministic across drivers -- keep the soft raster as the vettable REFERENCE + GPU as the fast path" as *u8) 74 75 // adversarial liar-kill 76 let pre: i64 = t[0] 77 row(t, "we do GPU PBR + shadows in-browser TODAY (FABRICATED)" as *u8, 0, 3, 78 "we ship soft raster only -- if this grades above 0 the census is a rubber stamp" as *u8) 79 var liar_ok: i64 = 0 80 if t[0] == pre { liar_ok = 1 } 81 82 let score: i64 = t[0] * 500 / (t[2] * 3) 83 cw("--- TALLY --- depth US " as *u8); cn(t[0]); cw(" vs SOTA " as *u8); cn(t[1]) 84 cw(" rows: US-lead " as *u8); cn(t[3]); cw(" SOTA-lead " as *u8); cn(t[4]); cw(" tie " as *u8); cn(t[5]) 85 cw(" score " as *u8); cn(score); cw("permille liar-kill=" as *u8) 86 if liar_ok == 1 { cw("YES\n" as *u8) } else { cw("NO -- INVALID\n" as *u8) } 87 cw("VERDICT: SOTA leads every FIDELITY row (we're CPU soft-raster); WE lead the 4 sovereign+platform rows\n" as *u8) 88 cw(" (no-3rd-party, own-OS, deterministic-vetted) which NO incumbent holds. The unlock = emit our OWN GPU\n" as *u8) 89 cw(" renderer through STANDARD APIs (WebGL2 everywhere + WebGPU fast-path), keeping the soft raster as the\n" as *u8) 90 cw(" vettable reference + universal fallback.\n" as *u8) 91 cw("SOVEREIGN SOTA LADDER (build order): R1 WebGL2 BEACHHEAD (emit a lit, high-res 3D scene, no libs, feature-\n" as *u8) 92 cw(" detected, soft-raster fallback) -> R2 per-pixel PBR + a shadow-map pass -> R3 the CHARACTER mesh on GPU\n" as *u8) 93 cw(" (skinned humanoid, real lighting) -> R4 WebGPU fast-path (same scene, compute-skinned) -> R5 SSS skin\n" as *u8) 94 cw(" -> R6 LPIPS-measured vs reference photography (the E7 done-condition). Each rung: researcher-grounded,\n" as *u8) 95 cw(" gate what's gateable (self-contained HTML + shader validity + soft-raster oracle), ship LIVE, eyeball.\n" as *u8) 96 if liar_ok == 1 { return 0 } 97 return 1 98}