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

Bug URP very bad shadow flickering only in build mod, none in editor!

Discussion in 'Editor & General Support' started by skullleeep, Aug 7, 2023.

  1. skullleeep

    skullleeep

    Joined:
    Jun 1, 2021
    Posts:
    8
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    Make sure the builds and editor use the same quality tiers. If you're starting just use 1 tier for simplicity.

    If that's done, make sure you are using default shaders like URP Lit to see if it is a shader issue.
    If you use custom shaders from amplify, update amplify and the shader.

    Maybe try to export the 3D models to a blank project to see if it works there.

    Maybe disable URP render features like screen space shadows and screen space ambient occlusion.

    Feel free to share the URP asset if you want so I can take a look
     
    Kurt-Dekker likes this.
  3. skullleeep

    skullleeep

    Joined:
    Jun 1, 2021
    Posts:
    8
    So I tried everything you said and looks like it might be something with the trees materials or meshes, because changing URP asset settings didn't change anything, but I did notice that it was only happening with the tree shadows. I made a new project and just put the tree models in the project and there I noticed the same shadow problem, but in the editor also. Strangely enough, when I made a build there were still problems with the shadows in the build, but once again no problems in the editor (wtf unity). This problem appeared when I upgraded my project from 2019 LTS to 2022LTS. Will try playing around with the tree prefabs, but don't know if I can do much as they were bought from the unity asset store. EDIT: looks like the alpha cut off of the leaf material is not working on the shadows, that is why tree shadows look 'fatter'. Any idea why that is happening?
     
    Last edited: Aug 8, 2023
  4. skullleeep

    skullleeep

    Joined:
    Jun 1, 2021
    Posts:
    8
  5. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    Hope that works!
    Also a bug report might be nice, so it can be fixed
     
  6. skullleeep

    skullleeep

    Joined:
    Jun 1, 2021
    Posts:
    8
    Yes, I finally just finished and everything works. After upgrading to 2023 there were many other problems, so I had to downgrade to 2021. It took a lot of time to downgrade, but finallyyyyyyyy everything works perfectly. Thank you very much for trying to help me! As for the bug report it already exists Unity Issue Tracker - Shadows alpha clipping is ignored and shadows rendered without details in Player (unity3d.com), but unity for some reason decided to not fix this very big bug in the 2022 version. Nice one Unity!
     
    DevDunk likes this.
  7. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    yeah that one is fully closed, so a new one should be made.
    They might have planned a backport which got lost or something