Patent ID: 6384822
Filing Date: 2002-05-07
Classification: G06T

Abstract:
A 3-D graphics method performed by a computer for real-time rendering of shadows in 3-D scenes to be displayed on a computer monitor, with the method using a shadow volume, calculated for a first object in a 3-D scene and defined as a region of space in the 3-D scene bounded by transparent shadow volume polygons in which the first scene object will cast a shadow on any part of another scene object included with in the shadow volume, and the method using a stencil buffer and a depth buffer, with both the stencil buffer and depth buffer having an entry for each pixel in a bit map for displaying the 3-D scene on a computer monitor, said method comprising the steps of:drawing the 3-D scene without the transparent shadow volume polygons and rendering depth into the depth buffer; enabling an inverted depth buffer comparison test where a current pixel having a depth value greater than a depth value stored in a corresponding entry of the depth buffer passes the test; disabling writes to the depth buffer; initializing the stencil buffer by resetting all stencil buffer entries; for a current viewpoint, rendering transparent shadow polygons facing away from the current viewpoint and incrementing corresponding stencil buffer entries only for pixels which pass the inverted depth buffer comparison test; and for the current viewpoint, rendering transparent shadow polygons facing toward the current viewpoint and decrementing corresponding stencil buffer entries only for pixels which pass the inverted depth buffer comparison test so that the stencil buffer marks out an area of the 3-D scene included in the shadow cast by the first object.