Search Unity

Question URP + WebGL and Post-Processing

Discussion in 'Universal Render Pipeline' started by menguzat, Jun 3, 2020.

  1. menguzat

    menguzat

    Joined:
    Aug 20, 2017
    Posts:
    15
    Hi all,

    I'm trying to build a simple scene for webgl. I use pbr materials so I have to use (I think) URP.

    I use post processing effects (using volume overrides) and I see them all in the editor (and game preview) but however I tried, I cannot seem to get them working in the build itself.

    I needed ambient occlusion too, and I realized that URP doesn't have it, so I downloaded a plugin (HBAO - https://forum.unity.com/threads/horizon-based-ambient-occlusion-hbao-image-effect.387374/page-14) and it acted the same way too.

    The developer informed me that URP doesn't use PP in the build but, is that correct?

    What would be the way for me to build for webgl using pbr materials and PP? I literally scoured the web for answers but couldn't find any that would help me.

    I've been struggling with this for a week with no solution in sight. Could anyone please guide me in the right direction?
     
  2. Veldrinne

    Veldrinne

    Joined:
    Aug 10, 2018
    Posts:
    1
    Select your camera and look in the inspector for a checkbox called "postprocessing". this will enable postprocessing in the game view and your builds.
     
    NetAliveLtd likes this.
  3. danielmonkeyz

    danielmonkeyz

    Joined:
    Oct 22, 2018
    Posts:
    1
    Hey I know it's late but any chance you got this to work?
     
  4. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    Post Processing requires a browser supporting WebGL 2.0. So if you want to make sure it always appears for people then uncheck "Auto Graphics API" (in Build Settings->Player->Other) and make sure you're only including "WebGL 2" - but this does mean less users, so also make sure that's what you want.

    In code, you can check if post processing is available in a user's browser like this:
    Code (CSharp):
    1. bool postProcessingAvailable = (SystemInfo.graphicsDeviceType != GraphicsDeviceType.OpenGLES2);
     
    Jean-Michel_Houbre likes this.
  5. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874