1
\$\begingroup\$

In order to implement a basic Ubershader (a shader which is compiled numerous times with different directives (defines)) I wrote a custom shader processor in XNA. My processor outputs a dictionarry full of compiled shaders, from which I pick the needed shader at runtime. Unfortunately the final dictionarry is so large, it takes a tone of time to load into memmory when the program starts. So I wonder if it is possible to export my results into several XNA output files, which I can load one at a time (and not all at once), calling Content.Load<Effect>("Name")?

I know how to specify an output type for a single output file:

public class PSProcessor : ContentProcessor<EffectContent, Dictionary<string, object>>

It's the second parameter in triangular brackets, but what if I want several files to be created?

\$\endgroup\$
  • \$\begingroup\$ You can also just bypass the pipeline and use the EffectProcessor to handle it yourself. Might be the easiest solution. stackoverflow.com/questions/14669686/xna-4-0-and-effect-code \$\endgroup\$ – ClassicThunder Sep 23 '14 at 13:37
  • \$\begingroup\$ @ClassicThunder, I know that, but the deffault XNA content pipline system is quite convenient and I want to know if there is a way to export several files instead of one? I could use it not only for the shaders. \$\endgroup\$ – cubrman Sep 24 '14 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.