Stencil Shadow and Vertex Shader

Started by
1 comment, last by jeppa 21 years, 10 months ago
What is the best way to make "Stencil Shadow" with Vertex Shader??? 1 Vertex Shader only??? 2 Vertex Shader + C.P.U.??? Thanks in advance
Advertisement
The vertex shader is used to extract the shadow volume, what would you like to do with the CPU?
You can make it in a vertex shader. It is shown in the nVidia effects browser and in Real Time Tricks and Techniques in DirectX (somewhat blatant book plug... The technique can be seen in many free examples, but I try to explain it more thoroughly in the book)

Basically, the shader can be used to push the shadow volume away from the light. A couple of passes and some stencil operations later and Viola! you have a stenciled shadow!
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials

This topic is closed to new replies.

Advertisement