How is this effect achieved?

Recently saw this project, found that there is a particularly good effect:
When walking, the character approaches the trees and starts to render the trees behind the environment.
The trees on the environment are slowly loading out.
How does that work? Is there a binding detection range on the character?

Hi @leooooooo,

It uses a custom shader for that, it overrides the alphaTestPS shader chunk and linearly increases alpha test value with distance. That’s how vegetation fades out.

Here is the relevant shader chunk in the latest engine version to start with:

I’m still not clear. Do you have a simple case for me to learn?thx