Dustyroom / flat-kit-doc

Documentation of the Flat Kit asset.
https://flatkit.dustyroom.com
Apache License 2.0
2 stars 1 forks source link

Unity 2020.3 only - FlatKit 2.90 Outline and Fog Single Pass Stereo only renders in left eye #67

Open troyspencer opened 2 years ago

troyspencer commented 2 years ago

Describe the bug Enabling the Flat Kit Outline or Fog Renderer Features in Single Pass Stereo causes the scene to only be rendered in the left eye.

To Reproduce Steps to reproduce the behavior:

  1. Install FlatKit 2.90
  2. Enable Single Pass Instanced OpenXR Render Mode
  3. Play a FlatKit sample scene
  4. Enable the FlatKit Outline or Fog Render Feature
  5. Rendering immediately changes to only left eye, outline/fog is now visible
  6. Pausing scene and rotating HMD reveals duplicate texture rendered behind camera

Expected behavior As the release notes of 2.90 specify, "[XR] The #1 requested XR feature is done - Outline and Fog effects now support Single Pass Stereo rendering." Expected behavior is that enabling "Flat Kit Outline" simply adds an outline to the existing rendered single pass stereo views.

Screenshots In this video

Unity details: Flat Kit version 2.9.0 Unity 2020.3.30f1 Dev platform: WindowsEditor Target platform: StandaloneWindows64 URP installed: True, version 10.8.1 Render pipeline: UniversalPipeline,LightweightPipeline Color space: Linear Quality config: [FlatKit] Example Settings URP Graphics config: [FlatKit] Example Settings URP

Build platform:

Additional context I set up a minimal project using the URP template, imported the FlatKit 2.90 package, configured the project using the FlatKit Readme, enabled basic XR support, and added a tracked pose driver to the FlatKit example Car Scene 1.

If the editor is paused, the HMD can be rotated to see that a duplicate rendering is applied on the back of the left eye.

dustyroom-studio commented 2 years ago

Hi @troyspencer , thanks you for reporting this. This is the perfect bug report 🥇 The XR rendering has changed between Unity 2020 and 2021, is there a chance you can do the same test in Unity 2021?

troyspencer commented 2 years ago

Importing the same minimal project into Unity 2021 fixes the issue https://www.youtube.com/watch?v=-hA-KbbMPG4

Flat Kit version 2.9.0 Unity 2021.2.14f1 Dev platform: WindowsEditor Target platform: StandaloneWindows64 URP installed: True, version 12.1.5 Render pipeline: UniversalPipeline Color space: Linear Quality config: [FlatKit] Example Settings URP Graphics config: [FlatKit] Example Settings URP

dustyroom-studio commented 2 years ago

Thank you for checking. Is that a viable workaround for you? Unfortunately 2020 has pretty bad handling of XR and we can't find any resources on fixing it there.

troyspencer commented 2 years ago

There are some Vulkan XR regressions that cause inconsistent frame timings on Quest headsets in 2021 that I would prefer to avoid. However, I need to have the outlines more than I need the experimental Vulkan features, so using 2021 is still a suitable workaround for now. I'll try reconfiguring my project to work with this.

dustyroom-studio commented 2 years ago

Thank you. We'll keep trying to improve the XR rendering.