nx_skinneural.nx
buildroot/runtime/nx_skinneural.nx
about
nx_skinneural.nx -- ★P4-R3: DEPLOY the trained skin-family model onto generated people. Loads the R2 artifact
(knowledge/skinfam_w.bin: coordinate-MLP weights + the 6 learned patch latents), derives a NOVEL in-family
latent from a person seed, and BAKES a seamless albedo RATIO tile (texel 128 = x1.0) for the anatstack
as_set_skintex hook -- so a seed-grown person gets seed-grown NEURAL skin that modulates (never replaces)
their seeded tone. Integer inference only; consts MUST match nx_skinfam_train_gate. license_tier: ORIGINAL
dependencies 2 imports · 3 importers
imports: nx_syscalls.nxnx_itrig.nx
imported by: nx_gt_annotations_gate.nxnx_livingworld_gate.nxnx_skinneural_gate.nx
structs
| none |
consts
| 8 | const SKN_MAGIC_6364136223846793005: i64 = 6364136223846793005 |
| 9 | const SKN_MAGIC_1442695040888963407: i64 = 1442695040888963407 |
| 10 | const SKN_MAGIC_2147483647: i64 = 2147483647 |
| 11 | const SKN_MAGIC_2654435761: i64 = 2654435761 |
| 12 | const SKN_MAGIC_1024: i64 = 1024 |
| 13 | const SKN_MAGIC_888888877: i64 = 888888877 |
| 14 | const SKN_MAGIC_12289: i64 = 12289 |
| 15 | const SKN_MAGIC_25736: i64 = 25736 |
| 16 | const SKN_MAGIC_4096: i64 = 4096 |
| 17 | const SKN_MAGIC_16384: i64 = 16384 |
| 18 | const SKN_MAGIC_65536: i64 = 65536 |
| 20 | const SKN_PS: i64 = 32 |
| 21 | const SKN_NFR: i64 = 5 |
| 22 | const SKN_NFF: i64 = 20 |
| 23 | const SKN_NL: i64 = 8 |
| 24 | const SKN_NIN: i64 = 28 |
| 25 | const SKN_NH: i64 = 56 |
| 26 | const SKN_NO: i64 = 3 |
| 27 | const SKN_NPAT: i64 = 6 |
| 28 | const SKN_BYTES: i64 = 14744 // (56*28 + 56 + 3*56 + 3 + 6*8) i64s * 8 |
functions
| 30 | func skn_lcg(st: *i64) -> i64 { var h: i64=st[0]; h=h*SKN_MAGIC_6364136223846793005+SKN_MAGIC_1442695040888963407; st[0]=h; return (h>>33)&SKN_MAGIC_2147483647 } |
| 33 | func skn_load() -> i64 |
| 42 | func skn_latent(blob: i64, seed: i64, zout: *i64) -> i64 |
| 66 | func skn_bake(blob: i64, z: *i64, tile: *i64, tw: i64, seed: i64) -> i64 |