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.

Resolved Shader stripping + Platform Windows 10 (10.0.0) 64bit with device Direct3D11 is not supported

Discussion in 'High Definition Render Pipeline' started by Elideb, Aug 17, 2020.

  1. Elideb

    Elideb

    Joined:
    Jul 29, 2014
    Posts:
    10
    When building for HDRP, we started getting this not very informative error message:

    Code (CSharp):
    1. Platform Windows 10  (10.0.0) 64bit with device Direct3D11 is not supported with High Definition Render Pipeline, no rendering will occur
    It only happened on builds, and made little sense. The PC had DirectX12 compatible hardware and drivers, and another test HDRP project built and ran correctly, even after matching the whole HDRP configuration.

    I went mad for a while, trying to figure out what was happening, building for Vulkan, DX12, checking drivers, etc., and always getting the same error. Until I found the source of the error in HDRP package's HDRenderPipeline.cs

    Code (CSharp):
    1. bool IsSupportedPlatform(out GraphicsDeviceType unsupportedGraphicDevice)
    That method checks several things:
    • The system supports ComputeShaders
    • The "Default PS" shader set in HDRP resources returns true in isSupported
    • The graphics device is supported
    • The OS is supported
    In our case, the problem was the second one, caused by shader stripping. Our resources pointed at the default HDRP/Lit. Some of its variants were included in the build, but apparently not the one Unity checks in isSupported. I'm guessing it's probably the no-keywords one, but can't confirm just now. I'll test that next, but it's not that relevant.

    Including HDRP/Lit in the list of "Always included shaders" did not work, because Unity complains about it having too many variants.

    So, when going for HDRP, make sure you don't strip your HDRP Resources' Default PS variants.