diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/AmbientOcclusionEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/AmbientOcclusionEditor.cs index 0cdb10f7859..2917092a21b 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/AmbientOcclusionEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/AmbientOcclusionEditor.cs @@ -33,7 +33,7 @@ class AmbientOcclusionEditor : VolumeComponentWithQualityEditor SerializedDataParameter m_Denoise; SerializedDataParameter m_DenoiserRadius; - public override bool hasAdvancedMode => (m_RayTracing == null || !(HDRenderPipeline.buildPipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue)); + public override bool hasAdvancedMode => (m_RayTracing == null || !(HDRenderPipeline.assetSupportsRayTracing && m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue)); public override void OnEnable() { @@ -72,7 +72,7 @@ public override void OnInspectorGUI() return; } - if (HDRenderPipeline.buildPipelineSupportsRayTracing) + if (HDRenderPipeline.assetSupportsRayTracing) PropertyField(m_RayTracing, EditorGUIUtility.TrTextContent("Ray Tracing (Preview)", "Enable ray traced ambient occlusion.")); // Shared attributes @@ -80,7 +80,7 @@ public override void OnInspectorGUI() PropertyField(m_DirectLightingStrength, EditorGUIUtility.TrTextContent("Direct Lighting Strength", "Controls how much the ambient light affects occlusion.")); // If ray tracing is supported and it is enabled on this volume, display the ray tracing options. - if (HDRenderPipeline.buildPipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue) + if (HDRenderPipeline.assetSupportsRayTracing && m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue) { PropertyField(m_LayerMask, EditorGUIUtility.TrTextContent("Layer Mask", "Layer mask used to include the objects for ambient occlusion.")); base.OnInspectorGUI(); // Quality Setting diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs index 93d3dbec769..5295a5ec198 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs @@ -1100,7 +1100,7 @@ static void DrawShadowMapContent(SerializedHDLight serialized, Editor owner) EditorGUILayout.Slider(serialized.areaLightShadowCone, HDAdditionalLightData.k_MinAreaLightShadowCone, HDAdditionalLightData.k_MaxAreaLightShadowCone, s_Styles.areaLightShadowCone); } - if (HDRenderPipeline.buildPipelineSupportsRayTracing && HDRenderPipeline.pipelineSupportsScreenSpaceShadows) + if (HDRenderPipeline.assetSupportsRayTracing && HDRenderPipeline.pipelineSupportsScreenSpaceShadows) { bool isPunctual = lightType == HDLightType.Point || (lightType == HDLightType.Spot && serialized.spotLightShape.GetEnumValue() == SpotLightShape.Cone); if (isPunctual || (lightType == HDLightType.Area && serialized.areaLightShape == AreaLightShape.Rectangle)) @@ -1135,7 +1135,7 @@ static void DrawShadowMapContent(SerializedHDLight serialized, Editor owner) if (lightType == HDLightType.Directional && HDRenderPipeline.pipelineSupportsScreenSpaceShadows) { EditorGUILayout.PropertyField(serialized.useScreenSpaceShadows, s_Styles.useScreenSpaceShadows); - if (HDRenderPipeline.buildPipelineSupportsRayTracing) + if (HDRenderPipeline.assetSupportsRayTracing) { using (new EditorGUI.DisabledScope(!serialized.useScreenSpaceShadows.boolValue)) { @@ -1245,7 +1245,7 @@ static void DrawContactShadowsContent(SerializedHDLight serialized, Editor owner HDAdditionalLightData.ScalableSettings.UseContactShadow(hdrp), hdrp.name ); - if (HDRenderPipeline.buildPipelineSupportsRayTracing + if (HDRenderPipeline.assetSupportsRayTracing && serialized.contactShadows.@override.boolValue) { EditorGUI.indentLevel++; diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDScreenSpaceReflectionEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDScreenSpaceReflectionEditor.cs index 790f423cd86..446b448373f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDScreenSpaceReflectionEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDScreenSpaceReflectionEditor.cs @@ -189,7 +189,7 @@ public override void OnInspectorGUI() PropertyField(m_Enable, EditorGUIUtility.TrTextContent("Enable")); // The ray tracing enabling checkbox is only displayed if the asset supports ray tracing - bool rayTracingSupported = HDRenderPipeline.buildPipelineSupportsRayTracing; + bool rayTracingSupported = HDRenderPipeline.assetSupportsRayTracing; if (rayTracingSupported) PropertyField(m_RayTracing, k_RayTracingText); @@ -232,7 +232,7 @@ public override QualitySettingsBlob SaveCustomQualitySettingsAsObject(QualitySet settings = new QualitySettingsBlob(); // RTR - if (HDRenderPipeline.buildPipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue && + if (HDRenderPipeline.assetSupportsRayTracing && m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue) { settings.Save(m_MinSmoothness); @@ -254,7 +254,7 @@ public override QualitySettingsBlob SaveCustomQualitySettingsAsObject(QualitySet public override void LoadSettingsFromObject(QualitySettingsBlob settings) { // RTR - if (HDRenderPipeline.buildPipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue && + if (HDRenderPipeline.assetSupportsRayTracing && m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue) { settings.TryLoad(ref m_MinSmoothness); @@ -274,7 +274,7 @@ public override void LoadSettingsFromObject(QualitySettingsBlob settings) public override void LoadSettingsFromQualityPreset(RenderPipelineSettings settings, int level) { // RTR - if (HDRenderPipeline.buildPipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue && + if (HDRenderPipeline.assetSupportsRayTracing && m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue) { CopySetting(ref m_MinSmoothness, settings.lightingQualitySettings.RTRMinSmoothness[level]); @@ -294,7 +294,7 @@ public override void LoadSettingsFromQualityPreset(RenderPipelineSettings settin public override bool QualityEnabled() { // Quality always used for SSR - if (!HDRenderPipeline.buildTargetSupportsRayTracing || !m_RayTracing.value.boolValue) + if (!HDRenderPipeline.assetSupportsRayTracing || !m_RayTracing.value.boolValue) return true; // Handle the quality usage for RTGI diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/PathTracing/PathTracingEditor.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/PathTracing/PathTracingEditor.cs index 2c773e52b8b..6b4c68fb1f8 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/PathTracing/PathTracingEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/PathTracing/PathTracingEditor.cs @@ -41,7 +41,7 @@ public override void OnInspectorGUI() } // If ray tracing is supported display the content of the volume component - if (HDRenderPipeline.buildPipelineSupportsRayTracing) + if (HDRenderPipeline.assetSupportsRayTracing) { PropertyField(m_Enable); diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/GlobalIlluminationEditor.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/GlobalIlluminationEditor.cs index 23e5bb3ad62..f27113c92cd 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/GlobalIlluminationEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/GlobalIlluminationEditor.cs @@ -103,7 +103,7 @@ public override void OnInspectorGUI() PropertyField(m_Enable); // If ray tracing is supported display the content of the volume component - if (HDRenderPipeline.buildPipelineSupportsRayTracing) + if (HDRenderPipeline.assetSupportsRayTracing) { PropertyField(m_RayTracing, EditorGUIUtility.TrTextContent("Ray Tracing (Preview)", "Enable ray traced global illumination.")); } @@ -113,7 +113,7 @@ public override void OnInspectorGUI() using (new HDEditorUtils.IndentScope()) { - if (HDRenderPipeline.buildPipelineSupportsRayTracing) + if (HDRenderPipeline.assetSupportsRayTracing) { if (m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue) { @@ -268,7 +268,7 @@ public override void LoadSettingsFromQualityPreset(RenderPipelineSettings settin public override bool QualityEnabled() { // Quality always used for SSGI - if (!HDRenderPipeline.buildTargetSupportsRayTracing || !m_RayTracing.value.boolValue) + if (!HDRenderPipeline.assetSupportsRayTracing || !m_RayTracing.value.boolValue) return true; // Handle the quality usage for RTGI diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/RecursiveRenderingEditor.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/RecursiveRenderingEditor.cs index 3a0dc75f62c..f8a2203bb97 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/RecursiveRenderingEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/RecursiveRenderingEditor.cs @@ -39,7 +39,7 @@ public override void OnInspectorGUI() } // If ray tracing is supported display the content of the volume component - if (HDRenderPipeline.buildPipelineSupportsRayTracing) + if (HDRenderPipeline.assetSupportsRayTracing) { PropertyField(m_Enable); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 53a3d890a2a..8902ad37e9e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -35,7 +35,7 @@ internal static HDRenderPipeline currentPipeline internal static bool pipelineSupportsRayTracing => HDRenderPipeline.currentPipeline != null && HDRenderPipeline.currentPipeline.rayTracingSupported; #if UNITY_EDITOR - internal static bool buildPipelineSupportsRayTracing => HDRenderPipeline.currentPipeline != null && (HDRenderPipeline.currentPipeline.m_AssetSupportsRayTracing && HDRenderPipeline.buildTargetSupportsRayTracing); + internal static bool assetSupportsRayTracing => HDRenderPipeline.currentPipeline != null && (HDRenderPipeline.currentPipeline.m_AssetSupportsRayTracing); #endif internal static bool pipelineSupportsScreenSpaceShadows => GraphicsSettings.currentRenderPipeline is HDRenderPipelineAsset hdrpAsset ? hdrpAsset.currentPlatformRenderPipelineSettings.hdShadowInitParams.supportScreenSpaceShadows : false; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs index 69871a7cee5..62e2c648f3d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs @@ -676,13 +676,13 @@ internal HDRaytracingLightCluster RequestLightCluster() static internal bool PipelineSupportsRayTracing(RenderPipelineSettings rpSetting) => rpSetting.supportRayTracing && currentSystemSupportsRayTracing; - static internal bool currentSystemSupportsRayTracing - => SystemInfo.supportsRayTracing; - + static internal bool currentSystemSupportsRayTracing => SystemInfo.supportsRayTracing #if UNITY_EDITOR - static internal bool buildTargetSupportsRayTracing - => (UnityEditor.PlayerSettings.GetGraphicsAPIs(UnityEditor.EditorUserBuildSettings.activeBuildTarget)[0] == GraphicsDeviceType.Direct3D12) - || (UnityEditor.PlayerSettings.GetGraphicsAPIs(UnityEditor.EditorUserBuildSettings.activeBuildTarget)[0] == GraphicsDeviceType.PlayStation5); + && ((UnityEditor.EditorUserBuildSettings.activeBuildTarget == UnityEditor.BuildTarget.StandaloneWindows64 + || UnityEditor.EditorUserBuildSettings.activeBuildTarget == UnityEditor.BuildTarget.StandaloneWindows) + || UnityEditor.EditorUserBuildSettings.activeBuildTarget == UnityEditor.BuildTarget.PS5); +#else + ; #endif internal BlueNoise GetBlueNoiseManager()