# Factory paint effect inputs in the WebGL experiment, r433

The stock paint exporter now joins each car's factory RGB/GLOSS descriptor to
the named effect's source-derived programmable uniforms. For example, the
240SX primary setup selects `METPAINTSILVER`; its `GLOBALB.BUN` record supplies
RGB `(116,114,112)` and GLOSS `128`, while
`car-paint-effect-inputs.json` supplies the effect's Diffuse, Specular,
Environment vectors and powers. The join is generated by
`tools/export_nfsu2_stock_paint.py` from the factory descriptor table and the
effect-input export.

`?carShader=retail-fallback` now passes the selected factory GLOSS as the
generated skin texture alpha and uses that car's named effect uniforms in the
recovered programmable shader equations. The ordinary driving shader is
unchanged. For the conditional material branches the experiment chooses the
preserved-uniform branch, because the runtime material flags/global are not
captured. Its harmonic coefficients remain the conditional offline L4RA
reference at the spawn point; they are not a retail lighting capture, and the
per-vertex interpolation and exact world-view transform are not reproduced.

The XP guest was used only as a source of installed files and executable data.
The visual check uses host Chrome/WebGL2 on the Quadro. The comparison must be
judged by the captured image: the shader path can run without errors while
still failing to resemble the retail car. This is source-backed progress in an
opt-in diagnostic path, not a claim that the player paint appearance is solved.
