Ray integration