New issue
Advanced search Search tips

Issue 835905 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 23
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression
Proj-VR
Proj-XR
Proj-XR-VR



Sign in to add a comment

cannot dynamically change VR resolution

Reported by stephent...@gmail.com, Apr 23 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36

Steps to reproduce the problem:
1. run https://webvr.info/samples/03-vr-presentation.html
2. enter VR
3. exit VR
4. put breakpoint no html at line 283 (onResize() set height for VR)
5. enter VR
6. on breakpoint, enter console input  'webglCanvas.width=120'
7. resume execution

What is the expected behavior?
should show in VR (with very blurred image; silly width chosen to make sure the width really did happen)

What went wrong?
does not show in VR

Did this work before? Yes not sure, maybe only on the toji experimental version

Does this work in other browsers? No
 problem pretty much the same in Firefox

Chrome version: 66.0.3359.117  Channel: stable
OS Version: 10.0
Flash Version: 

It is not serious if this does not work.  However, it was very convenient when it did: we could set things up to allow users to choose optimal resolution for image quality/fps tradeoff.  Much slower if we need to restart the application.

I realize it is not feasible to change resolution with leaving and re-entering VR.
 
Labels: Needs-Triage-M66
This may be a change in the underlying StreamVR that will no longer dynamically accept resolution changes.  However, it can accept resolution changes by relaunching a page within the same browser window.
Labels: Needs-Bisect
Labels: -Needs-Bisect
Labels: Triaged-ET TE-Hardware-Dependency
Thanks for filing the issue!

As this issue is related to VR headset, which is not available at TE end to test and confirm the issue, hence adding TE-Hardware-Dependency label to it. Could someone from Blink>WebVR team to look into the issue and help in further triaging.

Thanks!

Comment 6 by klausw@chromium.org, Apr 24 2018

Owner: billorr@chromium.org
Bill, can you take a look? May be the same root cause as  issue 835888  .
I'll investigate.  Before digging in, I seem to recall that sites doing dynamic resolution tuning would have to call requestPresent multiple times.  In any case, I'll dig in to confirm.

Comment 8 by klausw@chromium.org, Apr 24 2018

There's two different scenarios. Calling requestPresent while presenting lets you update the layer bounds, this lets you use a smaller subset of the full drawing buffer to reduce rendering cost. This is equivalent to WebXR's XRWebGLLayer.requestViewportScaling(scaleFactor).

If you want greater-than-default resolution, you have to size the initial framebuffer since the layer bounds or viewport scale don't let you grow above size 1.0. For WebXR, this is a constructor arg for the XRWebGLLayer, for example:
  new XRWebGLLayer(xrSession, gl, { framebufferScaleFactor: 0.8 });

For WebVR 1.1, you get a recommended renderWidth/renderHeight in the eye parameters. The expectation is that you can use them as-is, or multiply them with a scaling factor to increase/decrease the framebuffer size.

WebVR 1.1 doesn't specifically say if it's OK to change the canvas size while presenting. The Android implementation supports it, though it's a somewhat expensive operation and may cause a visual glitch for a frame while applying the new size.

However, at least setting the initial canvas size has to work.
'I seem to recall that sites doing dynamic resolution tuning would have to call requestPresent multiple times'.

Yes, we have been having to do that.  In scale of preferences from our point of view;
1 best if we can just change resolution without stopping presentation
2 issue exitPresent and requestPresent in the same event handler
3 issue exitPresent, and then requestPresent in a later event handler (this is what we had been doing till recently)
4 restart application before changing resolution (needed with current bug)

After fixing  issue 835888 , this is closer to working.  However, the content was stretched instead of just blurry.  Continuing to investigate - there could be a bug with how we are handling size/rects.
Status: Started (was: Unconfirmed)
https://immersive-web.github.io/webxr-samples/framebuffer-scaling.html also gives an easier way to debug the equivalent in WebXR.  I guess that uses your same underlying code; if not it needs to be fixed too.
1. enter VR
2. exit VR
3. change Framebuffer scale
4. enter VR
Components: Blink>WebXR
Labels: VR-Desktop
Components: Blink>WebXR>VR
Components: -Blink>WebXR
Cc: billorr@chromium.org
Labels: -Needs-Triage-M66
Owner: klausw@chromium.org
Labels: TargetedFor-70 FoundIn-66
Proposed fix in https://chromium-review.googlesource.com/c/chromium/src/+/1144469
Labels: -TargetedFor-70 TargetedFor-69
Project Member

Comment 20 by bugdroid1@chromium.org, Jul 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/606c29625e0ce93ba94e5d183942d6fb2865321e

commit 606c29625e0ce93ba94e5d183942d6fb2865321e
Author: Klaus Weidner <klausw@chromium.org>
Date: Fri Jul 20 00:51:50 2018

Recreate WebXR render target view on texture resize

The render target view depends on the destination texture, but wasn't
being recreated on texture resize, resulting in broken rendering
after changing framebuffer scale (WebXR) or canvas size (WebVR 1.1)
for the OpenVR backend.

BUG= 835905 

Cq-Include-Trybots: luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I92bbcdc4f2ed4da1c248cf63132a2bc60a25a8c7
Reviewed-on: https://chromium-review.googlesource.com/1144469
Reviewed-by: Bill Orr <billorr@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576728}
[modify] https://crrev.com/606c29625e0ce93ba94e5d183942d6fb2865321e/device/vr/windows/d3d11_texture_helper.cc

Status: Fixed (was: Started)
According to omahaproxy the change landed before branch cut and is included in 69.0.3497.0, so there's no need for a cherry pick for M69.

https://storage.googleapis.com/chromium-find-releases-static/606.html#606c29625e0ce93ba94e5d183942d6fb2865321e
Thank you all

Sign in to add a comment