O'Reilly logo

Unity Shaders and Effects Cookbook by Kenny Lammers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The diffuse convolution lighting model

Diffuse convolution is the process of blurring a Cubemap such that the overall intensity of the lighting in the Cubemap is retained but the details are blurred out. This type of technique is really useful when you want to achieve a more globally-lit surface. You can fake the effects of global illumination by capturing a Cubemap of your scene and running it through a diffuse convolution algorithm, and then lighting your model with the convolved Cubemap.

We are going to look at how we can use this technique inside Unity using Surface Shaders. We will also utilize CubeMapGen to produce our diffuse convolved Cubemap.

Getting ready

In order for us to achieve this technique, we need to be able to create a Cubemap ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required