Basically i'm trying to create a custom vertex and use it in my vertex shader. The vertex is simply a standard position colored vertex, but i want to add an integer value as well. I cant seem to figure out what vertexformat and vertex semantic to use for this integer value. I've tried using the pointsize and blendindices formats/semantics, but the shader doesnt seem to recognize any value a set for scale.
How can i use an integer value in my custom vertex?
Heres an example of my vertex structure as defined in my program (VB.Net):
<System.Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)> _ Public Structure PositionColoredScale Public Position As Vector3 Public Color As Integer Public Scale As Integer Public Shared ReadOnly Format As VertexFormat = VertexFormat.Position Or VertexFormat.Diffuse Or VertexFormat.None Public Shared ReadOnly Property SizeInBytes() As Integer Get Return System.Runtime.InteropServices.Marshal.SizeOf(GetType(PositionColoredScale)) End Get End Property End Structure
Here's the structure in my shader:
struct VSInputVcScl
{
float4 Position : POSITION;
float4 Color : COLOR;
uint Scale : BLENDINDICES0;
};
Thanks guys.






