* fix stack corruption when the scene has more than 255 lights
* fix froxelization with more than 255 lights
Make sure froxelization works when the engine is
configured with more than a maximum of 255 lights.
The main issue was that the froxel structure on the
GPU uses 8 bits to encode the light count (per
froxel). So we have this 255 light max per
froxel limitation. The CPU code now honors this.
With this change we can go back to 256 lights
from 255!
All that said, it’s not recommended to increase
the maximum number of lights because the memory
usage on the CPU explodes. For instance we
go from 4 MiB with 256 lights to 18 MiB for 1024.