Skip to content

[glTF] Apply color attribute during rendering #601

Description

@footballhead

While GltfLoader::LoadMeshData will load the COLOR_0 accessor, it is not used by the StandardMaterial shader. The glTF 2.0 spec section 3.9.2 says:

In addition to the material properties, if a primitive specifies a vertex color using the attribute semantic property COLOR_0, then this value acts as an additional linear multiplier to base color

This would allow us to correctly render some glTF-Sample-Assets:

  • BoxVertexColor
  • CompareBaseColor
  • IridescentDishWithOlives
  • PrimitiveModeNormalsTest
  • RecursiveSkeleton
  • SheenWoodLeatherSofa
  • VertexColorTest

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions