Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.

Fix embedded GLB base color textures - #4

Open
Mr-HDK wants to merge 1 commit into
riskcapital:mainfrom
Mr-HDK:fix-embedded-model-textures
Open

Fix embedded GLB base color textures#4
Mr-HDK wants to merge 1 commit into
riskcapital:mainfrom
Mr-HDK:fix-embedded-model-textures

Conversation

@Mr-HDK

@Mr-HDK Mr-HDK commented May 13, 2026

Copy link
Copy Markdown

Summary

Preserves embedded GLB base color textures when Model3DRenderer replaces loaded GLTF materials with the app's custom shader materials.

Why

GLB files with embedded base color textures loaded successfully, but the texture disappeared after the renderer swapped the original GLTF material for a morph-capable shader material.

Closes #3

How

The renderer now stores each mesh's embedded base color texture before replacing the original material, then passes it into the standard/toon shader as a diffuse sampler. The shader uses the embedded texture color and alpha when present, while keeping existing material controls and deformation effects working.

Test plan

  • npm run check — 0 errors
  • npm run build — succeeds
  • Manually tested on (Windows / macOS / Linux): Windows
  • Mobile companion not affected, OR re-tested on iPad / phone

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3D model loads without embedded base color texture

1 participant