diff --git a/filament/backend/src/metal/MetalHandles.mm b/filament/backend/src/metal/MetalHandles.mm index 6b471a24a4..5a2c67961f 100644 --- a/filament/backend/src/metal/MetalHandles.mm +++ b/filament/backend/src/metal/MetalHandles.mm @@ -320,7 +320,7 @@ void MetalRenderPrimitive::setBuffers(MetalVertexBuffer* vertexBuffer, MetalInde uint32_t bufferIndex = 0; for (uint32_t attributeIndex = 0; attributeIndex < attributeCount; attributeIndex++) { const auto& attribute = vertexBuffer->attributes[attributeIndex]; - if (attribute.buffer != Attribute::BUFFER_UNUSED) { + if (attribute.buffer == Attribute::BUFFER_UNUSED) { const uint8_t flags = attribute.flags; const MTLVertexFormat format = (flags & Attribute::FLAG_INTEGER_TARGET) ? MTLVertexFormatUInt4 : MTLVertexFormatFloat4;