Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Render WebVR frames to OVR VR surfaces #1429

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

daoshengmu
Copy link
Contributor

@daoshengmu daoshengmu commented Jul 19, 2019

app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp Outdated Show resolved Hide resolved
app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp Outdated Show resolved Hide resolved
app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp Outdated Show resolved Hide resolved
app/src/main/cpp/BrowserWorld.cpp Outdated Show resolved Hide resolved
app/src/main/cpp/BrowserWorld.cpp Outdated Show resolved Hide resolved
@daoshengmu daoshengmu requested a review from MortimerGoro July 22, 2019 16:55
@daoshengmu daoshengmu added the enhancement This issue is a new feature or request label Jul 22, 2019
@daoshengmu daoshengmu self-assigned this Jul 22, 2019
@daoshengmu daoshengmu added bug This issue is a software or functional defect Bugzilla Main activity on this bug is in Bugzilla and removed bug This issue is a software or functional defect labels Jul 22, 2019
@daoshengmu daoshengmu requested a review from bluemarvin July 22, 2019 19:44
Copy link
Contributor

@MortimerGoro MortimerGoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates! This is getting closer to be ready!

Other than the mentioned issues WebVR samples demo looks zoomed compared to the master build. It seems something related to bad sizes or bad eye offsets. Could you check that?

app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp Outdated Show resolved Hide resolved
app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp Outdated Show resolved Hide resolved
app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp Outdated Show resolved Hide resolved
app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp Outdated Show resolved Hide resolved
@daoshengmu daoshengmu force-pushed the externalVRSurface branch 2 times, most recently from ffedf1e to e624187 Compare July 24, 2019 18:17
@daoshengmu
Copy link
Contributor Author

daoshengmu commented Jul 24, 2019

Thanks for the updates! This is getting closer to be ready!

Other than the mentioned issues WebVR samples demo looks zoomed compared to the master build. It seems something related to bad sizes or bad eye offsets. Could you check that?

ExternalVRSurface
externalVR

EGLTexture
egltexture

@MortimerGoro
Regarding to the immersive texture size, I have checked they both are 1024 x 1024, and their difference is not so obvious as my attachments.

Besides, I notice that if I release my surfaces at LeaveVR(), the surfaces will not be presented properly after re-entering the immersive mode. However, if I don't release my surfaces, it will still be good after exiting FxR and re-enter.

@kennardconsulting
Copy link

Looking forward to this being merged! Any progress on resolving conflicts?

@daoshengmu
Copy link
Contributor Author

Looking forward to this being merged! Any progress on resolving conflicts?

I have solved conflicts in local and am working on other new issues after merging with master branch.

@kennardconsulting
Copy link

kennardconsulting commented Aug 17, 2019

Awesome. Thanks for the update. Can you comment on whether it helps #1408 in the WebVR samples demo app you show above?

Specifically, whether the moving cube (and the stationary cubes if moving your head) appear to judder every few seconds

@daoshengmu
Copy link
Contributor Author

I am going to give another commit to provide an UI switch in the developer setting to turn on/off external surface feature.

@kennardconsulting
Copy link

Awesome. Thanks again for all your hard work on this. I really appreciate it and look forward to seeing the end result.

If you get time, could you please comment on how this feature affects the 'judder' on the moving cubes (and the stationary cubes if moving your head) in the WebVR samples demo on Oculus Quest?

@daoshengmu daoshengmu dismissed MortimerGoro’s stale review September 16, 2019 17:01

request a new review again

@daoshengmu
Copy link
Contributor Author

daoshengmu commented Sep 20, 2019

It seems like I am using wrong surface size when adopting Swapchain surfaces to do immersive render at Sketchfab.com

@daoshengmu
Copy link
Contributor Author

Per #304

@kennardconsulting
Copy link

I'm unclear if this issue is now closed?

@daoshengmu
Copy link
Contributor Author

I'm unclear if this issue is now closed?

Not yet. We are blocked by Bugzilla review. Sorry about that.

@daoshengmu
Copy link
Contributor Author

daoshengmu commented Nov 18, 2019

Now, doing profiling experiments from webgfx-tests, and run it via webgfx-tests run webvr_cubes -a "Serial Number" -b fxr -c ./examples/tests/webgfx-tests.config.json -o result.json -n 8

Screen Shot 2019-11-19 at 10 14 30 AM

We can see we can get a little higher FPS if we adopt this approach (enable). The first time to draw or page loading time would be more than the original one (close) is because we need to ask OVR to resize our external surface buffer from the content side, the only way I can get is asking the content thread sleep for 80 ms to make sure we can get the resized surface.

Screen Shot 2019-11-19 at 10 15 18 AM

However, if we choose to use two external surface buffers. The FPS will be low. It seems like the framebuffer memory pressure (we have a couple of screen size framebuffers) causes the FPS goes down. I have checked disabling all extra JNI bindings and WebGLContext::BlitBackbufferToCurDriverFB for this experiment, and we still get the same result. So, I pretty sure this would be our bottleneck.

@jvonitter jvonitter added this to the #9 polish milestone Jan 13, 2020
@bluemarvin bluemarvin modified the milestones: #9 polish, #10 features Feb 12, 2020
@bluemarvin bluemarvin modified the milestones: #10 features, Backlog Mar 18, 2020
@bluemarvin bluemarvin changed the base branch from master to main August 7, 2020 22:34
@cknowles-admin cknowles-admin added the ARCHIVED CLOSED at time of archiving label Jul 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ARCHIVED CLOSED at time of archiving blocked Bugzilla Main activity on this bug is in Bugzilla enhancement This issue is a new feature or request WebVR/XR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants