Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Bloom not working on mobile build (URP)

Discussion in 'Universal Render Pipeline' started by unity_NPdaWeeDrgNniQ, Oct 11, 2020.

  1. unity_NPdaWeeDrgNniQ

    unity_NPdaWeeDrgNniQ

    Joined:
    Jul 16, 2020
    Posts:
    9
    Hi people,

    I am trying to add bloom in my unity game for mobile phones using URP,
    The problem is, everything works perfectly in the editor/pc,
    But the bloom effect vanishes on the actual apk build.

    This is how it looks in the editor - Upper window is game view and below is the scene view
    Unity0.jpg
    This is what it ends up on the mobile -

    Screenshot_2020-10-11-17-08-14-410_com.XafarGames.CarGuyMobile.jpg

    All the other post processing effects works except bloom...

    Unity Version - 2020.1.2f1
    URP Version - 8.2.0


    Post processing is enabled on the camera component
    HRD is enabled in the SRP settings asset

    I don't know what am I missing or even it is possible to have bloom on mobile.
    I've tried all sorts of things, but nothing works, Even tried on multiple android devices,
    But I get same results every time...

    Anyone who knows how to make it work, please help me,
    I'll be really grateful.
     
  2. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,497
    I haven't seen Post Processing work in a Mobile WebGL build [of mine] yet. I've been assuming that's because my mobile browser only supports WebGL 1.0.. but I could be mistaken, and if it does work without requiring 2.0, I'd like to know. You might also notice shadows not working under WebGL 1.0 either. Given these two things plus severe constraints on memory, plus how long it takes to load, I've pretty much decided it's just too new and won't be production-ready for another 5-10 years when devices are better and the technology has matured. I really do hope it gets to the point that apps are a thing of the past.. but I'm not holding my breath.
     
    ROBYER1 likes this.
  3. Sky77

    Sky77

    Joined:
    Jan 30, 2014
    Posts:
    171
    I don’t know about Android or WebGL, but we’re using post processing on URP on iOS without problems.
     
  4. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,497
    URP Post Processing works for me in WebGL 2.0, Android OpenGLES3, Windows 64 - everything I've tried except WebGL 1.0.. unfortunately.

    Edit: Windows 7 and 10, 64-bit.
     
    Last edited: Oct 11, 2020
    ROBYER1 likes this.
  5. unity_NPdaWeeDrgNniQ

    unity_NPdaWeeDrgNniQ

    Joined:
    Jul 16, 2020
    Posts:
    9
    Does bloom work on iOS?
     
  6. unity_NPdaWeeDrgNniQ

    unity_NPdaWeeDrgNniQ

    Joined:
    Jul 16, 2020
    Posts:
    9
    All the other post processing is working just fine on Android, but the only problem is with bloom...
     
  7. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,497
    I have bloom working on Android - 2020.2, URP 10.1, OpenGLES3
     
  8. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,447
  9. unity_NPdaWeeDrgNniQ

    unity_NPdaWeeDrgNniQ

    Joined:
    Jul 16, 2020
    Posts:
    9
  10. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,447
    Can you check logcat if unity uses ogles2 or ogles3? Maybe you need to enable ogl3/vulkan in your player settings.
     
  11. unity_NPdaWeeDrgNniQ

    unity_NPdaWeeDrgNniQ

    Joined:
    Jul 16, 2020
    Posts:
    9
    I got this, not sure what it means though...

    Screenshot_2020-10-12-00-29-41-136_com.cpuid.cpu_z - Copy.jpg
     
  12. Sky77

    Sky77

    Joined:
    Jan 30, 2014
    Posts:
    171
    Yep it works, we tested it also on quite old devices.
     
  13. TheStrugglingDudeGames

    TheStrugglingDudeGames

    Joined:
    Apr 19, 2020
    Posts:
    3
    Has anyone found a solution to this as i have been struggling away with the exact same issue on android devices

    Okay i figured it out, you need to go into the URP assets (search "UniversalRenderPipeline" in package manager) find the High Quality asset and go in and make sure that HDR is turned on, i also turned on Anti Aliasing to 4x, bloom effect was working perfectly after I did this
     
    Last edited: Oct 25, 2020
    SKizil likes this.
  14. TheStrugglingDudeGames

    TheStrugglingDudeGames

    Joined:
    Apr 19, 2020
    Posts:
    3
    How did you manage to get this working?
     
  15. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,497
    Disable "Auto Graphics API" in Build Settings, put OpenGLES3 first followed by OpenGLES2. There is no Bloom for devices that only have OpenGLES2, so this will make sure it tries 3 first but the app will fall back to 2 if it can't initialize.

    You can check whether Bloom is supported on the device at runtime like this:
    Code (CSharp):
    1. bool bloomSupported = (SystemInfo.graphicsDeviceType != GraphicsDeviceType.OpenGLES2);
     
  16. unity_NPdaWeeDrgNniQ

    unity_NPdaWeeDrgNniQ

    Joined:
    Jul 16, 2020
    Posts:
    9
    Hey, I tried variety of different things but, nothing worked

    Then I
    - Created a new empty URP project
    - Switched platform to Android
    - Set "Edit > Project Settings > Quality > Quality" to High instead of medium or low for android
    - Made sure that under "Edit > Project Settings > Player > Other Settings > Rendering > Graphics APIs", Vulkan and OpenGLES3 are selected
    - Then Enabled "Quality > HDR" and "Post Processing > High Dynamic Range" in the Scriptable Render Pipeline Asset (SRP) which can be found in your Project files
    - Deleted default camera and added new one, set "Rendering > Post Processing" to true in the Camera Component from the Inspector Window
    - Ran a test build by adding a cube to the scene with an emissive material and building the APK

    IT WORKED, this screenshot is taken on my android phone
    IMG-20201014-WA0003.jpg
    Just make sure that your device supports OpenGLES3, that you can check using CPU-Z, that's it

    - Lastly I copied all my project files from previous project to the new one, And things are going on pretty well since then...

    Try these exact steps in the same order, I explained it in detail, because I was really frustrated when I was facing this problem and I wasted 2 full days figuring out a solution...
     
  17. Faysik

    Faysik

    Joined:
    Oct 26, 2017
    Posts:
    2
    Hi, I ran into a problem that shader graph shaders do not work on android devices, switching helped o High instead of medium or low for android helped me! Thanks!
     
  18. Abdullah988

    Abdullah988

    Joined:
    Oct 2, 2021
    Posts:
    1
    Thanks alot Man!!