float4x4 gBones[70];

// gets vertex of pos and normal
float2x4 GetTransformedVertex(float4 boneIndices, float4 boneWeights, float3 pos, float3 normal)
{
    float4 originalPos = float4(pos, 1);
    float2x4 posNormal = (float2x4) 0;
    
    for (int i = 0; i < 4; ++i)
    {
        int boneIndex = boneIndices[i];
        if(boneIndex > -1)
        {
            posNormal[0] += boneWeights[i] * mul(originalPos, gBones[boneIndex]);
            posNormal[1] += float4(boneWeights[i] * mul(normal, (float3x3) gBones[boneIndex]), 0);
        }
    }
    posNormal[0].w = 1;
    
    return posNormal;
}