Search Unity

Resolved HDRP Black Flickering in Editor Window

Discussion in 'High Definition Render Pipeline' started by _geo__, Dec 8, 2022.

  1. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,336
    If I get too close to some objects the whole Editor view starts to flicker black.
    The scene is rather simple (only one global volume):
    upload_2022-12-8_12-4-33.png

    Has anyone seen something like this before?
    It's not a big issue but I wonder why this is happening (restarting Unity does not help btw.).



    The objet has a shadergraph shader on it.

    Here is the frame debugger (it flickers a lot, seizure warning!!)
    Is PostProcessing causing this?
     
    Last edited: Dec 8, 2022
  2. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595
    Hey there, this is called a NaN error (not a number)

    looks like you're using or creating custom shaders so it'd be best to look into that.
    IIRC Shader Graph has a NaN nod that might be able to help you identify which node(s) is causing the NaN but otherwise, there's no way to actually debug it in the graph.

    if the NaN is in your scene ( unlikely in this case butviable as some post processes can NaN on the very centre pixel when in free aspect.
    Then you can use the render debugger under
    windows > Render Pipeline Menu > Rendering > Full screen mode > NaN detector

    This one probably won't work in your scene though as it looks as though it's more the shader itself than something like a terrain layer splat missing ( which is where you commonly see the NaN detector come in handy
     
    _geo__ likes this.
  3. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,336
    Thank you !
    That sounds like a good lead. I think I have a hunch now :)
    I did not know about the NaN detector. I was trying to find something with the preview node before.

    The odd thing is I had the same graph in URP and HDRP but in URP I just couldn't reproduce it, only HDRP "failed".
     
  4. _geo__

    _geo__

    Joined:
    Feb 26, 2014
    Posts:
    1,336
    Found the culprit. I had slipped in an InverseLerp Node at a place where a Lerp Node should have been (it ended up dividing by zero). Lesson: One should not edit big graphs at 1 am.

    I think the auto complete tricked me into this:
    upload_2022-12-9_22-57-38.png

    Thanks again @HIBIKI_entertainment - I ended up going back through the whole graph checking with NAN Nodes untiI I found it.

    I also did a bit of reading about why NaNs are causing a totally black screen. I found this nice article in the docs:
    Propagating NaNs/Infs
    Fixing NaNs and Infs

    Reading those articles also solved the riddle why it only was visible in HDRP. HDRP is the only setup that I use PostPro in. It happened in URP too but just was not visible enough on the rather dark texture.
     
    Last edited: Dec 9, 2022
    HIBIKI_entertainment likes this.
  5. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595

    Wooo, glad to hear you found it all and fixed it, well done expert deduction skills.
     
    _geo__ likes this.
  6. Kfollen

    Kfollen

    Joined:
    Nov 12, 2019
    Posts:
    37
    I'm experiencing this in a completely empty HDRP project, but it is only when I do HDRP + DXR, and the whole entire screen flickers black (not just the scene editor portion). Using an RTX 3080.
     
  7. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595

    If it's your screen ie, the program flickering, that sounds like GPU/Driver support issues itself.

    I would consider checking Which drivers you're running and look into whether you'll require different, especially with regards to studio/game drivers.

    Would be curious to see this though.

    We've not ever seen anything like this on our 1|2|3|4 000 series cards when using DXR