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: ...

Get Mastering Unity Shaders and Effects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.