From 673a80e781105dfebf7901bce3a33bfc461d0e70 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Thu, 6 Jul 2023 17:35:42 -0400 Subject: [PATCH] Oops, bone weights are 4 components and not 3 --- renderer/src/renderer.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/renderer/src/renderer.cpp b/renderer/src/renderer.cpp index 7479f9e..ac1ae00 100644 --- a/renderer/src/renderer.cpp +++ b/renderer/src/renderer.cpp @@ -703,21 +703,20 @@ void Renderer::initPipeline() { VkVertexInputAttributeDescription positionAttribute = {}; positionAttribute.format = VK_FORMAT_R32G32B32_SFLOAT; - positionAttribute.format = VK_FORMAT_R32G32B32_SFLOAT; positionAttribute.offset = offsetof(Vertex, position); - VkVertexInputAttributeDescription normalAttribute = {}; - normalAttribute.format = VK_FORMAT_R32G32B32_SFLOAT; - normalAttribute.location = 1; - normalAttribute.offset = offsetof(Vertex, normal); - VkVertexInputAttributeDescription uvAttribute = {}; uvAttribute.format = VK_FORMAT_R32G32_SFLOAT; uvAttribute.location = 2; uvAttribute.offset = offsetof(Vertex, uv); + VkVertexInputAttributeDescription normalAttribute = {}; + normalAttribute.format = VK_FORMAT_R32G32B32_SFLOAT; + normalAttribute.location = 1; + normalAttribute.offset = offsetof(Vertex, normal); + VkVertexInputAttributeDescription boneWeightAttribute = {}; - boneWeightAttribute.format = VK_FORMAT_R32G32B32_SFLOAT; + boneWeightAttribute.format = VK_FORMAT_R32G32B32A32_SFLOAT; boneWeightAttribute.location = 3; boneWeightAttribute.offset = offsetof(Vertex, bone_weight);