Currently I have a working skinned shader that uses float4x4 bone matrices.
Code snippet in Vertex Shader:
float4 position = mul(float4(input.position, 1.0f), Bone);
Bone is the float4x4 matrix of the bone. input.position is the vertex position as it comes into the vertex shader.This works perfectly fine, now I want to convert to float4x3 for the Bone matrix as an optimization, but it doesn't work:
float4 position = float4(mul(input.position, (float4x3)Bone), 1.0f)
What happens is that everything in the mesh is rendered in the origin of the model, so basicly it seems that the translation of the bone is not being applied now.I've been trying to figure it out by swapping arguments around and trying float3x4 and such but nothing makes it right.
Anyone with a clue?