Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aevyrie committed Jul 31, 2022
1 parent 1e91ae0 commit 8cf38d2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ cargo run --release --example demo

## How it works

![image](https://user-images.githubusercontent.com/2632925/148489293-180b28e2-de49-4450-a1db-221d50b29a00.png)

The plugin works by recording how long it takes to render each frame, and sleeping the main thread until the desired frametime is reached.
The plugin works by recording how long it takes to render each frame, and sleeping the main thread until the desired frametime is reached. This ensures the next frame isn't started until the very last moment, delaying the event loop from restarting. By delaying the event loop, and thus input collection, this reduces motion-to-photon latency by moving reading input closer to rendering the frame.

The `spin_sleep` dependency is needed for precise sleep times. The sleep function in the standard library is not accurate enough for this application, especially on Windows.

Expand All @@ -47,10 +45,11 @@ The `spin_sleep` dependency is needed for precise sleep times. The sleep functio

I intend to track the `main` branch of Bevy. PRs supporting this are welcome!

|bevy|bevy_framepace|
|---|---|
|0.7|0.4|
|0.6|0.3|
| bevy | bevy_framepace |
| ---- | -------------- |
| 0.8 | 0.5 |
| 0.7 | 0.4 |
| 0.6 | 0.3 |


## License
Expand Down

0 comments on commit 8cf38d2

Please sign in to comment.