Texture shadows done, more polishing to do

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

Modulative texture shadows are done, they now work with directional lights and spot lights, and have some nice fade-out features meaning that the shadows fade out in the distance for directional lights, and fade out around the edges of the spotlight range for spotlights - the latter is really important since the clamping on the shadow texture would cause horrible ‘smears’ to appear on other geometry when casters hit the edge of the texture.

There are a couple of transform problems with GL, I fixed the general projection alignment but GL has a very stateful transform pipeline and something is getting screwed up right now, leading to the texture positioning changing depending on what else is visible. This is one aspect of GL I hate - I wish the result of method calls would not depend on the current state of the transform pipeline, it leads to all sorts of ordering problems. Anyway, hopefully temas and _mental_ can help out with that while I work on other things.

I’m sorting out what happens with shadow casters and receivers when vertex programs are in use, and allowing alternative programs to be specified in this case. After that, I want to hop back to stencil shadows for a bit to add vertex program extrusion, and add an infinite camera far plane option - this should remove the final few glitches that can appear with bad combinations of far plane and extrusion distances.

If I’m lucky, I might get time to add shadowmaps before the release.