-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Closed
Labels
Description
Dear all,
I'm trying to find the best way to "clamp" a mesh to another. Let's say I have some sort of "terrain" mesh in the X/Y plane (Z is up/down) and a "road" mesh across that terrain. Both come from different databases and the Z coordinates do not necessarily line up. So I'd like to clamp (project) the road to the terrain to avoid any inconsistencies.
We're talking potentially very large meshes here, so I'd like to avoid doing this all in javascript (doing bilinear interpolation for the 4 terrain vertices around each road vertex or so). Is there any way this can be done in the road's vertex shader or so? This might be wishful thinking, but any pointers would be greatly appreciated.
thanks!!