Page 1 of 1

Developer's log

Posted: Thu Mar 28, 2024 1:56 am
by jlv
Stardate 2024-03-27-1663

Hey guys! This has been suggested quite a few times so I'll write about what I'm currently working on here.

Right now I'm finishing up the new terrain tessellation code. It used to create a nearly ideal tessellation that resulted in very few polygons but lots of draw calls and lots of data sent from system memory to graphics memory. This is what the old tessellation looked like:

Image

Now, I think this is a beautiful tessellation. It focuses detail closer to the camera and on bumpy areas and also has no T-junctions. It's a lot of the reason why MXS could do big maps with no draw distance limits on ancient graphics cards. But it's slow today.

The new way does the same basic thing, except instead of tessellating down to 8 triangle fans, it works on 16x16 grids of those fans. So it's much less accurate and makes way more polygons, but everything now resides in graphics memory and is more uniform so the GPU can spend less time waiting for memory and also work in larger batches. Here's what the new way looks like:

Image

Kind of sad to lose the more detailed tessellation but this is unquestionably better on modern hardware. Testing on a GT 1030 it went from 68 FPS to 127 FPS on the 4k thousandacres terrain.

Re: Developer's log

Posted: Thu Mar 28, 2024 4:30 am
by Rowella94
Really neat stuff, always cool to see behind the scenes

Re: Developer's log

Posted: Thu Mar 28, 2024 10:41 am
by Wahlamt
This is great to read! Thanks JLV!

Re: Developer's log

Posted: Thu Mar 28, 2024 11:42 pm
by Jakob Hubbard
68 to 127 fps on thousand acres is an incredible improvement. Can't wait for this to be finished up!

Re: Developer's log

Posted: Fri Mar 29, 2024 10:49 pm
by Racers52
Thanks for the update!