Reader small image

You're reading from  Become a Unity Shaders Guru

Product typeBook
Published inJul 2023
Reading LevelN/a
PublisherPackt
ISBN-139781837636747
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Mina Pêcheux
Mina Pêcheux
author image
Mina Pêcheux

Mina Pêcheux is a freelance content creator who has been passionate about game development since an early age. She is a graduate of the French Polytech School of Engineering in applied mathematics and computer science. After a couple of years of working as a data scientist and web developer in startups, she turned to freelancing and online instructional content creation to reconnect with what brightens her days: learning new things everyday, sharing with others and creating multi-field projects mixing science, technology, and art.
Read more about Mina Pêcheux

Right arrow

Exploring SubShader and Pass tags

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:

  • Either you use one of the built-in queues, among Background, Geometry, Alpha Test, Transparent, and Overlay (from first...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Become a Unity Shaders Guru
Published in: Jul 2023Publisher: PacktISBN-13: 9781837636747

Author (1)

author image
Mina Pêcheux

Mina Pêcheux is a freelance content creator who has been passionate about game development since an early age. She is a graduate of the French Polytech School of Engineering in applied mathematics and computer science. After a couple of years of working as a data scientist and web developer in startups, she turned to freelancing and online instructional content creation to reconnect with what brightens her days: learning new things everyday, sharing with others and creating multi-field projects mixing science, technology, and art.
Read more about Mina Pêcheux