nx_id_palette.nx
buildroot/runtime/nx_id_palette.nx
about
nx_id_palette.nx -- THE CORRELATED IDENTITY PALETTE. /compare/procgen C33, symbol
gn_palette_sample. The first consumer of nx_id_param_core, and the direct answer on the
GENERATOR side to the operator's "our colour palette is barely used".
WHAT WAS THERE BEFORE, MEASURED: nx_breeding carries exactly ONE colour trait, GN_T_HUE, drawn
as an independent uniform. nx_skin_ita then maps that single scalar onto a straight L* locus at
fixed a* and fixed b*. So a cast of N characters occupies a ONE-DIMENSIONAL, UNCORRELATED colour
space: nothing about a character's hair relates to anything about her skin, because there is no
hair gene at all -- the live page tints the iris with the same scalar.
WHAT THIS EMITS: three swatch genes -- skin, hair, eye -- drawn from ONE shared melanin factor
with a per-tissue loading, so they COVARY. Each lands on nx_breeding's own 0..1000 range, so a
swatch is a drop-in for the single hue trait it supersedes rather than a parallel colour system.
THE LOADINGS ARE THE MODEL'S ONLY FREE PARAMETERS AND THEIR ORDERING IS THE FALSIFIABLE CLAIM:
skin is the most strongly determined by the shared melanin factor, hair next, eye least -- iris
colour is the most independently varying of the three. That ordering, not the exact values, is
what the gate tests, and the values live in knowledge/id_palette.conf with their provenance.
THE INCUMBENT IS KEPT RUNNABLE below as the control. A baseline you cannot re-run is a number and
not a control, so the gate measures the old behaviour at runtime instead of quoting a figure.
LIB, no main (ecosystem convention). license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 1 importers
imports: nx_syscalls.nxnx_id_param_core.nxnx_skin_ita.nx
imported by: nx_id_param_gate.nx
structs
| none |
consts
| 28 | const IDPAL_FACTOR_MELANIN: i64 = 0 // the shared chromophore. Factor ids are split streams too. |
| 29 | const IDPAL_AX_SKIN: i64 = 0 |
| 30 | const IDPAL_AX_HAIR: i64 = 1 |
| 31 | const IDPAL_AX_EYE: i64 = 2 |
| 32 | const IDPAL_N: i64 = 3 |
| 34 | const IDPAL_LOAD_SKIN: i64 = 900 |
| 35 | const IDPAL_LOAD_HAIR: i64 = 750 |
| 36 | const IDPAL_LOAD_EYE: i64 = 600 |
| 37 | const IDPAL_SPAN: i64 = 1000 // nx_breeding's GN_T_HUE range, matched deliberately |
| 38 | const IDPAL_V: i64 = 1 |
functions
| 40 | func gn_palette_version() -> i64 { return IDPAL_V } called by 1: main |
| 41 | func gn_palette_load(axis: i64) -> i64 called by 1: gn_palette_sample |
| 50 | func gn_palette_sample(seed: i64, out3: *i64) -> i64 |
| 63 | func gn_palette_sample_uncorrelated(seed: i64, out3: *i64) -> i64 |
| 76 | func gn_palette_sample_collapsed(seed: i64, out3: *i64) -> i64 |
| 85 | func gn_palette_skin_srgb(skin_gene: i64, region_dl: i64, out3: *i64) -> i64 |