Provide hierarchical regular shadow maps

Provide a hierarchical set of shadow maps of various resolutions
for spot/beam lights and directional lights. Directional lights
currently always use the largest shadow map (2048x2048, 32-bit
precision), while spot/beam light shadow map size is determined
using heuristics like for point light cube maps.

Remove old shadow map creation code.

Adjust shadow map poisson factor offset according to shadow map
resolution. Adjust depth comparison bias according to depth texture
precision.

Invalidate geometry scissors cache when switching to geometry scissors.

Signed-off-by: Harm Hanemaaijer <fgenfb@yahoo.com>
Remove old shadow map code in lighting shader, simplify segment scaling

Remove the old shadow map code in the lighting shader, and simplify
the segment_scaling uniform for shadow cube maps. With the new
shadow map method, there is only one scaling value which corresponds
to the radius of the light volume. Ideally the new shadow map code
should, like the old version, be able to handle empty cube segments
without explicitly clearing the cube map segment, which causes
unnecessary overhead especially when the cube map resolution is high.

Signed-off-by: Harm Hanemaaijer <fgenfb@yahoo.com>
Render only back-faces of closed models shadow maps

Improve shadow map generation speed by only rendering back faces
(away from the light) for closed models. Apart from improving
speed, this also significantly reduces "shadow acne" artifacts.

Add some code to potentially use a custom cube map when one of more
faces of a large resolution cube map are empty. This is work in
progress. The goal is to avoid the unnecessary waste of memory
bandwidth because of clearing cube map faces that are not used
 anyway.

Signed-off-by: Harm Hanemaaijer <fgenfb@yahoo.com>