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 Shadow issues in URP after updating to 2022.2

Discussion in 'Universal Render Pipeline' started by MasterTechnologies, Dec 27, 2022.

  1. MasterTechnologies

    MasterTechnologies

    Joined:
    Feb 15, 2014
    Posts:
    4
    After updating to Unity 2022.2 from 2021.3 the shadows are having a lot of artefacts, with the issue most apparent at the border between cascades. The issue appears both in forward and deferred rendering, but only in build. The shadows look fine in the editor.

    Do anyone know what the issue may be? I have tried changing all URP rendering settings that I can find with no result.

    Please see the following screenshot with problem areas marked in red:
     
    Last edited: Dec 27, 2022
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    Can you share the shadow settings in the URP asset?
     
  3. MasterTechnologies

    MasterTechnologies

    Joined:
    Feb 15, 2014
    Posts:
    4
  4. MasterTechnologies

    MasterTechnologies

    Joined:
    Feb 15, 2014
    Posts:
    4
    I have managed to solve the problem. It is the same issue described in this thread: https://forum.unity.com/threads/shadow-cascades-weird-since-7-2-0.828453/

    The solution is to undefine the shader keyword "REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR" or remove references to it in your shader. I do not know why the issue only shows up in build or what has changed between URP 12 and 14. There seems to be a bug in Unity 2022.2 that causes "REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR" to be defined in build, even when using shadow cascades.
     
    DevDunk likes this.
  5. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    Is you can make a reproduction product it would be very useful if you make a bug report
     
  6. Valerion

    Valerion

    Joined:
    May 30, 2014
    Posts:
    5