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

Simple Cubemap reflection in Unity3D

Now that we know how to create our own custom Cubemaps, we can now look at how we use this new texture type to simulate reflections in our Shaders. The concept of using Cubemaps for reflections is pretty simple actually, but provides a very powerful tool for your Shader effects. It works by using the normal from each vertex on the surface of the model to look up a position on the Cubemap textures. This lookup will return a color value that simulates the effect of the Cubemap being reflected on the surface of your object. That is the basic idea.

This particular recipe will take the first step into using Cubemaps for reflections. Unity actually provides us with ways to get the reflection vector automatically, ...

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