|
计算机应用 2007
Improvement of real-time planar shadow algorithm and its implementation
|
Abstract:
Shadows are important to improving the reality sensation of an image. This paper discussed planar shadows algorithm and its improvements. The stencil function controlled whether a fragment of shadows was discarded or not by the stencil test with the Stencil Buffer of OpenGL. A 3-D projective transformation of a pyramid to a box was used to remove the antishadow and the false shadow. The soft shadow was realized with the accumulation buffer of OpenGL. The improved algorithm presented here is optimized for real-time applications with OpenGL, and the computation efficiency, the reality sensation of graphics and the visual quality of the image are improved efficiently.