• Advertisement
Sign in to follow this  

Shadow Volumes, a quick hack.

This topic is 4711 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'm trying to implement shadow volumes in my engine. So, I was thinking, as a quick hack, of a way to do it without making it too complicated, and I'd like your comments about it, if you can spare the time :). I was thinking, that instead of adding the *forgot the name* quads to my mesh, bofore rendering it (so that the VS could use them to create the sides of the shadow volume), I'd just skip that step (sound freaky). What I intend to do is leave my mesh with per vertex normals (as it's my understanding that for normal shadow volumes, you'd need per face normals). Then, I'd set-up my vertex shader to simply displace all vertices with a normal facing away from the eye point along the light vector (I'm using directional lights). So, what I'd get is that the VS would deform the mesh and strech any faces which are more or less facing the eye point. The results would be a (hopefully) moderately deformed shadow volume, for a very low proccessing cost. Now, I realize this would only work on specific models (ones with a more or less equal scatering of faces around all sides of the mesh, to my understanding), but I feel this would be a simple first implementation of the shadow volume technique, that I could build on. So, would this work, or have I completely lost it? I'm sure it'll be fast, but I'm not quite sure how it'll look. Thanks for the comments :).

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement