480 Section 5 Graphics Display
|The source is heavily commented and should be easy to follow. I used Direct3D version 8 to write the demo, but the concepts are identical for OpenGL. See the README included with the application on the CD for more information on how to run ,-he demo and analyze the results. Detail is also included on how to use the "Increase CPU Work" option in the demo to study the hit to system parallelism from using the lock call versus the texture masking technique.|
Practical Priority Buffer Shadows
Shadows are very tricky in real-time graphics, because they are truly a scene-graph level problem, perhaps most naturally solved on the CPU. However, to achieve the detailed results and performance we seek, we must leverage graphics hardware to solve the shadow test on a per-pixel basis. Some graphics hardware currently has native shadow support, including priority buffers and shadow depth buffers. However, since none of these are available through a single standard interface, we will concen-trate on generic techniques that should work with modern PC graphics hardware through either Direct3D or OpenGL.
Some of the shadow techniques employed by modern games are shadow volumes, depth buffer shadows, and. priority buffer shadows. Each has various advantages and dis-advantages, briefly outlined in Table 5.6.1.