I’m writing a custom effect which applies in SpriteBatch. I have got it all running, drawing the input texture given along with the call, however there seems to be a problem when you want to provide arguments other than the standard registered SpriteEffect arguments.
In which the float3 LightColor is defined in Shading.fxh. I have no problem binding it from C#, all the parameters exist. The draw call merely returns a black color where it should be white though. (The LightColor should be (1,1,1), it is not)
I have read another discussion which had a similar problem with a Texture binding, do these problems relate?
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, e, Global.Map.Camera.ViewMatrix);
// e is the effect being applied.
// After which another copy of this effect is instanced at the Light draw:
LightEffect.CurrentTechnique.Passes[0].Apply();
These effects were however the same shared resource, but I guess they were separate copies anyway. Thanks for your time though!