Sign in to follow this  

Help needed with D3D10_INPUT_ELEMENT_DESC

This topic is 3197 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

This topic is 3197 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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