-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement OpenXR Foveated rendering support #80881
Implement OpenXR Foveated rendering support #80881
Conversation
29f75ef
to
ae328ef
Compare
ae328ef
to
4fb78b4
Compare
Great work! I tried it on my main project—even though I was already hitting 90Hz, I increased the render scale to various values to see how much of an impact foveated rendering can make. I got good results, when pushing it to the limit, I got around 6-10 extra fps on some scenes. My best results came from forcing the One thing to note is that when you set Another thing worth mentioning—foveated rendering has its limitations. I found out that the distortion is very noticeable when setting the The points/dots wiggle a lot, specially on level 3 (the highest) and specially on the top side of the screen and sometimes if they are far away from the player, they can flicker. You can see an example of this in the following video, look on the left side: foveated_rendering_artifact.mp4Just something to keep in mind because it is a limitation or side effect of using this feature. |
@decacis I think the point size features is one that just can't be used in combination with Foveated rendering, the further out from the centre you get, the more fragment aren't rendered so if your point happens to affect a fragment not being rendered, it will not be rendered. As it moves it will go in and out of fragments that are rendered and you indeed get obvious flickering and such. I'm actually surprised you're not already having issues with lens distortion resulting in similar issues where fragments that have the points never end up on screen because of the condensing of the outer parts of the render result. |
6de9111
to
7179c6a
Compare
Discussed this in the XR meeting, everyone agreed this is something we want. Needs to be rebased, David and Fredia to give it a review before merging. |
7179c6a
to
155ee14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested this on Quest 2, and it worked great! I setup it up so I could press buttons on the controllers to change the foveation level and whether or not it's dynamic, and so I was able to see the effects along the edges of the viewport with different settings.
I only have a handful of notes regarding the defaults and docs.
155ee14
to
862f1ba
Compare
Thanks @dsnopek , agreed and made the changes, let me know if you have suggestions to the wording |
862f1ba
to
d7d3341
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me!
Thanks! |
This PR implements the foveated rendering extension that is available in OpenXR. This is a port of the logic from Godot 3.
This extension is currently only available on a limited number of stand alone Android XR devices:
https://github.khronos.org/OpenXR-Inventory/extension_support.html#XR_FB_foveation
The expectation is that other devices will support this extension but also that this will be limited to Android.
The feature is only implemented for the compatibility renderer.
We can't use the approach on the Vulkan renderer because we do not render 3D content to the buffers created by OpenXR. This may change in the future.
For GPUs that support this, our build in VRS solution is a better option however currently VRS is not exposed on Android (as far as I can tell from the documentation, VRS support would be required by this extension as well).
Tested this on a Quest Pro configured to 90Hz refresh rate with a higher poly scene.
Before applying foveated rendering this project runs at 70-75 fps
After applying foveated rendering this project runs at 90 fps