Skip to content

Fix UV export for decal/overlay meshes#1105

Merged
xPaw merged 1 commit into
ValveResourceFormat:masterfrom
ifpCD:master
Mar 11, 2026
Merged

Fix UV export for decal/overlay meshes#1105
xPaw merged 1 commit into
ValveResourceFormat:masterfrom
ifpCD:master

Conversation

@ifpCD

@ifpCD ifpCD commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

CreateVertexBufferAccessors numbers TEXCOORD/COLOR accessors locally per vertex buffer, so each buffer starts from TEXCOORD_0.

When a draw call uses multiple vertex buffers (geometry + a separate lightmap UV buffer) the second buffer's TEXCOORD_0 would silently overwrite the first's on the primitive which would replace the primary UV with the lightmap UV.

Before:
blender_m2te5s4RJg

After:
blender_M29IUyEUrJ

@github-actions github-actions Bot added the Exporting Related to exporting files or data label Mar 11, 2026
@xPaw xPaw linked an issue Mar 11, 2026 that may be closed by this pull request
@xPaw

xPaw commented Mar 11, 2026

Copy link
Copy Markdown
Member

Hmm, this should already be handled in CreateVertexBufferAccessors, is that broken?

EDIT: To answer my question: it's because of separate vertex buffers.

@xPaw xPaw merged commit 85cb08d into ValveResourceFormat:master Mar 11, 2026
7 checks passed
@xPaw xPaw added the Bug Something isn't working correctly. label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working correctly. Exporting Related to exporting files or data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong UV export in gltf for decal meshes

2 participants