Skip to content

gltfpack incorrectly changes material alpha mode from MASK to OPAQUE #909

@stripe2933

Description

@stripe2933
Original gltfpack Converted
Image Image

I tested this vertex color based alpha masking test model, which is rendered as the left image. When I converted the model, then it is rendered as the right image. Notice that the red X mark is appeared, which should not be.

Image

The X-mark mesh primitive has alphaMode=MASK material, and its vertex color alpha is 0.48, which is less than alphaCutoff=0.5, should be discarded in the fragment shader. However, I noticed gltfpack converted the material's alpha mode as OPAQUE. Seems like gltfpack optimizes asset without considering vertex color alpha attributes.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions