There are any number of ways to speed things up here without sacrificing precision.

F’rinstance, you could generate a second bitmap with the same dimensions as the heightfield, which stores the maximum height difference between the sample and any of its neighbouring samples. This second map stores what we’ll call “maximum variance”, or V.

E.g. if a bit of the heightfield looks like this:

3 2 7

6 4 4

4 3 3

then V for the centre sample is 3, the difference between it and the neighbouring 7.

Okay, now you’ve got this set up and you want to check whether an object at height Y has collided with the landscape. Just find the nearest height sample H, and the corresponding max variance V. Now:

If Y > ( H + V ), you’re clear.

If Y < ( H - V ), you’ve crashed.

Otherwise, check using the plane equation.

So you still have the precision of the equation approach, but you can almost always skip the actual calculation.