Distance To Nearest Surface Node not working, only returns 0. Need fix!

Knobbynobbes
Mon, 01 May 2017 01:49:21 +0000
Rendering

The mental pain is real… I’ve been trying to get what I thought was a simple effect going in a material, but no matter what I do, nothing works. All I want to do is to use the distance-to-nearest-surface node in a water shader, but it only ever returns 0. I’m losing my mind as to why this isn’t working.

My graph is literally just absolute world position → distance to nearest surface → divide by 100 → lerp between red and blue → base color output. I don’t know what else I should be doing, as this is even what the documentation says should be working. Anyone know what I need to fix?

Goal: make some water that looks like this:
http://i.imgur.com/SoW7H2n.gif

8 posts - 8 participants