Jump to content
  • Advertisement
Sign in to follow this  
ehmdjii

[XNA] Editing Shaders at Runtime

This topic is 3473 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, is there a possibility that i make changes to my *.fx file and recompile it and see the changes live, while the game is running? this would speed up development a lot! :-) thanks!

Share this post


Link to post
Share on other sites
Advertisement
Like sebbit mentioned FX Composer is designed for this sort of thing, so it's probably a good choice.

If you wanted to do it in your own app, it's not terribly difficult. You can just load a new Effect instance by calling Effect.CompileEffectFromFile and then use that instance. Using the Content Pipeline would be trickier...you'd have to have your app or another app invoke the content importer and processor and then have the ContentManager load the new .xnb. If you overwrote your old .xnb file, you'd also have to have the ContentManager Unload everything since it caches resources.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!