Advertisement Jump to content
Sign in to follow this  
ehmdjii

[XNA] Editing Shaders at Runtime

This topic is 3654 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!