Yup, it's possible.
Here's some techniques on how to do it Doom 3 style:
http://www.angelfire.com/games5/duktroa/RealTimeShadowTutorial.htm
http://www.gamedev.net/page/resourc...ng/the-theory-of-stencil-shadow-volumes-r1873
http://www.opengl.org/resources/code/samples/mjktips/rts/index.html
And the concept itself is pretty simple - there's a lot of things to know before hand, but overall you can understand the concept without too much math:
3D Shadow Volumes 101: The main idea is "seeing what the light sees." - It's sounds a little strange but makes sense when you think about it - Anything that a light can "see" is lit, anything not "seen" by a light is in shadow. OpenGL.org has some good resources on how to do basic stencil shadow volumes:
http://www.opengl.org/resources/code/samples/mjktips/rts/index.html. Id Tech 4 (
http://en.wikipedia.org/wiki/Id_Tech_4) shows that this simple shadow volume concept is extensible even to large production games like Doom 3
There's a nice tutorial on the specific Doom 3 style implementation in OpenGL at:
http://www.angelfire.com/games5/duktroa/RealTimeShadowTutorial.htm
----
Basic overview of the technique:
"Stretch out" a shape based the direction light shines on it. The area blocked out by the silhouette of a shape becomes a "shadow volume" anything inside the shadow volume will be darkened and not receive the full effect of the light
Technical OpenGL part: We use something called a "depth buffer" (it's kinda like how the computer handles drawing the pixels of 3D objects, for more info:
http://en.wikipedia.org/wiki/Z-buffering) The depth buffer allows us to check if an area of the scene should be shadowed or not, 1 means the area is blocked by a surface, and therefore in shadow, 0 means we draw light at full effect on the surface
That's the idea behind how we get to this image: [/URL]http://www.angelfire.com/games5/duktroa/images/stencil06.jpg[/URL]
It's a pretty cool concept that you really don't see used a lot in most games (many games use precomputed non-realtime lighting).
I wasn't even aware of good graphics documentation like this when I first wanted to try testing out cooler graphics.
Don't think that just because SRB2 uses an old game engine means that more modern stuff like this is impossible to implement - it IS possible, it just involves some work.
When you look at the technical side, all you really need are some good sources & reference material, patience, a good programming IDE, and a decent computer(and you don't even need a ridiculously tricked out PC to run fancy visual effects either - my graphics card is just a integrated one!)
All that to help any aspiring graphic programmers and to show that I know what I'm talking about. :P
Peace.