Discrete ordinates solution of radiative transfer across a slab with variable refractive index