Stencil shadows and smooth shading

Originally posted by Madoc:
rgpc,
was you post in reply to mine?

Sorry, no I should have quoted AndersO to make this clear. My solution was for the original post.


If so, I don’t think you understood what I was saying.

Having re-read your post, you’re right. I cannot for the life of me picture a concave edge. In my post I suggested rendering the back faces as the end cap on the shadow volume (irrespective of shadow count). This stops the object from self shadowing on the rear facing polys.

IMO this looks nicer as you have the nice graduated shading from the lighting (ie. the object looks like it does with out the stencil shadowing), with out the “wrong” looking sharp shadowing on the back faces.

There was a big thread here around the time Cass originally posted his idea documented at this URL with text, source code and images. I think it’s the same demo code you already have but this has the text of Cass’ own explanation.
http://www.r3.nu/~cass/shadow_volumes/

[This message has been edited by dorbie (edited 03-21-2003).]