O'Reilly logo

Mastering Unity Shaders and Effects by Jamie Dean

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

Creating better transparency for the astronaut's helmet

When we set up the initial material for the character's helmet in Chapter 1, Getting to Grips with Standard Shaders, we used the transparency feature of the Standard Shader to render the helmet geometry partially transparent. The triangles that make up the helmet model are only facing outward, so there is no specularity on the inner surface where we would expect to see it.

This problem can be solved using a custom shader. We will build on the code structure we worked with in the previous section, making a more complex shader that is lit realistically by the scene lights.

Creating a custom transparent shader

We will start by creating a shader in the Unity project as we did in the previous section: ...

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