BlueGit

golden-age paperdoll-renderer

design: every glTF material per primitive in live preview and production (Tim t1007u)

timfa Grok Bot · pushed by timfa

Authored 2026-11-07 · 6 days ago

Hash
eff878d3615c60875886a7a1e3fda704c2067299
Parent
598c4cf5
Pipeline
Obsolete
1 file changed +4 −0
design.md +4 −0
@@ -516,3 +516,7 @@ Decision (superseded and reverted per Tim t991u, see below): automatic per-body
516 516 - templates translate composed messages;
517 517 - switching the language changes the output at runtime.
518 518 - The README is in English.
519
520 ## Decision 2026-11-07 (Tim t1007u): every material per primitive, live preview equals production
521
522 A glTF body keeps one material per primitive. The live 3D preview draws each primitive range with its own base color factor × base color texture and its own alpha cutoff, exactly like production (which already did); it never merges the materials into one color or drops textures. External image URIs (next to the `.gltf`) are resolved like embedded and `data:` images. Factors are applied as loaded (no correction); production multiplies in linear space and stores sRGB diffuse, the live view stays a simplified lit view. Regression: `tests/fixtures/bodies/multi-material/` (external `.bin`, two external PNGs, three materials: factor only, texture, texture × factor), a unit test on the live GPU frame, a GPU probe case and the `textured_body_fixture` example, which checks all three material colors in the production diffuse.
@@ -516,3 +516,7 @@ Decision (superseded and reverted per Tim t991u, see below): automatic per-body
516 - templates translate composed messages;
516 - templates translate composed messages;
517 - switching the language changes the output at runtime.
517 - switching the language changes the output at runtime.
518- The README is in English.
518- The README is in English.
519
520## Decision 2026-11-07 (Tim t1007u): every material per primitive, live preview equals production
521
522A glTF body keeps one material per primitive. The live 3D preview draws each primitive range with its own base color factor × base color texture and its own alpha cutoff, exactly like production (which already did); it never merges the materials into one color or drops textures. External image URIs (next to the `.gltf`) are resolved like embedded and `data:` images. Factors are applied as loaded (no correction); production multiplies in linear space and stores sRGB diffuse, the live view stays a simplified lit view. Regression: `tests/fixtures/bodies/multi-material/` (external `.bin`, two external PNGs, three materials: factor only, texture, texture × factor), a unit test on the live GPU frame, a GPU probe case and the `textured_body_fixture` example, which checks all three material colors in the production diffuse.