add caching for light rays
fixed bug with light rays: should be visible only for closed circuit