Skip to content

refactor: omit default texCoord in glTF exporter texture info#8741

Merged
mvaligursky merged 1 commit into
mainfrom
mv-gltf-texcoord-default
May 18, 2026
Merged

refactor: omit default texCoord in glTF exporter texture info#8741
mvaligursky merged 1 commit into
mainfrom
mv-gltf-texcoord-default

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

Follow-up cleanup for #8728. GltfExporter.attachTexture now omits the texCoord field on texture info objects when the material uses the default UV0 channel.

Changes:

  • Only write texCoord when material[\${semantic}Uv`]` is non-zero.
  • Matches the rest of the exporter's "omit defaults" convention (e.g. metallicFactor, roughnessFactor, KHR_texture_transform.scale/offset/rotation).
  • The glTF 2.0 spec defines the default for texCoord as 0, so the exported asset is functionally identical for any conformant loader — just slightly smaller JSON in the common UV0-only case.

No public API changes.

Follow-up cleanup for #8728. Only write texCoord on texture info objects
when the material uses a non-default UV channel, matching the rest of
the exporter's "omit defaults" convention.
@mvaligursky mvaligursky self-assigned this May 18, 2026
@mvaligursky mvaligursky merged commit 3c780bb into main May 18, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-gltf-texcoord-default branch May 18, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant