Search Unity

(Case 1183936) Android VR Postprocessing Bug Collection

Discussion in 'Universal Render Pipeline' started by fherbst, Sep 13, 2019.

  1. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    So for everyone also trying this out, and to help Unity with the current process of manually testing everything for non-Editor-Desktop platforms, here's a list of stuff that is broken on Android VR with URP.

    Baseline is Android + OpenGLES 3.1 + VR (basic setup for Quest). Additionally, VR support for Desktop is turned on to enable desktop testing while on Android build target (also basic setup for Quest).

    From there on,
    no postprocessing, no volumes: "works" (with all the known bugs, but at least you get two images with stereo separation)
    Edit Mode: post fx work both in single pass + multi pass

    Play Mode, post fx disabled on camera:
    Multipass
    upload_2019-9-13_10-18-58.png

    PostFX disabled, Single Pass (note that this is the only working combination of all options)
    upload_2019-9-13_10-20-28.png

    Single Pass + "Render Post-Processing" on camera enabled, no Volumes, no "StopNaN"
    upload_2019-9-13_10-22-2.png

    Above + turning "StopNaN" on
    upload_2019-9-13_10-22-44.png

    Above, + turning FSAA on
    upload_2019-9-13_10-23-5.png
     
    Last edited: Sep 13, 2019
    pakfront and ROBYER1 like this.
  2. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    Above + SMAA instead of FSAA
    upload_2019-9-13_10-23-51.png

    Toggling Postprocessing on the Camera with StopNaN enabled
    190913-102541.gif

    Note that so far we didn't even have a Postprocessing Volume!

    Now, on to that:
    Enabling Depth of Field Bokeh while StopNaNs is on and no AA
    upload_2019-9-13_10-29-13.png

    Enabling Depth of Field Guassian while StopNaNs is on and no AA - note that there seems to be an additional Linear/Gamma issue but not sure
    upload_2019-9-13_10-29-27.png

    DepthOfField + Vignette
    upload_2019-9-13_10-30-35.png

    The same issues happen on-device.

    The issues look a bit different:

    • have a different number of splits
    • some additional issues with left/right eye sometimes being swapped
    • stereo offset being totally wrong
    • shadows being flipped before being applied to the scene
    • linear/gamma conversion issues with some combinations of the above
     
    Last edited: Sep 13, 2019
  3. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    As to "Why would I want Post Effects on Android VR" as this is coming up again and again: we have a very clear usecase of presenting singular game assets in VR on Quest. This means, 1 model, already optimized for VR in a game setting, and with enough frame budget left to do PostFX.

    With Depth of Field enabled, I actually see 60-72 fps on Quest with our setup and usecase. It's just unusable, but performance is ok.

    To summarize - current state of PostFX in URP Mobile VR:
    upload_2019-9-13_10-36-52.png

    I hope this thread helps to get things fixed. Please note, LWPR/URP are officially out of preview and ready for production since April 16 (Unity 2019.1).
     
    Last edited: Sep 13, 2019
  4. daves

    daves

    Unity Technologies

    Joined:
    Oct 18, 2018
    Posts:
    24
    Thanks, @fherbst. Unfortunately, a regression with post-processing effects slipped by us on the way out. In particular, this will only occur on systems that don't support single-pass instancing or multiview but instead use our single-pass mode (which is also called single-pass double-wide mode).

    We're on the case and hope to get this remedied super quick. Apologies.
     
  5. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    Thanks for the reply! Unfortunately Single Pass is basically the only option for mobile VR.
    Also note that the first screenshot (left image, right black) is with Multiview, so that isn't really working either.

    Curious, what do you mean with "on the way out"? This is broken both on the last couple release versions (at least since 6.9.0, I think longer) and on all newer versions including the current SRP master.
     
  6. Shane_Michael

    Shane_Michael

    Joined:
    Jul 8, 2013
    Posts:
    158
    I was someone who was overly flippant and dismissive in another thread about this, but certainly there are cases where you can use post fx if you know what you're doing and it seems like you do.

    The original argument was simply that using post fx means you are going to struggle to maintain your frame rate, and if you sometimes only hit 60fps that means you are missing your frame target by almost 3ms. I don't want to be a cheeky monkey so I won't point out what you might be using that probably takes about that long ;)

    But, seriously, if you can squeeze the margins enough to fit it in, that's fantastic, and hopefully it is actually working soon :)
     
    fherbst likes this.
  7. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    @daves, just to make sue the team is aware of this: On current SRP 7.1.x release branch, all stereo modes are broken. Editor Windows Desktop, on Windows build target. I assume they're also broken in build.
    • Multi Pass only renders left image, right is black
    • Single Pass creates the funky octaview things seen at the top
    • Single Pass Instanced breaks ShaderGraph shaders (work in scene view, broken in stereo with eyeIndex shader error).
     
    Last edited: Sep 16, 2019
  8. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    @daves After seeing that there currently no Graphics Tests preventing this, I added some.

    Pull Requests:
    #4679 (for PostFX)
    #4675 (for ShaderGraph, as that is currently broken as well)

    Hope that helps.
     
  9. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    I'm a bit stunned, but the situation with yesterday's release of URP 7.1.1 got even worse! Now all of the above and some more also happen on regular Desktop VR, with no properly functioning mode remaining.

    Well, I guess that's my new record for bug-reports-per-minute:
    1185839 [URP] Enabling GPU Instancing on ShaderGraph-based material breaks Single Pass stereo rendering
    1185837 [URP] Single Pass Instanced VR rendering breaks ShaderGraph shaders
    1185836 [URP] Gaussian mode in Depth of Field breaks Single Pass Instanced rendering in VR
    1185834 [URP] Single pass stereo rendering is broken with post effects
    1185832 [URP] Multi Pass rendering broken in VR with post effects

    @daves @LeonhardP
     
    WonkeeKim and ROBYER1 like this.
  10. Dark-Table

    Dark-Table

    Joined:
    Nov 25, 2008
    Posts:
    315
    @daves I'm sure you know, but just for the record, it's not just post processing effects that are broken because of this. Any shader that tries to use the Opaque Texture in LWRP is broken. So things like glass/water refraction are broken. This is a water refraction shader from the Lux LWRP shader pack in VR.
    luxdecalandwater.png
     
    ROBYER1 and fherbst like this.
  11. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    Is this also in URP? This is an exact issue I am having in URP also.
     
  12. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    ROBYER1 likes this.
  13. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    pakfront and ROBYER1 like this.
  14. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    I see this is from the Lux LWRP Essentials, is that pack effectively still broken due to these issues with reflections? Am mostly interested in using the water from that scene if it ever works but won't rush to buy the pack if it is broken for VR.
     
  15. Dark-Table

    Dark-Table

    Joined:
    Nov 25, 2008
    Posts:
    315
    I haven't had a chance to test it with the latest LWRP (6.9.2), but the author of LWRP Essentials implemented a workaround that manually splits the eye texture in half. It works on PC, but is not 100% correct (I think the shader should get the eye texture before it gets warped for the correct effect, which doesn't appear to be possible). It doesn't work on Quest.
     
  16. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    I wonder if the creator will fix that or just wait for the (hopefully inevitable) fixes for the Quest rendering to be done by the Unity Devs
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    i made it work using urp 7.1.2. using single pass instancing. but single pass and multi pass are broken.
    custom shader graphs break as well..
     
    ROBYER1 likes this.
  18. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    Just for others that find your answer @larsbertram1 : Single Pass Instancing is not available on Android VR (Quest/Go), Single Pass is the only viable option there.
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    problems when it comes to vr are pretty much the same (except from pc supporting that instancing mode which actually works with image effects). but i think single pass and multipass should run on all platforms.
     
  20. Thomukas1

    Thomukas1

    Joined:
    Sep 29, 2014
    Posts:
    31
    Hi, guys, how come that in the android build for Oculus Quest, my scene is a lot brighter and duller when i don't have any effect on my pp profile?

    I have selected my camera to use post processing and in the volume i have put a profile in which there are no override effects. In the editor, the scene doesnt get brighter the same way. By the way, when I turn on my effect in Quest, it works fine.