SSR: changed raytracing termination condintion