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 e1859f42f26..c3d56f1b550 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/AmbientOcclusionEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/AmbientOcclusionEditor.cs @@ -76,7 +76,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 @@ -84,7 +84,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 872b3da020a..abeac84ec99 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs @@ -1164,7 +1164,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)) @@ -1199,7 +1199,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)) { @@ -1333,7 +1333,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 147a7788c07..9bd73d57cf1 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 @@ -216,12 +216,12 @@ public override void OnInspectorGUI() PropertyField(m_Enable); // If ray tracing is supported display the tracing choice - if (HDRenderPipeline.buildPipelineSupportsRayTracing) + if (HDRenderPipeline.assetSupportsRayTracing) PropertyField(m_Tracing, k_TracingText); // Flag to track if the ray tracing parameters were displayed RayCastingMode tracingMode = m_Tracing.value.GetEnumValue(); - bool rayTracingSettingsDisplayed = HDRenderPipeline.buildPipelineSupportsRayTracing + bool rayTracingSettingsDisplayed = HDRenderPipeline.assetSupportsRayTracing && m_Tracing.overrideState.boolValue && tracingMode != RayCastingMode.RayMarching; @@ -282,7 +282,7 @@ public override QualitySettingsBlob SaveCustomQualitySettingsAsObject(QualitySet public override void LoadSettingsFromObject(QualitySettingsBlob settings) { // RTR - if (HDRenderPipeline.buildPipelineSupportsRayTracing && m_Tracing.overrideState.boolValue && + if (HDRenderPipeline.assetSupportsRayTracing && m_Tracing.overrideState.boolValue && m_Tracing.value.GetEnumValue() != RayCastingMode.RayMarching) { settings.TryLoad(ref m_MinSmoothness); @@ -303,7 +303,7 @@ public override void LoadSettingsFromObject(QualitySettingsBlob settings) public override void LoadSettingsFromQualityPreset(RenderPipelineSettings settings, int level) { // RTR - if (HDRenderPipeline.buildPipelineSupportsRayTracing && m_Tracing.overrideState.boolValue && + if (HDRenderPipeline.assetSupportsRayTracing && m_Tracing.overrideState.boolValue && m_Tracing.value.GetEnumValue() != RayCastingMode.RayMarching) { CopySetting(ref m_MinSmoothness, settings.lightingQualitySettings.RTRMinSmoothness[level]); @@ -324,17 +324,17 @@ public override void LoadSettingsFromQualityPreset(RenderPipelineSettings settin public override bool QualityEnabled() { // Quality always used for SSR - if (!HDRenderPipeline.buildTargetSupportsRayTracing || m_Tracing.value.GetEnumValue() == RayCastingMode.RayMarching) + if (!HDRenderPipeline.assetSupportsRayTracing || m_Tracing.value.GetEnumValue() == RayCastingMode.RayMarching) return true; // Handle the quality usage for RTR HDRenderPipelineAsset currentAsset = HDRenderPipeline.currentAsset; - // Define if the asset supports Peformance or Both Mode (Quality && Performance) + // Define if the asset supports Performance or Both Mode (Quality && Performance) bool assetSupportsPerf = currentAsset.currentPlatformRenderPipelineSettings.supportedRayTracingMode == RenderPipelineSettings.SupportedRayTracingMode.Performance; bool assetSupportsBoth = currentAsset.currentPlatformRenderPipelineSettings.supportedRayTracingMode == RenderPipelineSettings.SupportedRayTracingMode.Both; - // Define if the volume is in Peformance or Mixed Mode + // Define if the volume is in Performance or Mixed Mode bool volumeIsInPerfOrMixed = (m_Tracing.value.GetEnumValue() == RayCastingMode.RayTracing && m_Mode.value.GetEnumValue() == RayTracingMode.Performance) || (m_Tracing.value.GetEnumValue() == RayCastingMode.Mixed); 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 03648bdd680..17213694b75 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 cf9d9846e3e..7fc075a675d 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 @@ -176,12 +176,12 @@ public override void OnInspectorGUI() EditorGUILayout.Space(); // If ray tracing is supported display the content of the volume component - if (HDRenderPipeline.buildPipelineSupportsRayTracing) + if (HDRenderPipeline.assetSupportsRayTracing) PropertyField(m_Tracing); // Flag to track if the ray tracing parameters were displayed RayCastingMode tracingMode = m_Tracing.value.GetEnumValue(); - bool rayTracingSettingsDisplayed = HDRenderPipeline.buildPipelineSupportsRayTracing + bool rayTracingSettingsDisplayed = HDRenderPipeline.assetSupportsRayTracing && m_Tracing.overrideState.boolValue && tracingMode != RayCastingMode.RayMarching; @@ -283,7 +283,7 @@ public override QualitySettingsBlob SaveCustomQualitySettingsAsObject(QualitySet public override void LoadSettingsFromObject(QualitySettingsBlob settings) { - if (HDRenderPipeline.buildPipelineSupportsRayTracing && m_Tracing.overrideState.boolValue && + if (HDRenderPipeline.assetSupportsRayTracing && m_Tracing.overrideState.boolValue && m_Tracing.value.GetEnumValue() != RayCastingMode.RayMarching) { // RTGI @@ -309,7 +309,7 @@ public override void LoadSettingsFromObject(QualitySettingsBlob settings) public override void LoadSettingsFromQualityPreset(RenderPipelineSettings settings, int level) { - if (HDRenderPipeline.buildPipelineSupportsRayTracing && m_Tracing.overrideState.boolValue && + if (HDRenderPipeline.assetSupportsRayTracing && m_Tracing.overrideState.boolValue && m_Tracing.value.GetEnumValue() != RayCastingMode.RayMarching) { // RTGI @@ -336,7 +336,7 @@ public override void LoadSettingsFromQualityPreset(RenderPipelineSettings settin public override bool QualityEnabled() { // Quality always used for SSGI - if (!HDRenderPipeline.buildTargetSupportsRayTracing || m_Tracing.value.GetEnumValue() == RayCastingMode.RayMarching) + if (!HDRenderPipeline.assetSupportsRayTracing || m_Tracing.value.GetEnumValue() == RayCastingMode.RayMarching) 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 30676d85147..d84fbbea6f8 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 @@ -43,7 +43,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 8671dc2de6e..ea716ad0ece 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -47,7 +47,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 4a051a78d39..3a16771b902 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 @@ -709,13 +709,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()