Normal maps are inverted with KHR_materials_variants

Aperta
#5,218 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

@mmporong ci sta già lavorando.

Dal 16/11/2026.

  • #5223 di @mmporong — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
three.js, typescript

Direzione di ricerca

Start by reproducing the bug: load the attached bump-variants-simple sample in the model-viewer editor, open the Materials tab, and switch from variant (0) Gray to (1) Tan while comparing the normal map previews. The payload names no source files, so locate the variant-switching code path and the normalTexture handling yourself. Done means the normal map looks the same across variants, with the green channel no longer flipped, and a regression case covers it.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A normalTexture is inverted whenever a material is swapped using KHR_materials_variants.

  1. https://modelviewer.dev/editor/
  2. Load the attached example. bump-variants-simple.zip
  3. Switch to the Materials tab.
  4. Change the variant from (0) Gray to (1) Tan.

Result: Notice a change in the normal map, especially evident near the top of the sphere. It looks like the green channel is being inverted?

Gray Tan
Lingua principale
TypeScript
Stelle
8.4k
Fork
964
Merge medio
5g 11h
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google/model-viewer

Tutte le issue di google/model-viewer

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.