Cheap misty effect

Hi community!
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 :slight_smile: 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.

UPD #1
The example that doesn’t break functionality of clipping planes:


Very nice :ok_hand:

1 Like

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

1 Like

@x1911 You’re welcome :beers:
But keep in mind, that the approach from this example breakes functionality of clipping planes :slight_smile:

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 :slight_smile: Can’t say it’s elegant :slight_smile:

so sweet, thank you,
Im going to try first, and report later : :stuck_out_tongue_winking_eye: