Can Shader Graph use define toggle?

In normal Unity shader, we can use [Toggle] to enable or disable a define keyword in shader so that you can control whether a function is on or off in a shader.
But it seems that shader graph doesn’t have a such function.
Can some one help?

I think the boolean logic nodes work in place of a [Toggle].

No, the boolean nodes do not work like keyword definitions, they won’t strip parts of your shader based on the toggle. We’re currently in the process of implementing keywords properly, and we’re hoping to release it soon.

4 Likes

@alexandral_unity was this feature implemented in the end?

Seems so :smile: