Add the missing normal map texture in demo1
Fix text shader compilation for OpenGL-ES 2.0
Fix and improve active light determination

Fix and improve active light determination for single-pass rendering.
Instead of checking all lights in the scene, only the list of visible
lights is traversed every frame, and the most prominent one selected.

The selection criterion currently favours directional lights, then the
local light nearest to the viewpoint or followed object. This could be
improved by weighing light intensity and local light range.

Eventually, the sorting order could be used to limit the number of
lights also for multi-pass rendering (currently all visible light
are rendered as long as the projected size of their light volume
is large enough). The new library function sreSetMaxActiveLights()
has been added for future use.

Signed-off-by: Harm Hanemaaijer <fgenfb@yahoo.com>
Apply optional active light limit to multi-pass rendering

Allow a limit on the number of visible active lights during
multi-pass rendering. The default is an unlimited number of
visible active lights. The sreSetMaxActiveLights() function
is renamed sreSetMultiPassMaxActiveLights(). It has not yet
been fully tested. For single-pass rendering, the maximum
number of active lights is always one.

Conditionally exclude some superfluous code in draw.cpp when
NO_DEPTH_BOUNDS is defined (e.g. OpenGL-ES 2.0).

Signed-off-by: Harm Hanemaaijer <fgenfb@yahoo.com>
Use glDepthRangef to ameliorate OpenGL-ES depth precision issues

Many architectures supporting OpenGL-ES 2.0 have a non-deterministic
tile-base rendering architecture. The results in unpredictable depth
buffer offsets for the same object pixels in subsequent lighting
passes, which causes major artifacts during multi-pass (additive)
lighting.

However, OpenGL-ES 2.0 defines the glDepthRangef function which can
be used to slightly offset the depth value for pixels before being
compared to the existing depth buffer value (depth test). This
allows additive lighting to work reasonably well with much more
limited artifacts (some highlighting of edges near sharp angles).
The performance penalty is relatively small.

This improvement has been tested on a Mali-400 platform. Although
slow for more complex scenes, the rendering is correct. It even
works reasonably well with stencil shadow volumes.

Signed-off-by: Harm Hanemaaijer <fgenfb@yahoo.com>
Fix signedness compiler warnings in draw_object.cpp
Allow lower precision variables in OpenGL-ES shaders

Allowing lower precision qualifiers for certain variables
in the lighting shaders for OpenGL-ES 2.0 improves
performance somewhat on low-end platforms such as Mali-400,
without clear disadvantages.

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