Beispiel #1
0
        private static VertexDescriptor CreateVertexDescriptor()
        {
            var vertexDescriptor = new VertexDescriptor();

            vertexDescriptor.SetAttributeDescriptor(InputClassification.PerVertexData, 0, "POSITION", 0, VertexFormat.Float3, 0, 0);
            vertexDescriptor.SetAttributeDescriptor(InputClassification.PerVertexData, 1, "NORMAL", 0, VertexFormat.Float3, 0, 12);
            vertexDescriptor.SetAttributeDescriptor(InputClassification.PerVertexData, 2, "BLENDINDICES", 0, VertexFormat.UInt, 0, 24);
            vertexDescriptor.SetAttributeDescriptor(InputClassification.PerVertexData, 3, "TEXCOORD", 0, VertexFormat.Float2, 1, 0);
            vertexDescriptor.SetAttributeDescriptor(InputClassification.PerVertexData, 4, "TEXCOORD", 1, VertexFormat.Float2, 1, 8);
            vertexDescriptor.SetAttributeDescriptor(InputClassification.PerInstanceData, 5, "TEXCOORD", 2, VertexFormat.Float4, 2, 0);
            vertexDescriptor.SetAttributeDescriptor(InputClassification.PerInstanceData, 6, "TEXCOORD", 3, VertexFormat.Float4, 2, 16);
            vertexDescriptor.SetAttributeDescriptor(InputClassification.PerInstanceData, 7, "TEXCOORD", 4, VertexFormat.Float4, 2, 32);
            vertexDescriptor.SetAttributeDescriptor(InputClassification.PerInstanceData, 8, "TEXCOORD", 5, VertexFormat.Float4, 2, 48);
            vertexDescriptor.SetLayoutDescriptor(0, 28);
            vertexDescriptor.SetLayoutDescriptor(1, 16);
            vertexDescriptor.SetLayoutDescriptor(2, 64);
            return(vertexDescriptor);
        }
Beispiel #2
0
        private static VertexDescriptor CreateVertexDescriptor()
        {
            var vertexDescriptor = new VertexDescriptor();

            vertexDescriptor.SetAttributeDescriptor(InputClassification.PerVertexData, 0, "POSITION", 0, VertexFormat.Float3, 0, 0);
            vertexDescriptor.SetAttributeDescriptor(InputClassification.PerVertexData, 1, "NORMAL", 0, VertexFormat.Float3, 0, 12);
            vertexDescriptor.SetAttributeDescriptor(InputClassification.PerVertexData, 2, "TEXCOORD", 0, VertexFormat.Float2, 0, 24);
            vertexDescriptor.SetLayoutDescriptor(0, 32);
            return(vertexDescriptor);
        }