Original Post
Hi.
I've been looking into HLSL to finally get a grasp of it, and it's coming along nicely.
There is one thing I'm very interested in, however, which I haven't been able to find good documentation for, since the search terms are pretty ambiguous.
It says here:
http://msdn.microsoft.com/en-us/library/bb976065.aspx (How To: Create and Use a Custom Vertex)
That "A custom vertex can include any standard and custom data types. This enables you to provide functionality beyond the standard XNA Framework vertex declarations, declarations such as VertexPositionColor."
Which is something I need.
I want to embed a single float value (or maybe a vector/four floats, if I have to) into my vertices.
It seems shader skinning abuses D3DDECLUSAGE_TEXCOORDs to save weights and whatnot.
I don't need that much, I simply need to save a special, constant, offset value for x positions per vertex.
There is a D3DDECLTYPE_FLOAT1 type for the declaration, but what would be the best/correct way to pull that off?
(After all, that offset has nothing to do with fog, or normals, or anything...)
Help is greatly appreciated.
Cheers =)
I've been looking into HLSL to finally get a grasp of it, and it's coming along nicely.
There is one thing I'm very interested in, however, which I haven't been able to find good documentation for, since the search terms are pretty ambiguous.
It says here:
http://msdn.microsoft.com/en-us/library/bb976065.aspx (How To: Create and Use a Custom Vertex)
That "A custom vertex can include any standard and custom data types. This enables you to provide functionality beyond the standard XNA Framework vertex declarations, declarations such as VertexPositionColor."
Which is something I need.
I want to embed a single float value (or maybe a vector/four floats, if I have to) into my vertices.
It seems shader skinning abuses D3DDECLUSAGE_TEXCOORDs to save weights and whatnot.
I don't need that much, I simply need to save a special, constant, offset value for x positions per vertex.
There is a D3DDECLTYPE_FLOAT1 type for the declaration, but what would be the best/correct way to pull that off?
(After all, that offset has nothing to do with fog, or normals, or anything...)
Help is greatly appreciated.
Cheers =)