Original Post
I just read the ''Dynamic 2D Soft Shadows'' article by Orangy Tang on GameDev, and found it very interesting for a relative beginner to OpenGL such as myself.t
I want to create a circle of light, as shown in the article, that fades away around the edges, but I also want the transparency of the images to be retained.
The method of setting all alpha values in the screen buffer to 0, then putting a circle of higher alpha values fading to 0 over the top, then blitting all images using (GL_DST_ALPHA, GL_ONE) as the blending function is beautiful, so long as I don''t care about source image transparency.
How do I retain the transparency of my images (I use GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA as my blending function for transparency), but also have them fade away, taking into account their source alpha levels.?
Do I need to do several rendering passes, and if so, how do I go about it?
Thanks guys,
Rob
note:
This post is similar to one I posted in the NEHE forum, I apologise if cross-posting gets your goat, but I''ve received no answer to the first post in two days, so I thought I would try this forum too, hope no one minds.