From 35f24d753eebc35d24bf4e0eb43a6d9e0e59c3a1 Mon Sep 17 00:00:00 2001 From: Remi Chapelain Date: Tue, 18 Aug 2020 17:23:47 +0200 Subject: [PATCH 1/5] Add 64 bits optionnal check for DXR wizard (for DXR player) --- .../Editor/Wizard/HDWizard.Configuration.cs | 4 ++++ .../Editor/Wizard/HDWizard.Window.cs | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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 3c19d20d69e..0c6f5e00c77 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 @@ -179,6 +179,7 @@ Entry[] entries new Entry(InclusiveScope.DXROptional, Style.dxrReflections, IsDXRReflectionsCorrect, null, forceDisplayCheck: true, skipErrorIcon: true), new Entry(InclusiveScope.DXROptional, Style.dxrTransparentReflections, IsDXRTransparentReflectionsCorrect, null, forceDisplayCheck: true, skipErrorIcon: true), new Entry(InclusiveScope.DXROptional, Style.dxrGI, IsDXRGICorrect, null, forceDisplayCheck: true, skipErrorIcon: true), + new Entry(InclusiveScope.DXROptional, Style.dxr64bits, IsArchitecture64Bits, null, forceDisplayCheck: true, skipErrorIcon: true), }; return m_Entries; @@ -656,6 +657,9 @@ bool IsDXRTransparentReflectionsCorrect() bool IsDXRGICorrect() => HDRenderPipeline.currentAsset != null && HDRenderPipeline.currentAsset.currentPlatformRenderPipelineSettings.supportSSGI; + + bool IsArchitecture64Bits() + => EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows64; bool IsDXRStaticBatchingCorrect() 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 e35b3ebc429..8e454e3f4fd 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 @@ -148,7 +148,10 @@ public ConfigStyle(string label, string error, string button = resolve, MessageT public static readonly ConfigStyle dxrGI = new ConfigStyle( label: "Global Illumination", error: "Screen Space Global Illumination is disabled in the current HDRP asset. You will not be able to toggle ray global illumination though your volume components. You can enable the feature in the HDRP asset under Lighting -> Screen Space Global Illumination", messageType: MessageType.Info); - public static readonly ConfigStyle dxrStaticBatching = new ConfigStyle( + public static readonly ConfigStyle dxr64bits = new ConfigStyle( + label: "Architecture 64 bits", + error: "Your architecture is currently 32 bits. To build your Project to a Unity Player, ray tracing requires that the build uses 64 bit architecture. To set your build to use 64 bit architecture, Open the Build Settings window (menu: File > Build Settings). From the Architecture drop-down, select x86_64.", messageType: MessageType.Info); + public static readonly ConfigStyle dxrStaticBatching = new ConfigStyle( label: "Static Batching", error: "Static Batching is not supported!"); public static readonly ConfigStyle dxrActivated = new ConfigStyle( From ab6068910290abc186b2844b51e1c0b6318d8255 Mon Sep 17 00:00:00 2001 From: Remi Chapelain Date: Tue, 18 Aug 2020 17:51:53 +0200 Subject: [PATCH 2/5] Added changelog entry --- 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 57840c41685..03e0a212dd6 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -166,6 +166,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added missing API documentation. - Added an option to have only the metering mask displayed in the debug mode. - Added a new mode to cluster visualization debug where users can see a slice instead of the cluster on opaque objects. +- Added an optional check in the HDRP DXR Wizard to verify 64 bits target architecture ### Fixed - Fix when rescale probe all direction below zero (1219246) From 2dde67dee6cd1cda98a348dac4f54623c4f8e203 Mon Sep 17 00:00:00 2001 From: Remi Chapelain Date: Thu, 20 Aug 2020 11:44:17 +0200 Subject: [PATCH 3/5] Changed the check to a required one with a fix button --- .../Editor/Wizard/HDWizard.Configuration.cs | 8 ++++++-- .../Editor/Wizard/HDWizard.Window.cs | 4 ++-- 2 files changed, 8 insertions(+), 4 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 0c6f5e00c77..e178647db76 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 @@ -174,12 +174,13 @@ Entry[] entries new Entry(InclusiveScope.DXR, Style.dxrStaticBatching, IsDXRStaticBatchingCorrect, FixDXRStaticBatching), new Entry(InclusiveScope.DXR, Style.dxrActivated, IsDXRActivationCorrect, FixDXRActivation), new Entry(InclusiveScope.DXR, Style.dxrResources, IsDXRAssetCorrect, FixDXRAsset), + new Entry(InclusiveScope.DXR, Style.dxr64bits, IsArchitecture64Bits, FixArchitecture64Bits), + // Optional checks new Entry(InclusiveScope.DXROptional, Style.dxrScreenSpaceShadow, IsDXRScreenSpaceShadowCorrect, null, forceDisplayCheck: true, skipErrorIcon: true), new Entry(InclusiveScope.DXROptional, Style.dxrReflections, IsDXRReflectionsCorrect, null, forceDisplayCheck: true, skipErrorIcon: true), new Entry(InclusiveScope.DXROptional, Style.dxrTransparentReflections, IsDXRTransparentReflectionsCorrect, null, forceDisplayCheck: true, skipErrorIcon: true), new Entry(InclusiveScope.DXROptional, Style.dxrGI, IsDXRGICorrect, null, forceDisplayCheck: true, skipErrorIcon: true), - new Entry(InclusiveScope.DXROptional, Style.dxr64bits, IsArchitecture64Bits, null, forceDisplayCheck: true, skipErrorIcon: true), }; return m_Entries; @@ -660,7 +661,10 @@ bool IsDXRGICorrect() bool IsArchitecture64Bits() => EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows64; - + void FixArchitecture64Bits(bool fromAsyncUnused) + { + EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.StandaloneWindows64); + } bool IsDXRStaticBatchingCorrect() => !GetStaticBatching(CalculateSelectedBuildTarget()); 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 8e454e3f4fd..860754ad7f3 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 @@ -148,9 +148,9 @@ public ConfigStyle(string label, string error, string button = resolve, MessageT public static readonly ConfigStyle dxrGI = new ConfigStyle( label: "Global Illumination", error: "Screen Space Global Illumination is disabled in the current HDRP asset. You will not be able to toggle ray global illumination though your volume components. You can enable the feature in the HDRP asset under Lighting -> Screen Space Global Illumination", messageType: MessageType.Info); - public static readonly ConfigStyle dxr64bits = new ConfigStyle( + public static readonly ConfigStyle dxr64bits = new ConfigStyle( label: "Architecture 64 bits", - error: "Your architecture is currently 32 bits. To build your Project to a Unity Player, ray tracing requires that the build uses 64 bit architecture. To set your build to use 64 bit architecture, Open the Build Settings window (menu: File > Build Settings). From the Architecture drop-down, select x86_64.", messageType: MessageType.Info); + error: "To build your Project to a Unity Player, ray tracing requires that the build uses 64 bit architecture."); public static readonly ConfigStyle dxrStaticBatching = new ConfigStyle( label: "Static Batching", error: "Static Batching is not supported!"); From 0179e57ab7c2c45f064c71afa3c8664c089988e0 Mon Sep 17 00:00:00 2001 From: Remi Chapelain Date: Thu, 20 Aug 2020 14:01:04 +0200 Subject: [PATCH 4/5] Change obsolete switch target function --- .../Editor/Wizard/HDWizard.Configuration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e178647db76..93a344dd332 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 @@ -663,7 +663,7 @@ bool IsArchitecture64Bits() => EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows64; void FixArchitecture64Bits(bool fromAsyncUnused) { - EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.StandaloneWindows64); + EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows64); } bool IsDXRStaticBatchingCorrect() From 01d77a4e77822211676fcdc1c10c6eff064ee8e9 Mon Sep 17 00:00:00 2001 From: Remi Chapelain Date: Fri, 21 Aug 2020 10:50:09 +0200 Subject: [PATCH 5/5] Fix ordering to avoid breaking the resources group --- .../Editor/Wizard/HDWizard.Configuration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 93a344dd332..d19a5aeca40 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 @@ -173,8 +173,8 @@ Entry[] entries new Entry(InclusiveScope.DXR, Style.dxrD3D12, IsDXRDirect3D12Correct, FixDXRDirect3D12), new Entry(InclusiveScope.DXR, Style.dxrStaticBatching, IsDXRStaticBatchingCorrect, FixDXRStaticBatching), new Entry(InclusiveScope.DXR, Style.dxrActivated, IsDXRActivationCorrect, FixDXRActivation), - new Entry(InclusiveScope.DXR, Style.dxrResources, IsDXRAssetCorrect, FixDXRAsset), new Entry(InclusiveScope.DXR, Style.dxr64bits, IsArchitecture64Bits, FixArchitecture64Bits), + new Entry(InclusiveScope.DXR, Style.dxrResources, IsDXRAssetCorrect, FixDXRAsset), // Optional checks new Entry(InclusiveScope.DXROptional, Style.dxrScreenSpaceShadow, IsDXRScreenSpaceShadowCorrect, null, forceDisplayCheck: true, skipErrorIcon: true),