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 Lit Sphere lighting model

The Lit Sphere lighting model is a really interesting use of Image based lighting. We can actually use a 2D texture to completely bake in our lighting. It's the same effect as what you see in Zbrush. If you are familiar with Zbrush's MatCaps, the Lit Sphere works in the same way. We can create a texture that literally bakes in the way that the diffuse, the Specular, the reflection, and the rim lighting look, and use it to light our Shader. The only catch with this Shader is that since we have baked the lighting completely in, the lighting never changes, unless you swap to different textures throughout your environment, like we saw in the Simple Cubemap reflection in Unity3D recipe in Chapter 4, Reflecting Your World ...

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