Original Post
I am trying to implement a simple, yet fast, lighting in a 2d game. My original method was using a library I wrote in MMX and C, via DLL (this is a visual basic game) and storing an alpha/brightness value per pixel, and shading the map to black based on the mapped value. It was reasonably fast, but this was using directdraw. I converted my game to directx8, and now I am not sure how to do it. I don't want to use this DLL any more, so I was wondering if there was some way I could do something such as .. create a texture the size of the viewport, and "clear" it to the ambient light, and then draw light sources on it, by setting this texture as the render target? I'm not sure how I can do this, as I want to only add the alpha values to the texture, so that the "light" is merely "less dark" but never brighter than the original color. Any help would be appreciated.