A few more things off the todo

· by Steve · Read in about 2 min · (258 Words)

Well, after ruthlessly crushing the light cap problem underfoot, I now have what appear to be pretty darn stable shadows. I’ve had a couple of small problems, but I think they’re due to dodgy meshes rather than bad code - with volumes it’s very important that the mesh is completely closed.

I’ve knocked off a few more items, namely 2-sided stencil support (which allows you to render 1/2 as many shadow volumes, which is nice), more config options, multiple light combinations and being able to turn off the shadows for each light. Multiple shadows don’t look too hot when using modulative shadows anyway, since the additional light shows up the sharp edges where the shadow volumes start (which are usually hidden in the penumbra).

I still can’t figure our why hardware skinned characters refuse to generate a volume; the software blend for the silhouette is working, the vertex buffer is definitely the right one, everything looks fine. As you can see from the above, I keep switching to other things every few hours just to keep myself from smashing something. I’m sure I’ll get it eventually, and kick myself, but now it just seems like one of those totally illogical problems…

Next, I have to optimise the locating of objects which will be casting shadows into the frustum; I hope to be able to adapt the technique used to work out if the shadow could be intersecting the near plane (which triggers the zfail fallback), although I’m not quite sure how this will play with the directional lights.