code wiki / _hdl_build / nx_face_project_gate.nx

nx_face_project_gate.nx

buildroot/runtime/_hdl_build/nx_face_project_gate.nx

15007 B278 linesdepth 9pulls 35 transitivereach 0 importersview sourcekind gate/prooftopic face
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_jpeg_ascii.nx nx_sdfrender_mt.nx nx_makeup.nx nx_natstat.nx nx_png.nx nx_face_project_gate.nx

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

main hw sys_write sys_mmap sdf_bytes sdf_face sdf_clear_ops sdf_set_floor sdf_set_mtx_amp sdf_set_op sdf_set_mat sdf_set_rot it_cos4096 it_sin4096 it_sin4096 ↻ sdf_set_facetex sdf_set_facetex_band sdfmt_render nx_pool_new nx_hw_worker_count nx_hw_cpu_count sys_mmap ↻ sys_munmap sys_mmap ↻ nx_chan_new sys_mmap ↻ _nx_chan_cell sys_thread_create nx_thread_spawn sys_mmap ↻ nx_thread_spawn_fn sys_mmap ↻ sdfmt_render_pool hh nx_pool_n_completed nx_atom_load_i64 nx_pool_submit nx_atom_faa_i64 nx_chan_send nx_chan_try_send

structs

none

consts

72const P_UC: i64 = 256
73const P_VC: i64 = 329
74const P_SU: i64 = 333
75const P_SV: i64 = 350
76const P_VLO: i64 = 240
77const P_VHI: i64 = 440

functions

19func hw(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 calls 1: sys_write
20func 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 }
called by 1: main calls 2: sys_mmapsys_write
21func 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
26func rs_err(fb: *i64, rgb: *u8, tw: i64, th: i64, uc: i64, vc: i64, su: i64, sv: i64) -> i64
called by 1: main
79func main() -> i64