Lighting algorithm | ScratchStats