Texture shadows getting there

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

Texture shadows are fundamentally working, as you can see from this forum topic. I still have to sort out the blending so that it’s not just black & white but composited on top of the existing shadow receivers. Also, the positioning of the projector / render to texture camera is not automatic yet, I’ll have to sort that out.

GL projection appears to be upside down right now, which looks like a texture matrix issue. Oddly, D3D is the right way up for perspective, and when projecting a texture rendered from the same frustum, but if you ortho project a precreated texture it’s upside down. This leads me to believe there are 2 separate problems.

I hope to nail these things pretty sharpish so I can get onto a few more things, like the vertex program extrusion of shadow volumes, and perhaps an infinite far plane for cameras. I’ve noticed a few problems with stencil shadows sometimes which appear to be caused by having your far plane too close for the dark cap to be rendered properly, and sometimes where the light is so close to an object that the finite extrusion (the only option with fixed function) cannot properly represent the volume. They can both be avoided by picking your scene setup more carefully, but a vertex program (inifinite extrusion) and infinite far plane can solve the problems more simply, so they may be worth doing.

On another note, I added shadows to the BspCollision demo, you can see some shots in this forum thread.

Time is of the essence, I have other (non-Ogre) pressures which mean 0.14 has to be done in the next 2 weeks, so I’d better get cracking.