Skip navigation
Just add some LODs. Easy FPS boost, right? 👀 #gamedev #performance
0:00 / 2:08

Just add some LODs. Easy FPS boost, right? 👀 #gamedev #performance

2,533 likesDownloadOriginal post

103,056 views #gamedev #performance

Just add some LODs. Easy FPS boost, right? 👀 #gamedev #performance

36 Comments

Comments from the original post on X (Twitter)

  • Hatsuya's profile picture

    @HatsuyaDev

    If you want to make it even more performant, you can use a compute shader, send all the tree and LOD information to the GPU at once, and then interpolate the vertices and discard the remaining ones. Since you'll be using a compute shader, all the information will be on the GPU, completely eliminating other drawcalls and leaving only one.

    72 likes

  • memoryfloater's profile picture

    @memoryfloater

    Yes! This is something everyone should read, because it really matters. Sending the “fade now” as a trigger to the GPU for individual trees could make this solution worse, you need to run everything on the GPU for actual performance gains.

    25 likes

  • JRodDevs's profile picture

    @jroddevss

    Thanks for the info. I’ve been struggling to get the performance right on my project. The close and far shadow lines are so easy to spot too. Unsure how I’m supposed to blend the shading without doing dynamic shadows for everything.

    9 likes

  • Carl010010's profile picture

    @carl010010

    Clever idea! Though seeing performance numbers would have helped drive the point further. Either in the main post or in a sub post. A comparison between, no fade, distance fade, and time fade.

    4 likes

  • memoryfloater's profile picture

    @memoryfloater

    I get your point. But I don’t see value in performance metrics. Hardware and software differences influence how much performance gains you will measure in practice. On a RTX5090 this change might only give you -0.5ms but on a mid-range phone you might get -6ms.

    1 like

  • Carl010010's profile picture

    @carl010010

    That's why you post the hardware you tested on. It lets the reader know if there was was an improvement or not. Some performance improvements that seem like they will work, actually make things slower. It gives people a gauge to see if they should try it in their game or not.

    1 like

  • Iscream's profile picture

    @iscream3d

    Brilliant. this give me an idea :) thx

    2 likes

  • memoryfloater's profile picture

    @memoryfloater

    You’re welcome. Make something awesome 👍🏻

    1 like

  • Tom Ricket's profile picture

    @TomRicket

    Love this — you showed the problem and a straightforward solution very elegantly!

    2 likes

  • NiiCola 【FlaVR】's profile picture

    @NiiColaVT

    And then you run into quad overdraw, but I think that could be fixed by dithering whole quads rather than the pixels.

    2 likes

  • Ascencia's profile picture

    @ascencia64

    The sneaky cost is the player who stops right at the switch distance: with a distance band, that tree pays for both LODs for as long as they stand there. Fading on a timer is such a clean fix, 63 trees drawn twice down to 2.

    2 likes

  • Slava Volkov's profile picture

    @buzzybats

    timed fade is so smart. does it work with instanced trees too?

    1 like

  • memoryfloater's profile picture

    @memoryfloater

    Yes. Already using this with instanced GPU only trees. Compute Shader drives instanced indirect rendering and triggers the fade by providing new time stamps.

    1 like

  • Kiki Nikotan's profile picture

    @Kikinikotan

    Looks nice!

    1 like

  • Fatwa AR's profile picture

    @penfantasi

    Sometimes, i had an awe with game Dev with their optimize approach and way of thinking Animation team on the other hand... 🫠

    1 like

  • /// //'s profile picture

    @marcsh

    The best forests on a project I worked on was where we rendered trees and clumps of trees in the distance into cache buffers and kept them in there for a while That meant nearby stuff could stay high res a lot longer, which made the first LOD drop way further

    1 like

  • Ahmed F. Genç a.k.a Cea Barr's profile picture

    @CeaBarr

    This is the exact thing I was optimizing right now. Trying to hit my 16ms window for integrated gpus as my bar. Thank you for giving me something to think about :)

    1 like

  • Ahmonza's profile picture

    @Ahmonza12

    @FoW_Games

    1 like

  • ℂ𝕠𝕕𝕖𝕩, ℍ𝕖𝕣𝕖's profile picture

    @CodexHere

    awesome video... really does show the mechanism nicely, and it's always been hard to make it look good, but you did a great job with this

    1 like

  • memoryfloater's profile picture

    @memoryfloater

    Thank you 🙏🏻