Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Error when drawing models with custom effects

$
0
0

@Ultima124 wrote:

I'm trying to draw a model but this time I would like to use my own shader effect. But Monogame gives me an error about not having the proper vertex declaration.

"The current vertex declaration includes these elements: SV_Position0, NORMAL0, TEXCOORD0."

My draw code looks like this.

        foreach (ModelMesh mesh in TestModel.Meshes)
        {
            foreach (ModelMeshPart part in mesh.MeshParts)
            {
                part.Effect =Shader;
                part.Effect.Parameters["WorldViewProjection"].SetValue(World * View * Proj);
                mesh.Draw();
            }
        }

The effect was generated by the pipeline tool. I haven't even edited it yet.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles