Fading objects

Sometimes, you want an object to fully disappear with a fading effect. In this case, specular reflections and Fresnel refraction and reflection should disappear as well. When a fading object is fully transparent, it should also be invisible. To do this, perform the following steps:

  1. From the material's Inspector tab, set Rendering Mode to Fade.
  2. As before, use the alpha channel of the Albedo color or map to determine the final transparency:
  1. The following screenshot shows four fading spheres. It is clear from the screenshot that the PBR effects fade with the sphere as well. As you can see in the following image, the last one ...

Get Unity 2018 Shaders and Effects Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.