This project has moved and is read-only. For the latest updates, please go here.

Sprite Effects

May 2, 2015 at 11:46 AM
Edited May 2, 2015 at 11:46 AM
Hi all. Are there any tutorials on how to use effects such as lights etc, or can any one explain how to use them ? Can I use these effects with sprite batch, or do I have to use deviceContext to draw with effects, and sprite batch supports only the DirectX::SpriteEffects ?
May 3, 2015 at 11:24 AM
Ok I think I got it now. Use sprite batch and sprite font for some simple 2d and text rendering just as direct draw but if I wanna do some more advanced stuf than I have to do it in the same way as with direct x 11 so if I want to use light than I need normal, so I need mesh, shader, input layout etc.
May 3, 2015 at 8:17 PM
You can write your own custom shaders to use with SpriteBatch for special effects like 'lit-sprites'. I have been planning to add a bit more of this to the docs when I get some time, particularly the kinds of tricks you can do with a sprite and a normal-map for it.

But yes, things like true lighting using Effects is for 3D rendering using PrimitiveBatch, GeometricPrimitive, and Model.
May 4, 2015 at 9:14 PM
Hi again. I don't want to open new thread so I'm asking here, what I need to know is should I create only one SpriteBatch instance ? or there can be multiple instances of it and if what about performance ?
May 5, 2015 at 10:04 AM