Here I mix two scenes produces independently by two very different rendering techniques into a single frame: Raycasting, implemented in OpenCL, and Rasterization, implemented in classic OpenGL. What allows both rendered scenes to mix seamlessly is that they share the same projection, view, viewport and depth-range transformations. In addition, they both share the same lighting model (e.g. light sources). Raycasting naturally allows reflections, but these obviously can't include the rasterized scene. Finally, the measured time for rendering each scene is displayed, revealing that the Raycasting takes significantly more processing time, but overall in real-time.

Source Code

...