Archived

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

Soft Stencil Shadows

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