Search Unity

HDRP Black screen on launch

Discussion in 'Editor & General Support' started by HamishDunn, Aug 12, 2021.

  1. HamishDunn

    HamishDunn

    Joined:
    Apr 12, 2018
    Posts:
    3
    Issue
    Launch enters a scene with a camera and lit cube but only shows a black screen.
    Splash screen shows blank dark-grey texture instead of the Unity logo:
    Sprocket_Gd8pybKvM8.png
    No custom scripts running. Only occurs in build (Windows).

    Only one thing thrown (repeatedly):
    Code (CSharp):
    1.     Thread group size must be above zero
    2.     UnityEngine.Rendering.HighDefinition.HDRenderPipeline:Render(ScriptableRenderContext, Camera[])
    3.     UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal(RenderPipelineAsset, IntPtr, List`1)
    4.     [C:\buildslave\unity\build\Runtime/Shaders/ComputeShader.cpp line 1349229880]
    Tried:
    - Restarting editor and my PC.
    - Updating and reinstalling graphics drivers.
    - Building on another similar-setup project, works fine.
    - Building in Mono, doesn't work either.

    On Unity 2020.3.12f1, HDRP 10.5.1, IL2CPP, Windows 10 64-bit
    DirectX 11 Shader model 5.0 capable GPU

    Was working fine ~10 days ago, no software-updates since then. I'm guessing I've messed up a setting.
    Auto Graphics API is enabled (saw this on a similar-ish post).
    Any clues?

    Update:
    - Reverted project settings to a backup from when it was working. No change.
    - Tested the build on another machine, worked perfectly. Something is wrong on this specific project on this specific machine.
     
    Last edited: Aug 12, 2021
  2. HamishDunn

    HamishDunn

    Joined:
    Apr 12, 2018
    Posts:
    3
    Fixed!
    The problem was caused by poor screen resolution management. Settings were defaulting to 0x0 resolution @0hz, resulting in a black screen. This was then auto-saved in player-prefs, causing the app to launch with this configuration, causing the splash screen to fail as well.
     
  3. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,119
    how that happen? did you do something yourself to cause the bug? please give more details to help people in the future
     
  4. HamishDunn

    HamishDunn

    Joined:
    Apr 12, 2018
    Posts:
    3
    Poor screen resolution management on my part. Just be careful when saving & loading screen resolution settings. When you fix your end, reset the player-prefs so it doesn't launch with the bad screen settings.