From 587dd866ba749f273222fa0c1d6d8b86220e26a2 Mon Sep 17 00:00:00 2001 From: Anis Benyoub Date: Wed, 16 Dec 2020 16:20:27 +0100 Subject: [PATCH] Changed the message when the graphics device doesn't support ray tracing (case 1287355). --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs | 1 + .../Editor/RenderPipeline/HDRenderPipelineUI.cs | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 45db2779f93..cd534bd340f 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - The DrawRenderers function of CustomPassUtils class now takes a sortingCriteria in parameter. - When in half res, RTR denoising is executed at half resolution and the upscale happens at the end. - Removed the upscale radius from the RTR. +- Changed the message when the graphics device doesn't support ray tracing (case 1287355). ## [10.3.0] - 2020-12-01 diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs index 9716567ee78..405e2e65e37 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs @@ -131,6 +131,7 @@ public class GeneralSection public static readonly GUIContent supportRaytracing = EditorGUIUtility.TrTextContent("Realtime Raytracing (Preview)"); public static readonly GUIContent supportedRayTracingMode = EditorGUIUtility.TrTextContent("Supported Ray Tracing Mode (Preview)"); public static readonly GUIContent rayTracingUnsupportedWarning = EditorGUIUtility.TrTextContent("Ray tracing is not supported on your device. Please refer to the documentation."); + public static readonly GUIContent rayTracingDX12OnlyWarning = EditorGUIUtility.TrTextContent("Ray tracing is currently only supported on DX12."); public static readonly GUIContent maximumLODLevel = EditorGUIUtility.TrTextContent("Maximum LOD Level"); public static readonly GUIContent LODBias = EditorGUIUtility.TrTextContent("LOD Bias"); internal static readonly GUIContent supportProbeVolumeContent = EditorGUIUtility.TrTextContent("Probe Volume", "When enabled, HDRP allocates Shader variants and memory for probe volume based GI. This allows you to use probe volumes in your Unity Project."); diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs index 4c8c3bc927b..168cfbd3373 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -951,7 +951,14 @@ static void Drawer_SectionRenderingUnsorted(SerializedHDRenderPipelineAsset seri EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportedRayTracingMode, Styles.supportedRayTracingMode); if (serialized.renderPipelineSettings.supportRayTracing.boolValue && !UnityEngine.SystemInfo.supportsRayTracing) { - EditorGUILayout.HelpBox(Styles.rayTracingUnsupportedWarning.text, MessageType.Warning, wide: true); + if (PlayerSettings.GetGraphicsAPIs(EditorUserBuildSettings.activeBuildTarget)[0] != GraphicsDeviceType.Direct3D12) + { + EditorGUILayout.HelpBox(Styles.rayTracingDX12OnlyWarning.text, MessageType.Warning, wide: true); + } + else + { + EditorGUILayout.HelpBox(Styles.rayTracingUnsupportedWarning.text, MessageType.Warning, wide: true); + } } --EditorGUI.indentLevel; }