Game Development Reference
Figure 1.10. Different mipmap levels matching different roughness strengths.
approach lies in the generation of accurate preconvolved image proxies, which is
impossible because of the lack of information outside of the 2D texture. The low
resolution of the mipmap is also problematic: small image proxies will contribute
too few pixels. Finally, if there are several characters in a scene then the num-
ber of draw calls can increase significantly. Since we know we cannot achieve
sucient accuracy anyway, we choose a cheaper approach.
Convolving base mipmaps. A simpler approach consists of recursively blurring
mipmap textures. Each mipmap stores the result of convolving the previous
lower mipmap level with a specified blurring kernel. We use a Gaussian blur that
we found to be sucient for our needs.
Aliasing. Aliasing is an important issue that our method must address. The
reader may notice that in Listing 1.1 a texCUBE instruction is used instead of
texCUBElod that would force a fetch from the base cubemap. This reduces aliasing
even if mipmaps are generated in a subsequent step. For completeness, it should
be added that a better way would be to use the texCUBElod instruction and,
at scene rendering time, compute the required hardware mipmap level and the
desired mipmap level based on roughness, then chose the larger of the two values
[Scheuermann and Isidoro 05]. We decided against this approach for performance
1.3.2 Applying the 2D Reflection Texture
The preconvolved 2D reflection texture can now be used on any planar objects
lying at the same height as the reflection plane used to generate the texture. The
rendering process for our texture is similar to the mirror surface case. We use
the texture to provide the reflection value by performing a texture lookup with
the actual screen coordinates as the texture coordinates. We approximate rough
surfaces by offsetting the texture coordinates along the XY components of the
surface normal with an artist-controlled parameter for the distortion strength.
We also use the glossiness of the surface to select the right mipmap level to use
The distortion will vary with distance but we did not find it to