refactors lights so that no light using material passes