Closed Bug 1314182 Opened 8 years ago Closed 7 years ago

[webvr] Janky framerate in mirrored vs. content rendered in HMD

Categories

(Core :: WebVR, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: cvan, Assigned: kip)

References

()

Details

(Whiteboard: [webvr][gfx-noted])

0. Load latest build of Firefox Nightly
1. From `about:config`, set `gfx.vr.mirror-textures` to `true`
2. Load some WebVR content in your VR headset (example scene: https://toji.github.io/webvr-samples/05-room-scale.html)
3. Wear the headset and look around
4. Wait about 30 seconds or longer
5. Take off your headset
6. Notice the mirrored content is pretty laggy
7. Put your headset back on
8. Notice the content in the display does not seem to match the framerate of that rendered on the mirrored display in the active tab in Firefox Nightly

Is this an issue with Gecko's WebGL/WebVR implementation and/or specific to mirroring?

Notice this issue is not reproducible with Brandon Jones' experimental Chromium builds: https://webvr.info/get-chrome/
Blocks: 1305879
Note that "gfx.vr.mirror-textures" does not exist or have any effect in the current Firefox Nightly.

The implementation prioritizes rendering to the HMD, so if performance is suffering, it will affect output on the main display first.

Another possibility is that disabling vsync with layout.frame_rate could prevent the mirror on the 2d monitor from rendering properly.  Could you try starting with a clean profile and let me know if the issue persists?
Flags: needinfo?(cvan)
Whiteboard: [webvr] → [webvr][gfx-noted]
I've reproduced this with both the Oculus Rift and HTC Vive without setting any additional flags (besides the necessary ones). I showed this to Kip yesterday with the HTC Vive running the latest Firefox Nightly.
Flags: needinfo?(cvan)
Component: Graphics → WebVR
The patch for Bug 1381085 changes the implementation of mirroring and might have an effect on this issue.  This should be retested after bug 1381085 lands.
Depends on: 1381085
Assignee: nobody → kgilbert
Mirroring changes moved from Bug 1381085 to separate bug, Bug 1400457
Depends on: 1400457
No longer depends on: 1381085
I have changed the way mirroring works, which may have corrected this issue.  Could you please try to repro again?
Flags: needinfo?(cvan)
Kip, many thanks for addressing this and following up on this bug.

In my testing with Firefox 55 and the latest Nightly (Oct 11, 2017), I no longer notice the mirroring jank after significant time has elapsed while presenting in VR. Woo!

I've tested with the following experiences (for 1 min+ of continuous VR engagement for each):

    - https://webvr.info/samples/05-room-scale.html
    - https://aframe.io/aframe/examples/showcase/shopping/
    - https://aframe.io/a-blast/
    - https://mozvr.com/puzzle-rain/


––


Unrelated to mirroring, and I ought to file a separate issue for this (if it's not filed already, though I think it may be): I did notice that when playing A-Blast (https://aframe.io/a-blast/) on the Vive, I'm pretty consistently being dropped out of VR (and seeing the Steam VR "Big Picture" menu for a second or two, until I'm returned back to the A-Blast experience).

I filed an issue in the A-Blast repo for this:

    https://github.com/aframevr/a-blast/issues/129


––


Long story short: you can resolve this bug as fixed. Thank you!

And just let me know how you'd like me to follow up about the `(unresponsive) firefox.exe` errors I'm seeing with A-Blast (https://aframe.io/a-blast/).

Thanks, Kip!
Flags: needinfo?(cvan) → needinfo?(kgilbert)
(In reply to Christopher Van Wiemeersch [:cvan] from comment #6)
> Kip, many thanks for addressing this and following up on this bug.
> 
> In my testing with Firefox 55 and the latest Nightly (Oct 11, 2017), I no
> longer notice the mirroring jank after significant time has elapsed while
> presenting in VR. Woo!
> 
> I've tested with the following experiences (for 1 min+ of continuous VR
> engagement for each):
> 
>     - https://webvr.info/samples/05-room-scale.html
>     - https://aframe.io/aframe/examples/showcase/shopping/
>     - https://aframe.io/a-blast/
>     - https://mozvr.com/puzzle-rain/
> 
> 
> ––
> 
> 
> Unrelated to mirroring, and I ought to file a separate issue for this (if
> it's not filed already, though I think it may be): I did notice that when
> playing A-Blast (https://aframe.io/a-blast/) on the Vive, I'm pretty
> consistently being dropped out of VR (and seeing the Steam VR "Big Picture"
> menu for a second or two, until I'm returned back to the A-Blast experience).
> 
> I filed an issue in the A-Blast repo for this:
> 
>     https://github.com/aframevr/a-blast/issues/129
> 
> 
> ––
> 
> 
> Long story short: you can resolve this bug as fixed. Thank you!
> 
> And just let me know how you'd like me to follow up about the
> `(unresponsive) firefox.exe` errors I'm seeing with A-Blast
> (https://aframe.io/a-blast/).
> 
> Thanks, Kip!

Thanks for re-testing.  I'm glad the issue is now resolved.

I suspect that your dropout to SteamVR while using A-blast may be due to something blocking the WebVR thread momentarily, as SteamVR automatically drops you back to their UI when we stop submitting frames.  These can often be identified using "GeckoProfiler".  In some cases this can be identified as garbage collection which could be reduced with some changes in the content.  In other cases, it may need the multi-threading work happening in Bug 1392215.  I'll follow up with you for some deeper dives on this.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(kgilbert)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.