fix ray type to be reflection or refraction