bevy
bevy copied to clipboard
Frame time diagnostic independent of vsync
What problem does this solve or what need does it fill?
When using the frame time diagnostic and vsync at the same time, the diagnostic shows ~16ms on a 60 Hz display (unless the GPU cannot keep up). If vsync is turned off and FPS increases by a lot, it indicates that the real work the GPU had to do should have taken less than 16ms in the vsync scenario.
I assume the way the frame time is collected happens after some sort of vsync barrier happens, such that the "real" work is masked.
What solution would you like?
Unless the current behaviour can be considered a bug, I'd like to be able to opt into showing the "real" work time elapsed. If vsync on a 60 Hz display runs at 60 FPS I still want to know if rendering these contents actually took 2ms or 16ms.
@bevyengine/rendering-team any comment on if the current behaviour is a bug or not?
The frame time diagnostic is taken from Time<Real>::delta_seconds_f64 and is not really related to rendering for now