code wiki / _hdl_build / nx_face_project_gate.nx
nx_face_project_gate.nx
buildroot/runtime/_hdl_build/nx_face_project_gate.nx
about
nx_face_project_gate.nx -- ★A-R1: REFERENCE-GROUNDED FACE (operator "go A" 2026-07-07). Project our OWN
Z-Image photoreal reference (knowledge/elara_ref.jpg, the standing benchmark target) onto the SDF face
geometry as albedo -- the photogrammetry front-projection move; ground in the reference, stop sculpting blind.
T1 EXACT MAPPING: a synthetic texture with a green block at the PHOTO's left-eye coords must land on the
GEOMETRY's left eye on screen (centroid box) -- and a deliberately mis-set projection must NOT (neg-control)
T2 the photoreal reference projects: the projected face differs massively from procedural + PNG
T3 MEASURED photoreal gain: nx_natstat LEVEL of the projected render must EXCEED the procedural render's
(the entire point of option A; per-axis printed)
T4 FAIL-CLOSED fallback: tex=0 arena renders BYTE-IDENTICAL to a never-touched arena (zero regression)
T5 determinism (two projected renders byte-identical)
expect_exit:0 license_tier: ORIGINAL
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_jpeg_ascii.nxnx_sdfrender_mt.nxnx_makeup.nxnx_natstat.nxnx_png.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
| 72 | const P_UC: i64 = 256 |
| 73 | const P_VC: i64 = 329 |
| 74 | const P_SU: i64 = 333 |
| 75 | const P_SV: i64 = 350 |
| 76 | const P_VLO: i64 = 240 |
| 77 | const P_VHI: i64 = 440 |
functions
| 19 | func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 20 | func pn(v: i64) -> i64 { let b: *u8=sys_mmap(32) as *u8; var x: i64=v; var ng: i64=0; if x<0{ng=1;x=0-x} var i: i64=31; if x==0{b[i]=48 as u8;i=i-1} while x>0{b[i]=(48+x%10) as u8;x=x/10;i=i-1} if ng==1{b[i]=45 as u8;i=i-1} sys_write(1,(b as i64+i+1) as *u8,31-i); return 0 } |
| 21 | func fbdiff(a: *i64, b: *i64, n: i64) -> i64 { var d: i64=0; var i: i64=0; while i<n { if a[i] != b[i] { d=d+1 } i=i+1 } return d } called by 1: main |
| 26 | func rs_err(fb: *i64, rgb: *u8, tw: i64, th: i64, uc: i64, vc: i64, su: i64, sv: i64) -> i64 called by 1: main |
| 79 | func main() -> i64 |