Search Unity

Enabling Shadow Map in lights cause errors (HDRP)

Discussion in 'High Definition Render Pipeline' started by InfinityOLA, Dec 18, 2021.

  1. InfinityOLA

    InfinityOLA

    Joined:
    Dec 8, 2017
    Posts:
    3
    Hi there,

    so I have this error that I can't really fix. By enabling the Shadow Map option in any light source, the scene will grey out immediately and the console will output the following errors:

    - "Trying to access resource of type Texture with an invalid resource index 36"
    - "Error while building Render Graph."
    - "InvalidOperationException: RenderPass Render Shadow Maps was not provided with an execute function."
    - "Render Graph Execution error"

    It's an HDRP scene with standard HDRP settings. No experimental packages or anything else is used in the project.

    The Unity version is: 2021.2.7f1
    My GPU: AMD RX 6600 XT

    I really don't know how to fix this error right now but if I find a solution I will update it here.
     
  2. Brenton

    Brenton

    Joined:
    Apr 4, 2013
    Posts:
    18
    I am getting the same thing, I think it's related to Nature Shaders, does your project include them?
     
  3. mike11986

    mike11986

    Joined:
    Jul 23, 2018
    Posts:
    24
    Hmm, this may be related to an error I've been seeing where it will hang around for a while and then start having this error. After the error spams for a minute or two, the scene view goes completely gray until I start my game and end it to go back to the scene.
     
  4. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    same issue, sigh...
     
  5. InfinityOLA

    InfinityOLA

    Joined:
    Dec 8, 2017
    Posts:
    3
    So the problem could stem from a poorly configured "planar reflection probe". So please check your settings there. What helped me was switching the realtime mode from "every frame" to "on enable".
     
  6. InfinityOLA

    InfinityOLA

    Joined:
    Dec 8, 2017
    Posts:
    3
    Found out that other issues related to "Shadow Map" are not yet fixed by Unity themselves. Problems occur on versions 2021.2.+. A fix is on its way and should hopefully come out in version 2021.2.8 or 2021.2.9.

    Meanwhile, you can try to bug fix this problem yourself by adding and deleting some lines of code in the "RenderGraphResource.cs" file in the package folder.

    Link to the fix: https://github.com/Unity-Technologies/Graphics/pull/6329/files

    I sadly don't know how to edit read-only files in the package folder so you have to try it yourself.
     
  7. Justin_Miersch

    Justin_Miersch

    Joined:
    Mar 10, 2016
    Posts:
    7
    Hey guys!
    Just letting you know that this is fixed in 2021.2.8 / HDRP 12.1.3 :)
     
    filod and Brenton like this.