
188 III Lighting
1.3.2 Depth Bounds
The LightFragmentLink structure stores both minimum and maximum light depth;
however, those two values are rasterized by the hardware and sent to the pixel
shaders at different times: The minimum depth will be carried through by the
light geometry’s front faces, whereas the maximum depth will be provided by the
geometry’s back faces.
We first draw the light geometry with back-ace culling turned on to allow
rasterization of only the front faces. A pixel is determined to belong to a front-
or back-facing polygon by the use of the HLSL semantic
SV_IsFrontFace.
We perform a software depth test by comparing the light dept