I was wondering if you have any idea as to implement a 2D (that is only textures) graphic sceme, in where the light source and the target are in 2D space if using Direct graphics 9.0, and/or fx shaders.
The idea is to create a 2D sprite and put it in a 3D space(Although we wouldn´t use 3D since it is a 2D game, it actually get´s to use the graphics card for computation). In other words Z would be always set so zero, unless some zoom in/out effect is desired (or background 3D models)| The source of light moves in realtime as does the target. And to shade, the sprites would be rendered with a Bump mapping-like technique, where different intensities of gray( in a second image), represent the lightning computation. That is, the darker it is, the nearer to the screen it is| so it would actually be a pixel level shading| And of course, if the source would be pointing to a dark area, then that part would be somewhat illuminated, but immediately after a white part, if the line of the light ray continues further and finds a dark part in the bump image, the color intensity in the original image would diminsh(thus causing a rounded 3D effect).

Do you have any references as to implement this kind of algorithm ?
Thanks for your time.













