开发者

Real time soft shadows without stencil buffers

I'm really curious how the following is done

Real time soft shadows without stencil buffers

(source: kortham.net)

They seem to achieve real time softish shadows on the iphone which does not have a stencil b开发者_JAVA技巧uffer available. It seems to run pretty fluid here http://www.youtube.com/watch?v=u5OM6tPoxLU

Anyone has an idea?


The stencil buffer allows hardware acceleration of shadows rendering, but isn't necessarily needed for displaying shadow volumes. With a low count of bodies and light sources, the software may emulate the behavior of the stencil buffer (but that will be very slow, compared to the hardware-accelerated implementation).

Also, there is other ways to display shadows. The most frequently used is Shadow Mapping (a more in-depth approach can be found on GameDev.net), which doesn't require a stencil buffer. It is used for PS2 games, as well as Wii games, because those hardware also doesn't have a stencil buffer.

And finally, under the circumstances of this particular game, the shadow algorithm can also be implemented as a simple ray tracing system, because there is no need for floor detection, and the shadows are basically calculated on 2D simple shapes (circles and squares). That might be the best approach for this particular case.


Most likely a "Shadow Mapping" variant. http://en.wikipedia.org/wiki/Shadow_mapping

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜