1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Request] Predictive FPS Limiting (Durante's GeDoSaTo implementation cited within)

Discussion in 'Rivatuner Statistics Server (RTSS) Forum' started by EerieEgg, Oct 5, 2018.

  1. EerieEgg

    EerieEgg Member Guru

    Messages:
    155
    Likes Received:
    12
    GPU:
    GTX 1080 Ti
    Hi there guys (and hopefully Unwinder),

    I was talking with @RealNC recently in thread (https://forums.guru3d.com/threads/how-does-capping-framerate-reduce-input-lag.423255/) and towards the bottom there one thing we discussed briefly is "Predictive FPS capping" as a potential way to further reduce input lag/latency while capping framerates.

    Durante (author of the DSFix mod for the original Dark Souls release as well as his own GeDoSaTo tool) made this post about Predictive Frame Capping awhile back to explain the idea for anyone unfamiliar: http://blog.metaclassofnil.com/?p=715

    In a nutshell (as I understand it), the idea is that when are framerate is "Capped" with accurate frame times, the system knows exactly when to expect the next frame and can therefore shift reading user input til just before the actual delivery of that frame while moving the "wait time" til the end where it should end up being quite small (the picture from the Durante link explains this better than I am -- I may be butchering it).

    If you look at the Durante link above, a picture is included that shows this on a timeline where often user input is read then a wait time is placed before delivering the frame in question. With Predictive FPS capping, provided you have a very stable FPS cap and while it is not dipping below the target framerate, the system can instead place that "wait time" at the end then read user input just before the frame is actually delivered effectively reducing input lag.

    Now, I'm not certain what the programming complexity of implementing something like this would be and my understanding is that for this to work correctly requires both an accurate frame limiter (which RTSS is based on what I understand) as well as a very stable target framerate (as this type of feature may not play nice when the framerate drops I don't know), but I think this would be a very interesting type of feature to experiment with.

    In the other thread I listed with RealNC, it was mentioned that Unreal Engine 4 may have a built in similar feature where the wait time and/or when user input reading is actually done is calculated as an average of the last 20 frames delivered or so rounded down so the system has a good idea of where to read user input at a capped framerate. EDIT: [This part actually isn't right -- as corrected below, RealNC was making a suggestion and mentioning the Smooth Framerate UE feature -- my bad]

    Anyway, I would love to discuss this kind of feature and I think it could be very useful if it's at all practical to implement given any meaningful latency reduction is a big deal particularly when capping at lower framerates or when using traditional V-sync (the Blur Buster's guide w/ 1/2 V-sync 30 fps for example here).

    Anyway, thanks for your time, I appreciate it -- have a good one guys.

    Expanded Durante post with more details and a more in-depth explanation: https://www.neogaf.com/threads/predictive-fps-limiting-implemented-in-gedosato.1043959/
     
    Last edited: Oct 5, 2018
  2. RealNC

    RealNC Ancient Guru

    Messages:
    3,073
    Likes Received:
    1,315
    GPU:
    EVGA GTX 980 Ti FTW
    Eh, no :p That's something different. That was just for normal frame limiting, not predictive limiting.
     
    EerieEgg likes this.
  3. EerieEgg

    EerieEgg Member Guru

    Messages:
    155
    Likes Received:
    12
    GPU:
    GTX 1080 Ti
    @RealNC Oh RIP, my bad -- I misunderstood. Yeah, looking back at that thread it's clear I misread what you'd said there. Still, I think the way you suggest (taking the average of the last 20 frames then rounding down type solution) could potentially work for this type of thing.

    Thanks for clearing that up, I'm sorry about that. I've placed an edit in the OP, thanks for the heads-up.
     
  4. Unwinder

    Unwinder Moderator Staff Member

    Messages:
    14,392
    Likes Received:
    1,415
    Not planned, sorry.
     

  5. RealNC

    RealNC Ancient Guru

    Messages:
    3,073
    Likes Received:
    1,315
    GPU:
    EVGA GTX 980 Ti FTW
    EerieEgg likes this.

Share This Page