I'm working on a lighting system for a tile-based game.
What I want to do is draw my tiles to the screen, then draw a single Texture2D object (my light map) over top of them. However, doing it in two steps results in the tiles looking "painted" and washed out.
To get this effect working, I called Texture2D.GetData()
and then used that Color
as the blending color when calling SpriteBatch.Draw()
on each tile, which results in them being "tinted" correctly. This works, but it's a fair bit slower, and won't scale up for huge maps/view areas.
So, is it possible to use a BlendState object to do what I am doing above?
- Tile map
- Light map
- Tile map with light map applied (per tile)