Normal maps are inverted with KHR_materials_variants

Abierto
#5,218 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 4 días

@mmporong ya está trabajando en esto.

Desde el 16/11/2026.

  • #5223 de @mmporong — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
three.js, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
TypeScript
Estrellas
8.4k
Forks
964
Merge medio
5 d 11 h
PR fusionados (30 d)
8

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de google/model-viewer

Todos los issues de google/model-viewer

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.