• Advertisement
Sign in to follow this  

[XNA] Editing Shaders at Runtime

This topic is 3384 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