noNchaoTic

Hey all, I was wondering how one would go about creating a BasicEffect in a content processor, in exactly the same way that say, the default Xna mesh processor would do so More specifically is there a specific content class that one can serialize (and deserialize) that will result in a BasicEffect instance


Re: XNA Game Studio Express Creating BasicEffects in content processor

Joel Martinez

I've never had to create any effects in the content pipeline so this may just be ignorance. But maybe you could take a look at the BasicMaterialContent class. Combined with some of the information found in this blog post:
http://blogs.msdn.com/shawnhar/archive/2006/12/07/rendering-a-model-with-a-custom-effect.aspx





Re: XNA Game Studio Express Creating BasicEffects in content processor

Shawn Hargreaves - MSFT

Joel is exactly right.

At design time, make a BasicMaterialContent instance, and fill it with your settings data. When loaded, that will turn into a BasicEffect instance that the GPU can use.