0

I have a tile engine set up, all of which use the same SpriteBatch, SpriteSortMode.FrontToBack, so that I can use float depth for different layers, items on map, etc.

I wanted to apply an effect to individual layers, but after trying it just applied the effect to the entire spritebatch.

So is there a way to apply different effects to different textures in the same spritebatch?

Thanks,
Shyy

Shyy Guy
  • 232
  • 3
  • 18
  • How are you applying effects? – itsme86 Dec 30 '14 at 20:05
  • I would put `effect.CurrentTechnique.Passes[0].Apply();` before drawing each layer. I've heard in XNA 4.0 it's best to apply it through SpriteBatch.Begin(...), but as far as I know this isn't necessary for the question I'm asking. – Shyy Guy Dec 30 '14 at 21:23

0 Answers0