Original Post
How do I pass the vertex streams (like NORMAL, TEXCOORD, TANGENT, POSITION and so on..) to my HLSL shaders? thx!
//application to vertex structurestruct a2v{ float4 position : POSITION0; float3 normal : NORMAL; float2 tex0 : TEXCOORD0; float3 tangent : TANGENT; float3 binormal : BINORMAL;};Quote:
Original post by genesys
no one who can help me with that?
struct{ D3DVECTOR Position; DWORD Color; float u, v; D3DVECTOR Binomial; D3DVECTOR Tanget;};D3DVERTEXELEMENT9 VertexElements[] = {{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},{0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0},{0, 16, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0},{0, 24, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BINOMIAL, 0},{0, 36, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, 0},D3D_DECLEND};LPDIRECT3DVERTEXDECLARATION9 VertexDecl = 0;Device->CreateVertexDeclaration(VertexElements, &VertexDecl);This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more