I’m trying to use the DistanceToNearestSurface node on a material of a plane. Dividing it gives a nice and simple gradient effect, connecting it to a lerp as alpha I can even set custom colors to it. But as I noticed the DistanceToNearestSurface node works only with Shadows set to medium at least.
My problem is when I set the shadow quality to low, and the node ‘stops’ working the color of the material becomes the one that was nearest to the surface before. Basically the A from the Lerp.
How could I invert this or use the B from the lerp?