Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ PlayerSettings:
- m_BuildTarget: WebGL
m_StaticBatching: 0
m_DynamicBatching: 0
- m_BuildTarget: PS5
m_StaticBatching: 0
m_DynamicBatching: 0
m_BuildTargetGraphicsJobs:
- m_BuildTarget: MacStandaloneSupport
m_GraphicsJobs: 0
Expand Down Expand Up @@ -600,6 +603,7 @@ PlayerSettings:
webGLDecompressionFallback: 0
scriptingDefineSymbols:
1: UNITY_HDRP_DXR_TESTS_DEFINE;ENABLE_RAYTRACING
33: UNITY_HDRP_DXR_TESTS_DEFINE;ENABLE_RAYTRACING;NO_RAY_RECURSION
additionalCompilerArguments: {}
platformArchitecture: {}
scriptingBackend: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class AmbientOcclusionEditor : VolumeComponentWithQualityEditor
SerializedDataParameter m_Denoise;
SerializedDataParameter m_DenoiserRadius;

public override bool hasAdvancedMode => (m_RayTracing == null || !(HDRenderPipeline.pipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue));
public override bool hasAdvancedMode => (m_RayTracing == null || !(HDRenderPipeline.buildPipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue));

public override void OnEnable()
{
Expand Down Expand Up @@ -72,15 +72,15 @@ public override void OnInspectorGUI()
return;
}

if (HDRenderPipeline.pipelineSupportsRayTracing)
if (HDRenderPipeline.buildPipelineSupportsRayTracing)
PropertyField(m_RayTracing, EditorGUIUtility.TrTextContent("Ray Tracing (Preview)", "Enable ray traced ambient occlusion."));

// Shared attributes
PropertyField(m_Intensity, EditorGUIUtility.TrTextContent("Intensity", "Controls the strength of the ambient occlusion effect. Increase this value to produce darker areas."));
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.pipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue)
if (HDRenderPipeline.buildPipelineSupportsRayTracing && 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ static void DrawShadowMapContent(SerializedHDLight serialized, Editor owner)
EditorGUILayout.Slider(serialized.areaLightShadowCone, HDAdditionalLightData.k_MinAreaLightShadowCone, HDAdditionalLightData.k_MaxAreaLightShadowCone, s_Styles.areaLightShadowCone);
}

if (HDRenderPipeline.pipelineSupportsRayTracing && HDRenderPipeline.pipelineSupportsScreenSpaceShadows)
if (HDRenderPipeline.buildPipelineSupportsRayTracing && HDRenderPipeline.pipelineSupportsScreenSpaceShadows)
{
bool isPunctual = lightType == HDLightType.Point || (lightType == HDLightType.Spot && serialized.spotLightShape.GetEnumValue<SpotLightShape>() == SpotLightShape.Cone);
if (isPunctual || (lightType == HDLightType.Area && serialized.areaLightShape == AreaLightShape.Rectangle))
Expand Down Expand Up @@ -1137,7 +1137,7 @@ static void DrawShadowMapContent(SerializedHDLight serialized, Editor owner)
if (lightType == HDLightType.Directional && HDRenderPipeline.pipelineSupportsScreenSpaceShadows)
{
EditorGUILayout.PropertyField(serialized.useScreenSpaceShadows, s_Styles.useScreenSpaceShadows);
if (HDRenderPipeline.pipelineSupportsRayTracing)
if (HDRenderPipeline.buildPipelineSupportsRayTracing)
{
using (new EditorGUI.DisabledScope(!serialized.useScreenSpaceShadows.boolValue))
{
Expand Down Expand Up @@ -1248,7 +1248,7 @@ static void DrawContactShadowsContent(SerializedHDLight serialized, Editor owner
HDAdditionalLightData.ScalableSettings.UseContactShadow(hdrp),
hdrp.name
);
if (HDRenderPipeline.pipelineSupportsRayTracing
if (HDRenderPipeline.buildPipelineSupportsRayTracing
&& serialized.contactShadows.@override.boolValue)
{
EditorGUI.indentLevel++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,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.pipelineSupportsRayTracing;
bool rayTracingSupported = HDRenderPipeline.buildPipelineSupportsRayTracing;
if (rayTracingSupported)
PropertyField(m_RayTracing, k_RayTracingText);

Expand Down Expand Up @@ -231,7 +231,7 @@ public override QualitySettingsBlob SaveCustomQualitySettingsAsObject(QualitySet
settings = new QualitySettingsBlob();

// RTR
if (HDRenderPipeline.pipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue &&
if (HDRenderPipeline.buildPipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue &&
m_RayTracing.value.boolValue)
{
settings.Save<float>(m_MinSmoothness);
Expand All @@ -253,7 +253,7 @@ public override QualitySettingsBlob SaveCustomQualitySettingsAsObject(QualitySet
public override void LoadSettingsFromObject(QualitySettingsBlob settings)
{
// RTR
if (HDRenderPipeline.pipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue &&
if (HDRenderPipeline.buildPipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue &&
m_RayTracing.value.boolValue)
{
settings.TryLoad<float>(ref m_MinSmoothness);
Expand All @@ -273,7 +273,7 @@ public override void LoadSettingsFromObject(QualitySettingsBlob settings)
public override void LoadSettingsFromQualityPreset(RenderPipelineSettings settings, int level)
{
// RTR
if (HDRenderPipeline.pipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue &&
if (HDRenderPipeline.buildPipelineSupportsRayTracing && m_RayTracing.overrideState.boolValue &&
m_RayTracing.value.boolValue)
{
CopySetting(ref m_MinSmoothness, settings.lightingQualitySettings.RTRMinSmoothness[level]);
Expand All @@ -293,7 +293,7 @@ public override void LoadSettingsFromQualityPreset(RenderPipelineSettings settin
public override bool QualityEnabled()
{
// Quality always used for SSR
if (!HDRenderPipeline.rayTracingSupportedBySystem || !m_RayTracing.value.boolValue)
if (!HDRenderPipeline.buildTargetSupportsRayTracing || !m_RayTracing.value.boolValue)
return true;

// Handle the quality usage for RTGI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ static class CorePragmas
{
{ Pragma.Target(ShaderModel.Target50) },
{ Pragma.Raytracing("surface_shader") },
{ Pragma.OnlyRenderers(new Platform[] {Platform.D3D11}) },
{ Pragma.OnlyRenderers(new Platform[] {Platform.D3D11, Platform.PS5}) },
};
}
#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,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 rayTracingRestrictionOnlyWarning = EditorGUIUtility.TrTextContent("Ray tracing is currently only supported on DX12 and Playstation 5.");
public static readonly GUIContent rayTracingMSAAUnsupported = EditorGUIUtility.TrTextContent("When Ray tracing is enabled in asset, MSAA is not supported. Please refer to the documentation.");
public static readonly GUIContent maximumLODLevel = EditorGUIUtility.TrTextContent("Maximum LOD Level");
public static readonly GUIContent LODBias = EditorGUIUtility.TrTextContent("LOD Bias");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -963,16 +963,14 @@ static void Drawer_SectionRenderingUnsorted(SerializedHDRenderPipelineAsset seri
{
++EditorGUI.indentLevel;
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportedRayTracingMode, Styles.supportedRayTracingMode);
if (serialized.renderPipelineSettings.supportRayTracing.boolValue && !UnityEngine.SystemInfo.supportsRayTracing)

// If ray tracing is enabled by the asset but the current system does not support it display a warning
if (!HDRenderPipeline.currentSystemSupportsRayTracing)
{
if (PlayerSettings.GetGraphicsAPIs(EditorUserBuildSettings.activeBuildTarget)[0] != GraphicsDeviceType.Direct3D12)
{
EditorGUILayout.HelpBox(Styles.rayTracingDX12OnlyWarning.text, MessageType.Warning, wide: true);
}
if (serialized.renderPipelineSettings.supportRayTracing.boolValue)
EditorGUILayout.HelpBox(Styles.rayTracingRestrictionOnlyWarning.text, MessageType.Warning, wide: true);
else
{
EditorGUILayout.HelpBox(Styles.rayTracingUnsupportedWarning.text, MessageType.Warning, wide: true);
}
}
--EditorGUI.indentLevel;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public override void OnInspectorGUI()
}

// If ray tracing is supported display the content of the volume component
if (HDRenderPipeline.pipelineSupportsRayTracing)
if (HDRenderPipeline.buildPipelineSupportsRayTracing)
{
PropertyField(m_Enable);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public override void OnInspectorGUI()
PropertyField(m_Enable);

// If ray tracing is supported display the content of the volume component
if (HDRenderPipeline.pipelineSupportsRayTracing)
if (HDRenderPipeline.buildPipelineSupportsRayTracing )
{
PropertyField(m_RayTracing, EditorGUIUtility.TrTextContent("Ray Tracing (Preview)", "Enable ray traced global illumination."));
}
Expand All @@ -114,7 +114,7 @@ public override void OnInspectorGUI()

using (new HDEditorUtils.IndentScope())
{
if (HDRenderPipeline.pipelineSupportsRayTracing)
if (HDRenderPipeline.buildPipelineSupportsRayTracing )
{
if (m_RayTracing.overrideState.boolValue && m_RayTracing.value.boolValue)
{
Expand Down Expand Up @@ -269,7 +269,7 @@ public override void LoadSettingsFromQualityPreset(RenderPipelineSettings settin
public override bool QualityEnabled()
{
// Quality always used for SSGI
if (!HDRenderPipeline.rayTracingSupportedBySystem || !m_RayTracing.value.boolValue)
if (!HDRenderPipeline.buildTargetSupportsRayTracing || !m_RayTracing.value.boolValue)
return true;

// Handle the quality usage for RTGI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public override void OnInspectorGUI()
}

// If ray tracing is supported display the content of the volume component
if (HDRenderPipeline.pipelineSupportsRayTracing)
if (HDRenderPipeline.buildPipelineSupportsRayTracing)
{
PropertyField(m_Enable);

Expand Down
Loading