Game and movie studios are switching to physically based rendering en masse, but physically accurate filter convolution is difficult to do quickly enough to update reflection probes in real-time. Cubemap filtering has also become a bottleneck in the content processing pipeline. We have developed a two-pass filtering algorithm that is specialized for isotropic reflection kernels, is several times faster than existing algorithms, and produces superior results. The first pass uses a quadratic b-spline recurrence that is modified for cubemaps. The second pass uses lookup tables to determine optimal sampling in terms of placement, mipmap level, and coefficients. Filtering a full 1282 cubemap on an NVIDIA GeForce GTX 980 takes between 160 μs and 730 μs with our method, depending on the desired quality.
Click here to download the complete paper: PDF
Note: The code is an excerpt and will not compile as-is. The filtering code demonstrates how to interpret the supplied table.The filtering code shows how to use the quadratic table, and will have to be modified slightly to use the simpler constant tables.