Additive lighting & shadows

· by Steve · Read in about 1 min · (116 Words)

Today I implemented additive lighting & shadows, ie a more realistic (and more expensive) technique where multiple lights and their shadows can be combined more realistically. You can see my initial results in this screenshot.

Basically we have to split or categorise every pass into an ambient, per-light or decal pass, and build up the lighting in the scene by rendering the ambient passes, then rendering per light whilst masking out shadowed areas, then render the textures over the top.

It’s working very well in D3D, GL is giving me a few headaches right now, it seems I have a light state problem and a shadow volume problem with animated meshes., which I’ll have to investigate.