   Shadow volume self-shadow artefacts
  I've been messing around trying to get shadow volumes to work in my engine, and I'm mostly there. Only trouble is, I seem to be getting some really nasty looking artefacts when it comes to self-shadowing:It's even clearer in this one:Is this just what you expect with shadow volumes, or do you think maybe it's my mesh, or am I doing something wrong altogether, do you think? I'm finding the volumes using edges shared by a back-facing and a front-facing triangle, purely based upon the adjacency table returned by DirectX's .X loader.Also, I'm not entirely sure what that dodgy looking quad is in the bottom picture, it looks there like it's being cast by the top of the trunk (although it may be being cast by the foliage on the front of the tree)Any thoughts welcome!   
Quote:Is this just what you expect with shadow volumes...Yes. This is the extrusion of the volume ... you do this per-vertex.   ;  The first one looks like what you'd expect, a way to get round this is to render you shadows before your occluders, so you don't get self shadowing.The second one could be a "hole" in the mesh (remember you objects need to be completely enclosed topologically with no gaps, or your shadows will leak out).   ;  yes with self shadowing you always run into this trouble: a face of a self-shadowed model is either always completely in shadow or completely out of shadow(this doesnt aply to a model that recieved a shadow from another occluder.)So there are a few ways i know of to reduce it: you can use a material with a very low ambient and high diffuse for a high contrast, you can do what the above suggestion said and disable self-shadowing by rendering your occluders last, but then they dont receive any shadows unfortunately. Or you can do some hacks where models recieve shadows but dont recieve self-shadows.. ths is complicated and takes some tweaking in draw orders.Then there is another option, which i like better. Render your shadow stencils result to a shadow buffer, like a rgba render target, and blur the result using a gaussian blur shader. This wont eliminate the problem, but the softened shadows will be much better looking, and have less noticeable artifacts.In fact, even with shadow mapping you run into similar(though caused by different things) problems with self-shadowing. In fact self-shadowing on things like characters still are very hard to make look good. Most games allow you to turn this off, like Oblivion.   