refactors light/nolight in material