RPU: A Programmable Ray Processing Unit for Realtime Ray Tracing