Jump to content
  • Advertisement

Archived

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

jeppa

Stencil Shadow and Vertex Shader

This topic is 5896 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
Advertisement
The vertex shader is used to extract the shadow volume, what would you like to do with the CPU?

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!