inner and outer relfections and refractions working if ray origin not on surface