From cc92e866787164bf681234b4f2d395a2b96c08cf Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 8 Oct 2020 12:50:21 +0200 Subject: [PATCH 1/2] Change error predicate --- .../Editor/Wizard/HDWizard.Configuration.cs | 8 +++++++- .../Editor/Wizard/HDWizard.Window.cs | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs b/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs index 52a24fb2619..04181ba6c87 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs @@ -638,8 +638,14 @@ void FixDXRAsset(bool fromAsyncUnused) HDRenderPipeline.defaultAsset.renderPipelineRayTracingResources = AssetDatabase.LoadAssetAtPath(HDUtils.GetHDRenderPipelinePath() + "Runtime/RenderPipelineResources/HDRenderPipelineRayTracingResources.asset"); ResourceReloader.ReloadAllNullIn(HDRenderPipeline.defaultAsset.renderPipelineRayTracingResources, HDUtils.GetHDRenderPipelinePath()); - if (!SystemInfo.supportsRayTracing) + // IMPORTANT: We display the error only if we are D3D12 as the supportsRayTracing always return false in any other device even if OS/HW supports DXR. + // The D3D12 is a separate check in the wizard, so it is fine not to display an error in case we are not D3D12. + if (!SystemInfo.supportsRayTracing && IsDXRDirect3D12Correct()) Debug.LogError("Your hardware and/or OS don't support DXR!"); + if (!HDProjectSettings.wizardNeedRestartAfterChangingToDX12 && PlayerSettings.GetGraphicsAPIs(CalculateSelectedBuildTarget()).FirstOrDefault() != GraphicsDeviceType.Direct3D12) + { + Debug.LogWarning("DXR is supported only with DX12"); + } } bool IsDXRScreenSpaceShadowCorrect() diff --git a/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Window.cs b/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Window.cs index 788c886f230..ab43e5fc1f5 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Window.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Window.cs @@ -159,7 +159,7 @@ public ConfigStyle(string label, string error, string button = resolve, MessageT error: "DXR is not activated!"); public static readonly ConfigStyle dxrResources = new ConfigStyle( label: "DXR resources", - error: "There is an issue with the DXR resources! Or your hardware and/or OS cannot be used for DXR! (unfixable in second case)"); + error: "There is an issue with the DXR resources! Alternatively, Direct3D is not set as API (can be fixed with option above) or your hardware and/or OS cannot be used for DXR! (unfixable)"); public static readonly ConfigStyle dxrScene = new ConfigStyle( label: "Default DXR scene prefab", error: "Default DXR scene prefab must be set to create HD templated scene!"); From 42b3e160ad6b1adbf6ba0a2152e07f7374aade11 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Thu, 8 Oct 2020 12:51:39 +0200 Subject: [PATCH 2/2] changelog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index e7c3552cf1b..26110abc1be 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -139,6 +139,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed backface selection on some shader not ignore correctly. - Disable quad overdraw on ps4. - Fixed error when resizing the graphics compositor's output and when re-adding a compositor in the scene +- Fixed wrong error message when fixing DXR resources from Wizard. ### Changed - Preparation pass for RTSSShadows to be supported by render graph.