9

Shader Compilation, Branching, and Variants

In the first half of this book, we discussed various shading techniques that can help you create interesting visual effects in your game projects. We saw how to use Unity’s new URP pipeline and, in particular, its node-based shader editor – the Shader Graph.

Coding or branching up a shader to render a specific visual on screen is, of course, an essential skill for any technical artist, but there is something else that you should take into consideration if you want to master shaders: the art of optimization!

Indeed, knowing the inner workings of the tools you use is crucial to getting the most out of them, and this is especially the case with shaders, because of how compute-intensive they are. Moreover, ...

Get Become a Unity Shaders Guru 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.