Sign in to follow this  
ankhd

Help needed with D3D10_INPUT_ELEMENT_DESC

Recommended Posts

Hi all. I seem to be having trouble with the DirectX 10 Skinning10 Sample I think I have it all set up to how the sample sets it up but I cant find the samples vertex type, they use to load the mesh with, just Bytes* But I need a D3D10_INPUT_ELEMENT_DESC to pass to D3DX10CreateMesh The fx file that the sample uses is set out like so... Shader.

struct VSSkinnedIn
{
    float3 Pos	: POSITION;			//Position
    float4 Weights : WEIGHTS;		//Bone weights
    uint4  Bones : BONES;			//Bone indices
    float3 Norm : NORMAL;			//Normal
    float2 Tex	: TEXCOORD;		    //Texture coordinate
    float3 Tan : TANGENT;		    //Normalized Tangent vector
};

struct VSStreamOut
{
    float4 Pos	: POSITION;			//Position
    float3 Norm : NORMAL;			//Normal
    float2 Tex	: TEXCOORD;		    //Texture coordinate
    float3 Tangent : TANGENT;		//Normalized Tangent vector
};



Im not sure if my vertex structure matches the VSSkinnedIn here is mine

struct SkinningVertex
{
	
    D3DXVECTOR3 Pos;
    float Weights;
    float Bones;
    D3DXVECTOR3 Norm;
    D3DXVECTOR2 Tex;
    D3DXVECTOR3 Tangent;
	
};

Share this post


Link to post
Share on other sites
Thanks. The only problem I have now is setting the bone index and there weights.
I'm currently setting the bone like so.
Bones[0] = Bones[1] = Bones[2] = Bones[3] = boneindex;
I do the same with each weight I set all 4 members to the same influences.
It does render but is not at right position and the annimations not working.
I'll now work on annimation. Thanks for the help, that did the trick.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this