Ray-Marching

Ray marching algorithms are expensive, what are the alternatives?

If an application implements a ray-marching graphical effect such as Screen Space Reflections (SSR), the algorithm should implement an optimal sampling technique which takes as few samples as possible to achieve the desired quality. One possible approach to reducing the number of samples is to perform the ray marching in a half-screen resolution buffer – in other words, down sampled. PowerVR hardware exposes an extension in OpenGL ES for hardware-accelerated down sampling, see Frame Buffer Down Sampling. This approach could also be coupled with a hierarchical-Z buffer (similar to the technique discussed above) to accelerate the ray marching further.

In place of the relatively expensive ray marching algorithms, consider using a parallax corrected local cube map method. This could be used as either a fall-back technique, or even as the main technique as it may be good enough visually for the application, and is considerably cheaper to perform. Also consider simple, cheap, planar reflections for flat surfaces.

An article discussing an optimal SSR technique can be found here and an article discussing a local cube map can be found here.