Here's a rough outline of how the terrain engine rewrite is going to go:sethypeety wrote: ↑Thu Dec 02, 2021 2:02 amI know this was almost a month ago now but I forgot to ask if there was a timeframe on implementing this, currently working on a project with someone and this would be an absolute life savor for me.
1. Keep a copy of the terrain in GPU memory and use it to directly calculate terrain normals in the fragment shader, which would eliminate reshading for erode. Right now they're baked into the terrain textures which is really efficient for static terrain but a nightmare when erode changes it.
2. Switch from using a lot of small textures for the terrain to a few really big textures. This will probably make 4097x4097 usable. This will also make it possible to add decals faster since they won't be scattered across a zillion different textures.
3. Tessellate the terrain in large chunks instead of down to the triangle like it does now. This will mean more triangles but they will be in larger batches which is better for big GPUs. At this point I'm hoping 4097x4097 will be faster than 2049x2049 is now.
If everything goes perfectly each step is only a few weeks work. But things don't usually go perfectly so who knows how long it will take. It's pretty easy to spend days finding the place where you wrote a + where it should have been a -, so it's kind of unpredictable.