Jump to content
  • Advertisement

Archived

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

Dark One

Soft Stencil Shadows

This topic is 6114 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

I''ve been trying to find a find a way to create soft edged shadow volumes. The only way I could think of was to extract the stencil data with glReadPixels, then modify it with my own routine, and then use glDrawPixels to set the modified stencil data. But I would imagine that my approach would be highly slow and inefficient. So I was wondering if one of you guys would know a better way to achieve the soft edged shadows?

Share this post


Link to post
Share on other sites
Advertisement
For static geometry with static lighting, precalculate shadow maps (its much cheaper). For dynamic geometry you can also calculate the shadow map in real time by doing a planar projection of the geometry and rendering to texture. You then decal map the texture to where the shadow should be. Texture filtering and blending will give the shadows a softer edge than the stencil buffer method.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!