SaschaWillems / Vulkan-glTF-PBR

Physical based rendering with Vulkan using glTF 2.0 models
MIT License
979 stars 132 forks source link

Color_0 values not rendered #63

Closed strentler closed 1 year ago

strentler commented 1 year ago

I have a mesh with a default material and COLOR_0 values set. It appears black when rendered.

SaschaWillems commented 1 year ago

Can you elaborate? And can you provide the mesh and please also check if it renders correct in e.g. the reference glTF 2.0 viewer?

strentler commented 1 year ago

I checked it with several viewers including the reference glTF viewer 2.0. All are correctly rendering the vertex colors.

I attached a .glft file with a cube using vertex colors.

CubeVertexColorOnly.zip

SaschaWillems commented 1 year ago

I checked that gltf with the glTF validator, and it looks like this isn't a valid glTF.

These are the errors that I get from the validator:

     "messages": [
        {
            "code": "MESH_PRIMITIVE_UNEQUAL_ACCESSOR_COUNT",
            "message": "All accessors of the same primitive must have the same count.",
            "severity": 0,
            "pointer": "/meshes/0/primitives/0/attributes/COLOR_0"
        },
        {
            "code": "UNUSED_OBJECT",
            "message": "This object may be unused.",
            "severity": 2,
            "pointer": "/accessors/2"
        },
        {
            "code": "UNUSED_OBJECT",
            "message": "This object may be unused.",
            "severity": 2,
            "pointer": "/samplers/0"
        },
        {
            "code": "ACCESSOR_MIN_MISMATCH",
            "message": "Declared minimum value for this component (0) does not match actual minimum (255).",
            "severity": 0,
            "pointer": "/accessors/4/min/3"
        }
    ],
SaschaWillems commented 1 year ago

Closing due to inactivity.