improve light castShadow handling

Signed-off-by: Jan Sutter <jan.sutter@dfki.de>