diff --git a/gpu.c b/gpu.c index 8e25373..646fc9a 100644 --- a/gpu.c +++ b/gpu.c @@ -501,6 +501,18 @@ void gpu_init(gpu_ctx_t *ctx, const gpu_config_t *config, model_t model) .format = VK_FORMAT_R32G32B32_SFLOAT, .offset = offsetof(vertex_t, normal), }, + { + .binding = 0, + .location = 2, + .format = VK_FORMAT_R16G16B16A16_UINT, + .offset = offsetof(vertex_t, bones), + }, + { + .binding = 0, + .location = 3, + .format = VK_FORMAT_R32G32B32A32_SFLOAT, + .offset = offsetof(vertex_t, weights), + }, }; const VkPipelineVertexInputStateCreateInfo vertex_input_config = { .sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, diff --git a/vert.glsl b/vert.glsl index 60496e3..56e63a4 100644 --- a/vert.glsl +++ b/vert.glsl @@ -2,6 +2,8 @@ layout(location = 0) in vec3 position; layout(location = 1) in vec3 normal; +layout(location = 2) in uvec4 bone_indices; +layout(location = 3) in vec4 weights; layout(location = 0) out vec3 frag_normal;