How it works...

Once we've created the diffuse convolution, there's not much to this technique. We just simply look up the value in the convolved map DiffConvTex and multiply it with the base color of the surface. In this example, the base color for the surface is taken from a second texture map (ColorTex). We apply gamma decoding to the base color texture to move it into linear color space before multiplying with the environment map. This assumes that the texture is stored in sRGB or has already been gamma encoded. The final value is then gamma encoded before display. The values in the environment map are in linear color space, so we need to move everything to linear space before combining. For some details about gamma encoding/decoding, please see the Using gamma correction to improve image quality recipe in Chapter 6Image Processing and Screen Space Techniques.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.85.76