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

Render WebVR frames to OVR VR surfaces #1429

Open
wants to merge 1 commit into
base: master
from
Open

Conversation

@daoshengmu
Copy link
Contributor

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 force-pushed the externalVRSurface branch from aa0c551 to 6cea36d Jul 19, 2019
@daoshengmu daoshengmu requested a review from MortimerGoro Jul 22, 2019
@daoshengmu daoshengmu self-assigned this Jul 22, 2019
@daoshengmu daoshengmu added bug Bugzilla and removed bug labels Jul 22, 2019
@daoshengmu daoshengmu requested a review from bluemarvin Jul 22, 2019
Copy link
Collaborator

MortimerGoro left a comment

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 Jul 24, 2019
@daoshengmu

This comment has been minimized.

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

This comment has been minimized.

Copy link

kennardconsulting commented Aug 16, 2019

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

@daoshengmu

This comment has been minimized.

Copy link
Contributor Author

daoshengmu commented Aug 17, 2019

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

This comment has been minimized.

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 daoshengmu force-pushed the externalVRSurface branch from 52a1b7f to 0026ebd Aug 24, 2019
@daoshengmu daoshengmu force-pushed the externalVRSurface branch from 0026ebd to 94fe049 Sep 5, 2019
@daoshengmu daoshengmu requested a review from MortimerGoro Sep 5, 2019
@daoshengmu

This comment has been minimized.

Copy link
Contributor Author

daoshengmu commented Sep 5, 2019

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

@kennardconsulting

This comment has been minimized.

Copy link

kennardconsulting commented Sep 5, 2019

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 Sep 16, 2019

request a new review again

@daoshengmu

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor Author

daoshengmu commented Sep 20, 2019

Per #304

@bluemarvin bluemarvin force-pushed the master branch 3 times, most recently from 918a522 to ae782b4 Sep 27, 2019
@kennardconsulting

This comment has been minimized.

Copy link

kennardconsulting commented Oct 9, 2019

I'm unclear if this issue is now closed?

@daoshengmu

This comment has been minimized.

Copy link
Contributor Author

daoshengmu commented Oct 26, 2019

I'm unclear if this issue is now closed?

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

@daoshengmu daoshengmu force-pushed the externalVRSurface branch from 94fe049 to ab5f72a Nov 6, 2019
@daoshengmu daoshengmu added the blocked label Nov 12, 2019
@daoshengmu

This comment has been minimized.

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.

…framebuffer textures.
@daoshengmu daoshengmu force-pushed the externalVRSurface branch from ab5f72a to aaa220f Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.