RTSS reflex overlay - Input bar issues

Discussion in 'MSI AfterBurner Application Development Forum' started by klunka, Apr 1, 2024.

  1. klunka

    klunka Active Member

    Messages:
    57
    Likes Received:
    6
    GPU:
    1080ti / 11gb
    Hi,
    In the new reflex overlay for RTSS, input bar does not seem to work properly.
    I tried with two reflex native games, apex legends and cs2.

    In apex the input bar does not show up, whatever I do (inject markers or not; enable reflex+boost etc).
    In cs2 the input bar shows but is always the same size and fixed to the same position as simulation start.
    (There is no number next to the bar, which I think is intentional, but a number indicating time between simulation start and input sample would be useful.)

    specs:
    1080ti
    551.86 driver
    7.3.6 RTSS
    win 10
     
  2. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,216
    Likes Received:
    6,905
    A guest from SK community? What's a point of cloning a question here if I replied there? No, it works exactly like it is intended.
     
    Last edited: Apr 1, 2024
  3. klunka

    klunka Active Member

    Messages:
    57
    Likes Received:
    6
    GPU:
    1080ti / 11gb
    Yes I posted in SK, but you did not respond to me so how am I supposed to see it?
    Your response to somebody else was:
    "Reflex may report per-frame inputSampleTime inside NV_LATENCY_RESULT_PARAMS returned by NvAPI_D3D_GetLatency. That timing is what RTSS visualize in timeband in that line, if Reflex provides valid non-zero timestamp for it. It is PCL approximation based, so it is expected to be available in native Reflex games only (I don't inject PCL markers for Reflex injection scenario). But yes, it visualize just the instantaneous input sampling event's position on the timeband without any duration number, if you meant that."

    So for my issue, I assume apex just doesn't provide a timestamp for input sample? It's a reflex game and does provide PCL numbers to frameview but ok...
    As for Cs2, it just polls exactly at the start of simulation, while every other game I checked before with SK's reflex overlay does not.
    Not saying it's an issue with your implementation, just thought it was weird that with the two native reflex games I had on hand, one failed to give input timestamp and the other one looked sketchy.
    Last, if you read my post above, I did not suggest to put a number for input sample duration, since like you said it's instantaneous - rather a number like Input to render latency would be useful...to me at least.
    Anyway I appreciate your work, have a good day!
     
  4. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,216
    Likes Received:
    6,905
    It is really weird approach to try to verify it using the games where you couldn't see Reflex data with SK due to anticheat and make conclusions that it works improperly in RTSS from what you see and what you expected to see. Input sample marker can be located anywhere, it can be _before_ simulation start timestamp, it can virtually match with it, it can be located _inside_ presentation timeband, it is entirely application implementation specific. For example in FH5 it is quite typical to see it placed somewhere inside simulation timeband, and that's what you see with both SK and RTSS. In any case it is not a number, which RTSS calculates like you think, it is not a number calculated by SK either, it is pure data reported by Reflex and shown to you as is.

    upload_2024-4-2_18-30-11.png

    > Last, if you read my post above, I did not suggest to put a number for input sample duration

    You didn't, but you did conclude that it is wrong because "it is always same size". And it is absolutely expected to have the same fixed 1-unit size, as it is an instantaneous and not a prolonged event. And if you need to display input to render latency, you can always calculate it in your overlay from sim-to-render latency, sim-to-render timespan (gives you normalized simulation start and render end timestamps) and input sample timespan (gives you normalized input sample timestamp).
     

  5. klunka

    klunka Active Member

    Messages:
    57
    Likes Received:
    6
    GPU:
    1080ti / 11gb
    Thank you for the info
    Disabled cs2 anticheat and can confirm that SK reports the same thing. I haven't seen it in other games before, my bad.
     
  6. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,216
    Likes Received:
    6,905
    Actually a lot of games with native Reflex behave this way, the very beginning of simulation stage is the most appropriate place for input sampling.
     
  7. klunka

    klunka Active Member

    Messages:
    57
    Likes Received:
    6
    GPU:
    1080ti / 11gb
    If I understand correctly, the only input sample related number reflex provides is already in the format RTSS then shows, for example 5050 if input is sampled in the middle of the whole barchart.
    So there is no way to get something like time bewtween two input samples, or time between two simulation starts, correct?
     
  8. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,216
    Likes Received:
    6,905
    You’re thinking in wrong direction again. Reflex always reports all markers as absolute timestamps. Of course it is not in the format you see it either in RTSS or in SK. Timebands in both cases show you relative timings normalized to the range between the very first and the very last marker timstamps per frame. And you don’t need timestamps of markers related to two successive frames to calculate what you want (“but a number indicating time between simulation start and input sample would be useful” or “a number like Input to render latency would be useful”).
     
    Last edited: Apr 3, 2024
  9. klunka

    klunka Active Member

    Messages:
    57
    Likes Received:
    6
    GPU:
    1080ti / 11gb
    How do I get time between 2 timestamps without the timestamps?
     
  10. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,216
    Likes Received:
    6,905
    Using a bit of logic, correction formulas and existing timespans/latencies.
    OverlayEditor's timespan data sources encode start/end timestamp positions normalized to 100%, where 0% is the very first marker's position and 100% is the very last marker's position. E.g. for "GPU render" timespan containing 9943 you can extract 43% to 99% normalized range for it and calculate that this stage is 99-43=56% long. Combine it with "GPU render latency" source and you'll know absolute time inside that 56%, so you can calculate absolute time per 1% unit. Then you can take normalized position of input sample timestamp (e.g. 15% if "Input simespan" is encoded as 1615), calculate normalized distance between input sample and GPU render end markers (99-15) and convert it to absolute time. It will lose a bit of precision due to rounding timespans to integer 1% timeband resolution, but you'll get what you want.
     

  11. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,216
    Likes Received:
    6,905
    To simplify such calculation inside data source's correction formulas I'll probably just offer some special function like reflexlatency(maker_from, marker_to) to formula parser for calculating a latency between two desired markers natively and without loosing precision due to converting it to 1% units and back. So you'll have easier way for calculating time between two arbitrary markers, e.g. INPUT_SAMPLE and PRESENT_START or between SIMULATION_START and the very last marker related to current frame.
     
    Last edited: Apr 4, 2024
  12. klunka

    klunka Active Member

    Messages:
    57
    Likes Received:
    6
    GPU:
    1080ti / 11gb
    That would be great! A way to get times between markers of consecutive frames would be good too, for example previous frames input sample to current frames input sample, or previous present_end to current simulation_start.
     
  13. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,216
    Likes Received:
    6,905
    No, there won't be a way to access markers that belong to different frames. It will require altering shared memory layout and breaking backward compatibility with apps accessing it in exchange of NOTHING useful. So forget about it, it makes zero practical use. No.
     
  14. klunka

    klunka Active Member

    Messages:
    57
    Likes Received:
    6
    GPU:
    1080ti / 11gb
    Why is input stability of no use? Or if using time between start of simulations, would that be better/accurate than using regular "frame start" for frametime calcs or no?
    I see why you don't want it though, no worries.
     
  15. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,216
    Likes Received:
    6,905
    Input is EVENT driven, which means that it is never taking place in fixed position relative to any other markers anyway by design. And that's why input-to-start part is always averaged inside NV's latency calculation. Let's stop on that please.
     

Share This Page