Building Quality Shaders for Unity®

by Daniel Ilett

Your complete guide to code and graph-based shaders in Unity.

  • Use shaders across Unity's rendering pipelines
  • Understand lighting, texturing, and post processing
  • Use Shader Graph for codeless development
  • Modify shader behaviour with C# scripting
Front cover of the book, Building Quality Shaders for Unity® by Daniel Ilett
Five red spheres, with an increasing amount of emissive light emanating from each as you go from left to right.

Build shaders for URP, HDRP, and the built-in render pipeline.

Learn about the differences and nuances between each pipeline.
A sample of the Shader Graph editor window showing the nodes required to create a dissolve shader effect.

Create shaders using either HLSL or Unity's node-based Shader Graph tool.

Use Shader Graph to quickly iterate on your design with immediate visual feedback and without needing to touch any code.
A blue scan effect starting in the air above the floor that has increased in radius, such that the floor and several airborne cubes glow partially blue.

Boost your game's looks with post-processing effects.

Implement a world scanning effect like this one, turn the screen greyscale, or blur out objects in your game.
A cube that is displaying a silhouette of objects that are behind the cube. The cube appears green, with certain parts appearing darker.

Deepen your understanding of how objects are rendered.

Find out how to use the depth buffer to cull objects or use depth information in your own shaders, like in this silhouette effect.
Three camera angles captures around an 'impossible' environment. A red cube can only be seen when viewed from the left, while a blue cube can only be seen when viewed from the right.

Add mind-bending effects to your games using advanced features.

Implement 'impossible' geometry by using the stencil buffer to hide objects when looked at at certain angles.
A capsule, representing a player, that has walked through some thick snow. A trail has been carved in the snow by the player, which is visibly deeper than the rest of the snow and appears darker.

Use shaders to their full potential to enhance gameplay.

Write compute shaders to perform arbitrary tasks such as carving out a trail in the snow.
Copyright 2023 Daniel Ilett.