How to make DistanceToNearestSurface work on ES 3.1?

Hi! we are having this issue too, did you ever found a solution to this?