
The XNA Content Pipeline is pretty good. It implifies the process for importing and loading models, textures, and other content. Unfortunately, it is optimized for loading data, not code. Effect files are essentially code, so an alternative approach could provide additional benefits.
Like the XNA Content Pipeline, Effect Generator compiles your .fx files at build time, reducing game load times. Additionally, Effect Generator further simplifies run-time loading and effect parameterization.
Place your effect file in Content folder :

We start by declaring an Effect:
Effect effect;
We’ll use the Content pipeline to load an instance of the Effect class:
effect = Content.Load<effect>("effects");
And render using the effect:
effect.CurrentTechnique = effect.Techniques["Pretransformed"];
effect.Begin();
foreach (EffectPass pass in effect.CurrentTechnique.Passes)
{
pass.Begin();
pass.End();
}
effect.End();
Read more…
SocialVibe