Point light fixed.
The weird bug (little black squares appearing on screen) was due to the stencil buffer:
The point light rendering totally changes the stencil buffer, so it is not reliable anymore to check which pixels have not been rendered.
I changed the pipeline this way:
Deferred bufferization
Clears the depth, stencil and color buffers
Draw the geometry, everywhere the geometry is drawn, the stencil value is 0, otherwise its 1
Directional light
Clears the light accumulation buffer
Computes the directional light only where the stencil is 0
Skybox
Writes only where the stencil is 1
Set the accumulation buffer value everywhere it writes to 1 so that the skybox is not dark
Other passes
On the debug pipeline, I have changed the order of the debug drawing and the light billboards are now draws in alpha test mode.
A bug on the compressed texture mipmapping has been also fixed.
Point light fixed. The weird bug (little black squares appearing on screen) was due to the stencil buffer: The point light rendering totally changes the stencil buffer, so it is not reliable anymore to check which pixels have not been rendered.
I changed the pipeline this way:
On the debug pipeline, I have changed the order of the debug drawing and the light billboards are now draws in alpha test mode.
A bug on the compressed texture mipmapping has been also fixed.
closes #538