OSVR / OSVR-Unity

Package for authoring OSVR experiences with Unity.
Apache License 2.0
98 stars 38 forks source link

Faster mirror mode #193

Closed DuFF14 closed 7 years ago

DuFF14 commented 7 years ago

Not ready to merge. Possibly better performance mirror mode by blitting one eye texture to the game view instead of rendering an extra camera. The Profiler appears to show a savings of a couple MS per frame in the EndOfFrame coroutine (the function where we would render the extra camera), and no significant gained time from the Blit, but I'm having trouble verifying it's an improvement. At first it appeared to be, but I ran some tests with Nsight in a complex scene that showed lower FPS with this new method. Will continue testing, would be great if others can test this.

DuFF14 commented 7 years ago

I verified with Nsight that this saves 2-3 ms per frame which is a huge gain. mirror_render mirror_blit The downside is that one-eye resolution doesn't always scale well to the size of the game view.

DuFF14 commented 7 years ago

Main issue here is still that one eye being drawn to the game view looks like incorrect aspect ratio. Still working on a solution.

demonixis commented 7 years ago

Many games on steam uses the windowed mode. Those games uses the same aspect ratio so it appears normal. Don't forget that gamers see the game into the GAME not the screen

DuFF14 commented 7 years ago

https://github.com/OSVR/OSVR-Unity/pull/219 removes the need for this PR. Closing.