Search Unity

URP Post-Processing and Oculus Go / Quest

Discussion in 'Universal Render Pipeline' started by AaronXRDev, Sep 1, 2019.

  1. AaronXRDev

    AaronXRDev

    Joined:
    Dec 13, 2014
    Posts:
    30
    Is the new pipeline supported on the Oculus Go? I tried deploying it and it doesn't seem to work.
     
    ROBYER1 likes this.
  2. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    You're not likely to hit VR framerates on a mobile GPU with any form of full-screen postprocessing active
     
    ROBYER1 likes this.
  3. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    715
    That simply is not true. Superhot VR has at least bloom on the Quest and runs pretty nicely.
     
  4. Shane_Michael

    Shane_Michael

    Joined:
    Jul 8, 2013
    Posts:
    158
    You are simply wrong.

    If you actually look closely at Superhot, it doesn't use bloom at all. It uses simple distance fog and altering the exposure of the lightmap. The light doesn't actually bleed or blur over any of the characters or weapons.

    The fasting Carmack could get chromatic aberration correction working with a full buffer read was 4ms. That is well over 25% of your entire frame budget at 72fps. The Unity post-processing stack implementation is not going to be faster than Carmack.

    The opportunity cost of using a full-screen post processing is simply too high to be practical.
     
    ROBYER1 and bluescrn like this.
  5. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    715
    Again, that is not true. Even at 50% of the total GPU budget it could just be part of an artistic decision and there is no reason for Unity to not support it.

    (You may be right for the bloom in Superhot, they may just have faked the windows border.)

     
    Develop_SDE likes this.
  6. Shane_Michael

    Shane_Michael

    Joined:
    Jul 8, 2013
    Posts:
    158
    Sure, in the infinite expanse of the multi-verse such a project may exist, but I would still argue that in reality someone who wants to use 25 to 50% of their rendering budget for a post-processing effect is someone who hasn't fully thought through the full range of technical and creative options available to them for the artistic aesthetic they want to achieve.

    Agree to disagree, I guess.

    Though I do agree that Unity should get on their game and get it working because the "URP" is supposed to be production-ready, and there are several post effects that are both fast and useful in mobile VR.

    I just don't think it's show-stopping. If you can copy/paste and know how functions work, you can duplicate the base "Lit" shader and append a custom post-processing function to the end in a minute or two. Most of what you are going to want to do in post on mobile VR is going to be very basic anyway. Even if performance isn't a concern; battery life always is.
     
    ROBYER1 likes this.
  7. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    ROBYER1 likes this.
  8. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    Just wanted to add my two cents, and say that Horizon Zero Dawn used 12% of their frame budget on their clouds. It's really just an artistic and design choice, as long as your gameplay can accommodate.
     
    AaronXRDev likes this.
  9. Shane_Michael

    Shane_Michael

    Joined:
    Jul 8, 2013
    Posts:
    158
    It's not that there is a specific amount of frame time that is too much for a given effect, it is just that the relative cost for post-processing is on mobile VR compared to PC is much higher and so alternate methods of achieving a similar visual effect that avoid post-processing become proportionally better options.

    Specifically, color grading can be appending to your base fragment shader or even baked into your textures. Bloom can be replaced with alpha-blended particles over light sources. Refraction shaders can be approximated by reusing your reflection probes instead of sampling from the screen.

    My point is the opportunity cost of using post-processing on mobile VR is so high that it is very rarely a good balance between visual quality and performance if you fully consider the alternatives.
     
    jiangkuo888 likes this.
  10. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    They also chose to run at 30fps. So that'd be 25% of a 60hz frame spent rendering clouds. For VR, you'd want to be doing that twice per frame, and maybe rendering at 90hz... With the same hardware that would be almost all of your render time.

    Mobile VR is challenging. Postprocessing is entirely too costly for the Oculus Go, and very unlikely be worth the cost even on Quest.

    Yes, Unity sample projects tend to teach people that the way to make things pretty is to turn the postprocessing up to 11... But with mobile VR (and for low-mid spec mobile games in general) you need to find other ways to make things look good.
     
    MWilliams_XR likes this.
  11. Incode

    Incode

    Joined:
    Apr 5, 2015
    Posts:
    78
    Fair points, it's always a trade off, and yes it does seem like there are frequently good alternatives that doesn't sacrifice performance in the way that post processing does for mobile.
     
  12. starfoxy

    starfoxy

    Joined:
    Apr 24, 2016
    Posts:
    184
    Would you be able to expand further on this @Shane_Michael ?
     
  13. Shane_Michael

    Shane_Michael

    Joined:
    Jul 8, 2013
    Posts:
    158
    I mean something like a lens flare or halo effect. If you have an exposed light bulb, for example, use a view-oriented quad (no depth-testing alpha-blended like a "particle" shader) with a glare texture on it (something that is bright in the center and fades toward the edges). Adjust the size of the quad for distance and brightness of the light source, and then you are only doing work/blending for the pixels near the light source where bloom is most apparent. Alpha-blending is not so expensive, but you always want to limit the number of pixels you are touching multiple times so keep the size of the "bloom" reasonable.