New video with shadows and lights:
I de-hacked (mostly :-P) the light stuff and made proper dynamic lights in the world which are culled away from portals and cameras when they aren't visible (there still is room for a lot of optimization though). Also the lights are now created, destroyed and manipulated via the game scripts.
In the video above i show a few overcasting lightsources which were placed as entities in the world editor. These entities simply create dynamic lights at their own position using this script:
func Lightbot:constructor {ent type} {
local light
set light [dlight-new spot]
dlight-position $light [entity-position $ent]
dlight-direction $light {0 -1 0}
dlight-radius $light 512
dlight-inner-radius $light 480
dlight-shadow $light 1
dlight-color $light {0.75 0.85 0.9}
}
(the lightbot name is because i want to add at some point a small flying robot that follows you around and illuminates the path towards your way :-P)
Here are two images with the new lighting and shadows. The first one points out the varying penumbra sizes:
And the second one... does the same, just using a flashlight :-P
The lighting and shadow filtering still needs some tweaking (and optimization) but i think that the hardest (and most interesting :-P) are is already done. Although i still need to implement fallback dynamic lights for the "simple glsl" and "fixed function" render paths of the OpenGL backend (and of course update the OpenGL ES backend at some point for Android).