The issue is you cant just transform the normal into tangent space like I did in the plane because the tangent direction of the mesh tangent is not oriented in the same direction as the gradient you are using as an input. Doing this will result in the normals being bent all in the same direction, instead of in the direction of the wave.
This can be seen by viewing the world normals:
Essentially, you’ve found the normals in 1D. They need to be rotated to align with the direction the pixel is from the surface. You can get the direction to the nearest surface with the Distance Field Gradient node. You can probably just rotate this vector to align with the RG component of the direction gradient.
