That you base the y value on the result of a concept called "Barycentric Coordinates". If you're using a grid of quads,
it's easy to compute. (Given that the area of a right-angled triangle is 0.5h*b)
It revolves around weighted coords of the triangle (A, B, C) that currently surround your camera (P).
Basically, the weight of A (wA) is
area(B.xz, P.xz, C.xz) / area(B.xz, A.xz, C.xz)(the surrounding triangle) / (the opposing triangle to the triangle-point in question (here: A))
So you can add together
A.y*wA + B.y * wB + C.y * wCto get the resulting P.y.