unity-webxr-export icon indicating copy to clipboard operation
unity-webxr-export copied to clipboard

One stretched view in XR mode on headsets in Unity 2022.3.21f1

Open De-Panther opened this issue 3 months ago • 1 comments

Describe the bug Instead of drawing 2 views in XR mode on headsets in Unity 2022.3.21f1, there's one stretched image over both eyes.

To Reproduce Steps to reproduce the behavior:

  1. Use the WebXR XR Interaction Toolkit sample in Unity 2022.3.21f1
  2. Enter XR mode in a headset or the "Immersive Web Emulator" in stereo mode.
  3. There's only one stretched view instead of 2 views.

Expected behavior A clear and concise description of what you expected to happen. Expected to see views for both eyes.

Screenshots If applicable, add screenshots to help explain your problem. Using SpectorJS and the Immersive Web Emulator, this is how the sample should draw like image This is how it looks in Unity 2022.3.21f1 image

Unity info (please complete the following information):

  • Editor version: 2022.3.21f1
  • WebXR package version: 0.22.0
  • WebXR Interactions version: 0.22.0
  • Git or OpenUPM: Both
  • Using old components (like the Desert sample) or Input System + XR Interaction Toolkit: Both
  • Built-in render pipeline or URP: URP

Headset (please complete the following information):

  • Device: Any
  • OS: Any
  • Browser: Any

Additional context Add any other context about the problem here. Seems like in older versions, before Unity draws the views, it sets viewport and scissor test image Not in Unity 2022.3.21f1 image

Also in the newer version there are no WebGL warnings of invalid operations, so maybe there were some fixes related to XR SDK in WebGL. Can try and draw the views textures to a custom shader and plane, instead of the current way of overriding the bindFramebuffer function.

De-Panther avatar Mar 24 '24 03:03 De-Panther