Here is a picture:
And there is a working demo:
The idea is to use functionality of clipping planes, with some modifications of the code for clipping Now it’s not clipping, but interpolation between values of 0 and the depth of fog, using distance from a point to the plane.
Looks fine when the camera is above the plane, but when it goes down below, then you can see what’s the trick.
The example that doesn’t break functionality of clipping planes:
very good, its so cool that you make it,
That is exactly what i looking for, good performance and easy use,
thank you very very much
@x1911 You’re welcome
But keep in mind, that the approach from this example breakes functionality of clipping planes
em… is any other way can keep the function of clipping planes?
because I still need it for the UI scroll
I’ve updated the main post with a new example Can’t say it’s elegant
so sweet, thank you，
Im going to try first, and report later :