how to use custom shaders in monogame?

I can’t find any tutorials on this…I use the pipeline tool to compile it and then? how can I use it in my program? how to feed vertex buffer and send data to constant buffer? thanks!

Search for monogame custom effect or xna custom effects. You will find lots of info. There is a custom effects section in the monogame docs too.

1 Like

I’m currently trying the same thing I’ve found bits of random things (lots of info however none with concrete examples for MonoGame and its Pipeline in its current state) by looking for the tutorials as mhughson said. However most of them are outdated and for XNA and require some other things to get them to work in MonoGame.

What I’m currently doing is reverse engineering and playing around with mainly looking at the Game1.cs to see the MonoGame side of things and the Shaders folder to see the shader side.

Also take a look at Getting Effect .fx files to compile and run Hints, Tips and Gotchas and make sure you use the proper compile profile. In my case I had to change mine to the DirectX ones.

And once you get a shader to actually work you can transfer most of the tutorial things over and play around as the techniques are the same.