I’m trying to create a shader in shader graph that can check the normal of a face, and then assign it a color if it reaches a threshold angle. I’m looking to achieve this kind of look for my terrain:
I’m new to shader graph so any node examples would help tremendously. Thanks!
This graph should work for what you’re trying to accomplish. (Note I’m using URP, there is a misleading difference in HDRP with the world space of the Transform node. A quick web search can fix it for HDRP)
The graph works by getting using the gradient to determine the face normal, which is then used to determine the albedo (top half) and normal for a flat shading lighting effect (bottom half). The color is determined by using the angle between the face normal and the up vector, as this angle is compared to a threshold angle property to select between two color properties.
Hope this helps 