Skip to content
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

Foveation can't be configured for WebXR #5108

Closed
mrxz opened this issue Sep 5, 2022 · 5 comments
Closed

Foveation can't be configured for WebXR #5108

mrxz opened this issue Sep 5, 2022 · 5 comments

Comments

@mrxz
Copy link
Contributor

mrxz commented Sep 5, 2022

Description:

  • A-Frame Version: 1.3.0
  • Platform / Device: Any platform/device with support for WebXR and fixedFoveation

The documentation mentions the foveationLevel property on the render component. However, this property is only used in case of WebVR (a-scene.js#L334). WebXR now also supports setting a foveation level, and Three.js exposes this since r131 (mrdoob/three.js#22162). By default it is set to 1 in three (the maximum). This means that:

  • Setting <a-scene renderer="foveationLevel: 0"> currently has no effect when using WebXR
  • Since A-Frame version 1.3.0 foveation is on by default, whereas it used to be off by default (and can't be disabled)
  • The values for WebVR are 0, 1, 2, 3 but for WebXR in the interval [0.0, 1.0]

I can make a PR so that the foveation can be configured for WebXR, but would like to discuss the desired approach first. None of the options seem without their drawbacks as the value ranges are inherently incompatible and adding a new property might lead to confusion.

@dmarcos
Copy link
Member

dmarcos commented Sep 6, 2022

Foveation predates Oculus Browser WebXR implementation and no browsers to my knowledge offer it via WebVR anymore. We can probably remove the WebVR code and then implement the WebXR part. We can also change the schema and corresponding docs. PRs more than welcome

@RelaxingVR
Copy link

I have been trying to fix this issue every night this week - even pulling out the three renderer and camera components at runtime, changing everything, trying multiple things to try and track down what it was that was causing the degraded lines outside a tiny rectangular area of normal image all around the edges. I was staring down the barrel of having to recode my entire last 3 months' project in something else - and it's this simple! foveationLevel does nothing!! No wonder I thought that wasn't the issue!

I don't know if I'm misunderstanding the comments above, but I am using 1.3.0 to create a gallery and testing on Meta Quest 2 in the Oculus Browser and it foveats the heck out of the edges and makes it look terrible. My solution has now been to downgrade to using 1.2.0 and it looks like an absolute treat!

I guess I would say please to save my sanity if I somehow time loop and wake up last week - update the docs to mention that in whatever circumstance foveationLevel doesn't do anything! Or if I am understanding the comments correctly then this issue I don't think is closed, as it was massively problematic for me not to be able to set foveationLevel in something the Oculus Browser on Meta Quest 2 clearly does actually adhere to.

In other news - a-frame is genuinely awesome and has made this project possible in lightening speed - so massive love for all the work!

@vincentfretin
Copy link
Contributor

Like described in the issue description, aframe 1.3.0 and the foveationLevel option didn't work for WebXR.
The Meta browser is using WebXR, the PR here fixed the foveationLevel option for WebXR.
You need a build from aframe master to have those changes.

@mrxz
Copy link
Contributor Author

mrxz commented Oct 13, 2022

@RelaxingVR As Vincent mentions, you'll need a master build that includes the changes, see https://github.com/aframevr/aframe/tree/master/dist#a-frame-builds

@vincentfretin
Copy link
Contributor

Actually you will need to create the build yourself by cloning the repo and run npm install and npm run dist. The bot didn't push any build that included this fix since Aug 17, 2022.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants