-
Book Overview & Buying
-
Table Of Contents
Become a Unity Shaders Guru
By :
First of all, the shader tags are a list of one or more key-value pairs that allow you to custom-configure your SubShader or your Pass blocks. There are several built-in ones, and you can also define your own to then access them in your C# script using the Material.GetTag API. Most of the time, however, the predefined ones are enough.
At the time of writing this book, Unity documents list a total of eight SubShader tags. Some are very specific and rarely used, but there is one that is worth addressing: the Queue tag. It defines in which render queue a geometry with this shader will be. This is one of the key options that determines in which order this geometry will be rendered compared to the others.
To have precise control over the render order of your shaders, Unity lets you choose between two types of queue values:
Background, Geometry, Alpha Test, Transparent, and Overlay (from first...