ray tracing for the shadows and percent in the light now works without bugs