merged (cherry-picked) the ray_tracing branch into epi branch