Why would this be?
And, I'm going to write a small interface and release it.
By any chance do you have any knownledge about using the MonoGame processors? I'm doing this:
Use the pipeline to build a dummy version of the effect at runtime (Using the default pipeline is kind of tricky to get the directories right.
Then expose the constant buffers in the effect and use the effect to generate the cbuffers for your parameters.
Then inject the right shaders and cbuffers into the GPU.
The problem I'm having is, I have an effect that has both the real version and the dumbed down version by using
#ifndefs to check if using the pipeline or the DirectX compiler. But, since I want to use the pipeline on runtime, I have to add these manually. How would I do this? Also, I'm getting an error stating that
Access to the path 'C:\Effect.xnb' is denied. any ideas as to why?
Here is my snippet that compiles the effect on runtime:
public void LoadEffect(string fileName, GraphicsDevice GD)
Pipeline = new PipelineManager(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), Path.Combine(Assembly.GetExecutingAssembly().Location, "\\tempBin"), Path.Combine(Assembly.GetExecutingAssembly().Location, "\\tempBin"));
Pipeline.Profile = GraphicsProfile.HiDef;
OpaqueDataDictionary ODD = new OpaqueDataDictionary();
var BuiltContent = Pipeline.BuildContent(fileName, processorParameters: ODD);
var ProcessedContent = Pipeline.ProcessContent(BuiltContent);
var eff = new Effect(GD, ((CompiledEffectContent)ProcessedContent).GetEffectCode());
this.InternalEffect = eff;
File.Delete(".\\tempBin\\" + fileName.TrimEnd(".fx".ToArray()) + ".xnb");