CHAPTER 21Simple Environment Map Filtering Using Ray Cones and Ray Differentials
https://link.springer.com/content/pdf/10.1007%2F978-1-4842-4427-2_21.pdf
347© NVIDIA 2019 E. Haines, T. Akenine-Möller (eds.), Ray Tracing Gems, https://doi.org/10.1007/978-1-4842-4427-2_21CHAPTER 21Simple Environment Map Filtering Using Ray Cones and Ray DifferentialsTomas Akenine-Möller and Jim NilssonNVIDIAABSTRACTWe describe simple methods for how to filter environment maps using ray cones and ray differentials in a ray tracing engine.21.1INTRODUCTIONEnvironment maps (EMs) are commonly used in rendering as an inexpensive way of visually representing a scene far away. Another common usage is to let an EM represent the incoming illumination from a surrounding environment and use it to shade geometry [4]. Two common environment-mapping layouts are latitude-longitude maps [2] and cube maps [5].Rasterization occurs in quads, i.e., 2 × 2 pixels at a time, which means that differentials can be estimated as horizontal and vertical pixel differences. These differentials can be used to compute a level of detail in order to perform a texture lookup using mipmapping. The concept of quads is not available in ray tracing, however. Instead, texture filtering is usually handled using ray differentials [6] or ray cones [1, 3]. These two methods are presented in Chapter 20. For ray differentials, Pharr et al. [7] used a forward differencing approximation to compute ray differentials in texture space for EMs. The major parts of the computations involved are three vector normalizations and six inverse trigonometric function calls.Since the environment map is assumed to be positioned infinitely far away, environment mapping using rasterization depends on only the reflection vector, i.e., the directional component, and not on the position where the reflection vector was computed. For ray cones and ray differentials, there are also positional components of the ray representations. Similar to rasterization, however, these need not be used, as argued in Figure 21-1. In this chapter, we provide the formulas to compute EM filtering for both ray cones and ray differentials.351Open AccessThis chapter is licensed under the terms of the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License (http://creativecommons.org/licenses/by-nc-nd/4.0/), which permits any noncommercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if you modified the licensed material. You do not have permission under this license to share adapted material derived from this chapter or parts of it.The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. SIMPLE ENVIRONMENT MAP FILTERINg USINg RAY CONESAND RAY DIFFERENTIALS