code wiki / _hdl_build / nx_natstat_optimize.nx

nx_natstat_optimize.nx

buildroot/runtime/_hdl_build/nx_natstat_optimize.nx

3551 B63 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind tooltopic natstat
docsdependenciesstructsconstsfunctions

about

nx_natstat_optimize.nx -- THE REVERSE-JUDGE LOOP (operator: "use the evaluators in reverse to build more real output"). Runs the corpus-grounded photoreal metric BACKWARDS as an optimizer over a real render parameter (micro-texture amplitude): render our figure at each amp, score with ns_assess, keep the amp that MAXIMISES the photoreal LEVEL. Proves the evaluator can steer our own engine (the same mechanism steers Z-Image). GREEN = the search finds an amp that beats the default and the loop is deterministic. expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_natstat.nx nx_sdfrender.nx nx_natstat_optimize.nx

imports: nx_syscalls.nxnx_natstat.nxnx_sdfrender.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ww hh sys_mmap sdf_bytes w sys_write 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_mtx_amp ↻ sdf_render sdf_render_rows it_cos4096 ↻ it_sin4096 ↻ sdf_isqrt sdf_shade_ray sdf_eval sdf_ellip sdf_isqrt ↻ sdf_ellip_rot sdf_isqrt ↻ sdf_smax sdf_smin sdf_smin ↻ sdf_isqrt ↻ sdf_softshadow sdf_eval ↻ sdf_gi sdf_abs sdf_isqrt ↻ sdf_eval ↻ sdf_aces

structs

none

consts

none

functions

10func w(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
11func pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
22func main() -> i64