Locale fog terrain fit

Hello!
I just using local fog with a custom material, shadergraph.

I have a very big terrain, layermask is Ground. Lets say it is 5000 unit width and 40 units in Z, and height 500 unit.

So I put a local fog width 5000 unit width, 40 z, 500 height to fit the box the terrain.

1, is it expensive or is it a good solution?
2, my terrain is a custom terrain, but the height is changing. How can I do a terrain fit to my local fog somehow? (Like raycasts) In the shadergraph? How?

Thanks,
Leslie

You can use the height map of your terrain in shader graph to make the height of the fog increase and decrease.

How to exclude objects, like a house from hdrp volumetric fog?

And how to follow the fog my terrain?
Lets say I have a custom terrain that has a sinus on it?