Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug [HDRP 10.8.1] Triggering Assert inside HDCachedShadowAtlas when changing quality setting in builds

Discussion in 'High Definition Render Pipeline' started by Grigler_f, Feb 21, 2022.

  1. Grigler_f

    Grigler_f

    Joined:
    May 14, 2020
    Posts:
    24
    For a reason I cannot track down, we're triggering the assert inside of PlaceMultipleShadows when changing quality settings. This code is being reached via DefragmentAtlasAndReRender when the pipeline for the chosen quality setting is constructed and intialized.

    The only information I have found that may be of use so far is that the lights are not always being treated as having multiple shadows as the InsertionSort that runs before placement in the atlas sorts them in reverse order (for reasons that are unclear to me), meaning that a light given a shadow index of 48 for can result in each shadow being handled individually as 53%6 is 4 and isn't seen as multiple shadows. The flow of our game requires us to create and destroy lights at runtime and can result in there being multiple registrations and evictions of lights from the shadow atlas, so maybe this can also contribute to this problem?

    I've also included the stack, if this is of any use.
     

    Attached Files:

  2. Grigler_f

    Grigler_f

    Joined:
    May 14, 2020
    Posts:
    24
    One thing I've forgotten to mention as well is that this assert has never triggered in the editor and it does not always reproduce in builds, it has gone through periods of reproducing and not reproducing on the same machine with no code changes or data changes.