Does Landscape contribute to global distance field?

Excellent, thanks guys :slight_smile:

I wonder if the distance value is just vertical distance (as its from a height field) so gradient will be given as 0,0,1 or if the distance field is actually from the mesh and is accurate?

Would be nice to have a control somewhere for distance fields to specify the bandwith (how far away the sdf is generated). I’ve run into a couple of times where there is no valid gradient (ie 0,0,0) and it messes up some shaders. If we could pad out the distance field generation distance per mesh that would be handy. But definitely being able to sample the landscape distance and gradient from far away would be nice. I havn’t looked at any commits yet but I would think that filling the global field first with the landscape distance would make sense and then ‘min’ in all the mesh sdfs to the field would make sense (but then if the mesh bandwidth is small then you run the risk of getting a distance value to the default landscape value which might not be true if there is a mesh on the landscape underneath it. But for most cases that would be ok).