Search Unity

URP 10.3.2 bloom flickers because of the lights!.

Discussion in 'Universal Render Pipeline' started by MP-ul, Mar 16, 2021.

  1. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    I recently upgraded my project from unity 2019.4lts to 2020.3lts and noticed that my scene started flickering from materials with high smoothness/roughness values. What's changed? how do i fix it?. I hope I did not waist al that time waiting for unity to import the project just to have an inferior experience on a newer version.
     
  2. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    I start to feel that I should just leave this engine alone and move to something that does not have this type of problems. I tested it on 3 systems and is the exact same result!. So is not cause of my pc.
     
  3. LordDarkenon

    LordDarkenon

    Joined:
    Sep 26, 2017
    Posts:
    16
    I've experienced quite a few editor error messages and hangs with the 2020.3.0f1 version - seems a lot less stable than the 2019.4LTS versions.
     
    MP-ul likes this.
  4. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    I still hope someone has a fix for this!.
     
  5. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    @Fenixake I had the same problem. I solved it by modifying URP. In ShaderLibrary/Lighting.hlsl you will find function called DirectBRDFSpecular. Just before line with return statement add following line:
    Code (CSharp):
    1. specularTerm = clamp(specularTerm, 0.0, 1.0);
    EDIT:
    I see that you are also using 10.3.2. I forked Graphics library and here is a branch with this fix of mine pushed:
    https://github.com/Sroka/Graphics/tree/lighting_modification
    Mind that after applying it the specular highlights won't have any bloom
     
    Last edited: Mar 19, 2021
    MP-ul likes this.
  6. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    I will see if it works thank you for the reply!.
     
  7. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    I think it has something to do with how the bloom effect not with the specularity of the shader

    EDIT:
    Aparently turning on HDR makes the flickering go away but the bloom looks like crap
     
    Last edited: Mar 19, 2021
  8. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    Aparently nothing solved so far!. :| Anyone having a fix?
     
  9. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
  10. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
  11. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    my URP 7 on 2019.4 has same issue
     
  12. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Just weighing in here, this is an inherent problem with Unity's bloom effect implementation, and I highly doubt they will refactor it anytime soon (as it does require quite a major refactor). What has happened is, Unity have been relying on their TAA for ages, and when it came time to port their bloom to URP (which doesn't have TAA), they didn't account for it - so while their bloom implementation here looks great with TAA, it encounters this flickering issue in all other cases.

    The issue more specifically is that Unity performs almost no temporal stablization on the bloom - they don't use a median pass anywhere, and don't utilize previous-frame textures to smooth out the bloom at all. This is cheaper, but results in that ugly artifact.

    In seeing this (and numerous other shortcomings of URP post-pro, which seems generally like an afterthought from Unity), I'm currently developing a new version of my own asset, PRISM, for URP, which will address this:
     
    MP-ul and UnityLighting like this.
  13. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    Wish you goodluck with the development, and hope to see a stable version of your asset for urp!.
     
    GoGoGadget likes this.