Refractive index and speed of light in materials