As said, it's pretty hacky. Especially processing of the trees and generating the terrain texturing could be improved. Sources are included, i've put everything into one, uncommented (almost) file. It needs the jpct.jar that's included to run, it won't run with 1.19, because it uses some stuff that i've added for 1.20.

Wow. Even on my machine, it runs with a framerate in the 20s or 30s, sometimes 40s or higher. Since you provided the sourcecode, I assume we can freely adapt it for our own projects?

Sure. The usual "do whatever you like with it"-license that i'm using for all of my sources applies here too. Just keep in mind, that the whole thing is just written to make it work. There have to be many many ways to do things better than i did in this demo.

BTW: If you have at least a dual core, it can be worth it to set Config.useMultipleThreads in the constructor of Terrain to true. If the graphics card can handle it, the demo scales pretty well (115 fps compared to the 83 of the single threaded renderer).

I tried this by modifying the blend texture (i.e. the one that tells the shader which texture to use where) when planting the trees by placing a dark spot below each tree. It worked so far, but i forgot that i'm not rendering trees in the distance, so there were no trees but the dark spots remained, which made the terrain look like some kind of acne in the distance.