mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
070bceda310676f07db2c1c330e7c9d05e780ca0
Does not affect web builds. Previously, framerate would float between 30-40 fps depending on how many events would come in. Fast mouse movements over the window lead to higher framerates since request_redraw was called every 20ms (-> 50fps) AND all events were consumed, additionally the event loop would wake up only every 10ms, so actual rate of request_redraw depended on how often we'd wake up. Fixed this by setting the max sleep time of the event loop to the remaining time until hitting the desired time interval since the last frame. The difference is most visible on the spinning cubes in the shadow example since the cubes currently spin with a fixed angle per frame (independent of frame timings).
Description
No description provided
Languages
Rust
79.9%
WGSL
16.2%
HLSL
2%
GLSL
1.7%
JavaScript
0.2%