April 2021

Unity Shadergraph: How to properly use booleans in a shader?

For those who are not familiar with the Unity shader programming language Shaderlab, or HLSL. Unity created an amazing new system called Shadergraph; A node-based system that allows artists to create shaders and materials the same way they can create textures with Substance Designer or similar software.

But using Shadergraph the same way as a texture in substance designer is a huge trap!

The reason is that a shader is executed in real-time every frame within the GPU of the computer.

But why all this introduction to talk about booleans within a shader? It’s just a TRUE or FALSE, right?

exiinUnity Shadergraph: How to properly use booleans in a shader?
Click here to read the full post