Archived

This topic is now archived and is closed to further replies.

Stencil Shadow and Vertex Shader

This topic is 5648 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites