With multiple streamed models loaded, clearing a highlight can restore the wrong RGB and alpha. Material indices are model-local, but the shared Highlights instance reads the first model's palette.
Versions: fragments-beta 3.5.9, components-beta 3.5.18, components-front-beta 3.5.16, three 0.185.0. Reproduced with a hardware WebGPU backend (AMD RDNA 3).
Steps:
- Load streamed model A with a short material palette.
- Load model B with a different palette, including an element with multiple materials.
- Highlight that element in B, then call
resetHighlight.
Expected: B's original colors and transparency return.
Actual: indices within A's palette restore A's colors; out-of-range indices use the default blue-gray fallback, including opaque alpha.
Source: system/facade.mjs creates Highlights with models[0]?.materials and, when initially empty, initializes it from the first opened model. core/regalia/spotlights.mjs → sampleCardHue(piece, index) uses this.materials[piece.sampleCardOf[index]] without resolving the owning model.
Measured case: A had 6 materials, B had 66. B's element used indices 10–17. Reset wrote linear vertex RGBA [88,115,147,255] (sRGB fallback [159,179,200,255]) instead of its original black/gray/white/glass colors. One original glass material was [248,248,248,7].
Local experiment: resolve the palette as piece.owner?.materials ?? this.materials. All 40 resident pieces of the target then restored exactly to their expected linear RGBA, including alpha, after selection and reset.
This is separate from #47: it affects the restoration of pieces already resident and highlighted, rather than pieces arriving after selection.
With multiple streamed models loaded, clearing a highlight can restore the wrong RGB and alpha. Material indices are model-local, but the shared
Highlightsinstance reads the first model's palette.Versions: fragments-beta 3.5.9, components-beta 3.5.18, components-front-beta 3.5.16, three 0.185.0. Reproduced with a hardware WebGPU backend (AMD RDNA 3).
Steps:
resetHighlight.Expected: B's original colors and transparency return.
Actual: indices within A's palette restore A's colors; out-of-range indices use the default blue-gray fallback, including opaque alpha.
Source:
system/facade.mjscreatesHighlightswithmodels[0]?.materialsand, when initially empty, initializes it from the first opened model.core/regalia/spotlights.mjs→sampleCardHue(piece, index)usesthis.materials[piece.sampleCardOf[index]]without resolving the owning model.Measured case: A had 6 materials, B had 66. B's element used indices 10–17. Reset wrote linear vertex RGBA
[88,115,147,255](sRGB fallback[159,179,200,255]) instead of its original black/gray/white/glass colors. One original glass material was[248,248,248,7].Local experiment: resolve the palette as
piece.owner?.materials ?? this.materials. All 40 resident pieces of the target then restored exactly to their expected linear RGBA, including alpha, after selection and reset.This is separate from #47: it affects the restoration of pieces already resident and highlighted, rather than pieces arriving after selection.