Closed mrxz closed 2 years ago
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
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!
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.
@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
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.
Description:
fixedFoveation
The documentation mentions the
foveationLevel
property on therender
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 (https://github.com/mrdoob/three.js/pull/22162). By default it is set to 1 in three (the maximum). This means that:<a-scene renderer="foveationLevel: 0">
currently has no effect when using WebXR0, 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.