I’ve been playing around with Marching Cubes for a game and I had gotten the algorithm working, so I decided to make a shader in shader graph for it that colours the terrain based on its normals, and also creates a toon shading effect. So far it’s worked perfectly, but there is one problem, the terrain is almost perfectly smooth so I get some pretty bad colour banding and the reflections don’t look realistic at all:
So I tried to fix this by implementing some normal noise into the mix to to break up the colour bands and smooth reflections, but I just can’t seem to get the normal noise to actually apply to the terrain, I’ve tried just using the normal blend node and the triplanar node to do it, but it doesn’t seem to work. I’ve applied it to Terrain and other objects and it works perfectly well as seen below, but it just doesn’t seem to want to apply to my proc gen terrain.
Here’s the shaders normal calculations:
Colouring by Normals:
and the lighting calculations: