diff --git a/TestProjects/UniversalGraphicsTest/ProjectSettings/ProjectSettings.asset b/TestProjects/UniversalGraphicsTest/ProjectSettings/ProjectSettings.asset index a39bb7047ce..4684b0af264 100644 --- a/TestProjects/UniversalGraphicsTest/ProjectSettings/ProjectSettings.asset +++ b/TestProjects/UniversalGraphicsTest/ProjectSettings/ProjectSettings.asset @@ -565,20 +565,20 @@ PlayerSettings: webGLThreadsSupport: 0 webGLDecompressionFallback: 0 scriptingDefineSymbols: - 1: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 4: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 7: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 13: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 14: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 18: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 19: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 21: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 23: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 25: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 26: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 27: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 28: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS - 29: LWRP_DEBUG_STATIC_POSTFX;ENABLE_POINT_LIGHT_SHADOWS + 1: LWRP_DEBUG_STATIC_POSTFX + 4: LWRP_DEBUG_STATIC_POSTFX + 7: LWRP_DEBUG_STATIC_POSTFX + 13: LWRP_DEBUG_STATIC_POSTFX + 14: LWRP_DEBUG_STATIC_POSTFX + 18: LWRP_DEBUG_STATIC_POSTFX + 19: LWRP_DEBUG_STATIC_POSTFX + 21: LWRP_DEBUG_STATIC_POSTFX + 23: LWRP_DEBUG_STATIC_POSTFX + 25: LWRP_DEBUG_STATIC_POSTFX + 26: LWRP_DEBUG_STATIC_POSTFX + 27: LWRP_DEBUG_STATIC_POSTFX + 28: LWRP_DEBUG_STATIC_POSTFX + 29: LWRP_DEBUG_STATIC_POSTFX platformArchitecture: {} scriptingBackend: {} il2cppCompilerConfiguration: {} diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index 4cc5101cdc4..14b35d45802 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [12.0.0] - 202x-xx-xx +### Added +- Added real-time Point Light Shadows. + ## [11.0.0] - 2020-10-21 ### Added - Added a supported MSAA samples count check, so the actual supported MSAA samples count value can be assigned to RenderTexture descriptors. diff --git a/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineLightEditor.cs b/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineLightEditor.cs index 63a7ed39bbc..af3125d9fbc 100644 --- a/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineLightEditor.cs +++ b/com.unity.render-pipelines.universal/Editor/UniversalRenderPipelineLightEditor.cs @@ -27,19 +27,12 @@ class Styles public readonly GUIContent DisabledLightWarning = EditorGUIUtility.TrTextContent("Lighting has been disabled in at least one Scene view. Any changes applied to lights in the Scene will not be updated in these views until Lighting has been enabled again."); public readonly GUIContent SunSourceWarning = EditorGUIUtility.TrTextContent("This light is set as the current Sun Source, which requires a directional light. Go to the Lighting Window's Environment settings to edit the Sun Source."); -#if ENABLE_POINT_LIGHT_SHADOWS -#else - // Temporarily disable Point Light Shadows until feature OK from Product perspective - public readonly GUIContent ShadowsNotSupportedWarning = EditorGUIUtility.TrTextContent("Realtime shadows for point lights are not supported. Either disable shadows or set the light mode to Baked."); -#endif - public static readonly GUIContent ShadowRealtimeSettings = EditorGUIUtility.TrTextContent("Realtime Shadows", "Settings for realtime direct shadows."); public static readonly GUIContent ShadowStrength = EditorGUIUtility.TrTextContent("Strength", "Controls how dark the shadows cast by the light will be."); public static readonly GUIContent ShadowNearPlane = EditorGUIUtility.TrTextContent("Near Plane", "Controls the value for the near clip plane when rendering shadows. Currently clamped to 0.1 units or 1% of the lights range property, whichever is lower."); public static readonly GUIContent ShadowNormalBias = EditorGUIUtility.TrTextContent("Normal", "Controls the distance shadow caster vertices are offset along their normals when rendering shadow maps. Currently ignored for Point Lights."); public static GUIContent shadowBias = EditorGUIUtility.TrTextContent("Bias", "Select if the Bias should use the settings from the Pipeline Asset or Custom settings."); - public static int[] optionDefaultValues = { 0, 1 }; public static GUIContent[] displayedDefaultOptions = @@ -62,13 +55,7 @@ class Styles public bool areaOptionsValue { get { return typeIsSame && (lightProperty.type == LightType.Rectangle || lightProperty.type == LightType.Disc); } } // Area light shadows not supported -#if ENABLE_POINT_LIGHT_SHADOWS public bool runtimeOptionsValue { get { return typeIsSame && (lightProperty.type != LightType.Rectangle && !settings.isCompletelyBaked); } } -#else - // Temporarily disable Point Light Shadows until feature OK from Product perspective - public bool runtimeOptionsValue { get { return typeIsSame && (lightProperty.type != LightType.Rectangle && lightProperty.type != LightType.Point && !settings.isCompletelyBaked); } } -#endif - public bool bakedShadowRadius { get { return typeIsSame && (lightProperty.type == LightType.Point || lightProperty.type == LightType.Spot) && settings.isBakedOrMixed; } } public bool bakedShadowAngle { get { return typeIsSame && lightProperty.type == LightType.Directional && settings.isBakedOrMixed; } } public bool shadowOptionsValue { get { return shadowTypeIsSame && lightProperty.shadows != LightShadows.None; } } @@ -79,20 +66,6 @@ class Styles public bool isShadowEnabled { get { return settings.shadowsType.intValue != 0; } } -#if ENABLE_POINT_LIGHT_SHADOWS -#else - // Temporarily disable Point Light Shadows until feature OK from Product perspective - public bool realtimeShadowsWarningValue - { - get - { - return typeIsSame && lightProperty.type == LightType.Point && - shadowTypeIsSame && isShadowEnabled && - lightmappingTypeIsSame && !settings.isCompletelyBaked; - } - } -#endif - UniversalAdditionalLightData m_AdditionalLightData; SerializedObject m_AdditionalLightDataSO; @@ -141,11 +114,11 @@ public override void OnInspectorGUI() // we want the fade group to stay hidden. using (var group = new EditorGUILayout.FadeGroupScope(1.0f - m_AnimDirOptions.faded)) if (group.visible) -#if UNITY_2020_1_OR_NEWER + #if UNITY_2020_1_OR_NEWER settings.DrawRange(); -#else + #else settings.DrawRange(m_AnimAreaOptions.target); -#endif + #endif // Spot angle using (var group = new EditorGUILayout.FadeGroupScope(m_AnimSpotOptions.faded)) @@ -339,13 +312,6 @@ void ShadowsGUI() if (bakingWarningValue) EditorGUILayout.HelpBox(s_Styles.BakingWarning.text, MessageType.Warning); -#if ENABLE_POINT_LIGHT_SHADOWS -#else - // Temporarily disable Point Light Shadows until feature is OK from Product perspective - if (realtimeShadowsWarningValue) - EditorGUILayout.HelpBox(s_Styles.ShadowsNotSupportedWarning.text, MessageType.Warning); -#endif - EditorGUILayout.Space(); } diff --git a/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs b/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs index ca9f04ddf4d..56ddee73d9f 100644 --- a/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs +++ b/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs @@ -582,13 +582,6 @@ bool IsValidShadowCastingLight(ref LightData lightData, int i) if (shadowLight.lightType == LightType.Directional) return false; -#if ENABLE_POINT_LIGHT_SHADOWS -#else - // Temporarily disable Point Light Shadows until feature is OK from Product perspective - if (shadowLight.lightType == LightType.Point) - return false; -#endif - Light light = shadowLight.light; return light != null && light.shadows != LightShadows.None && !Mathf.Approximately(light.shadowStrength, 0.0f); } diff --git a/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs b/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs index 94c2347de1b..276a73749a2 100644 --- a/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs +++ b/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs @@ -872,12 +872,7 @@ static void InitializeRenderingData(UniversalRenderPipelineAsset settings, ref C Light light = visibleLights[i].light; // UniversalRP doesn't support additional directional light shadows yet -#if ENABLE_POINT_LIGHT_SHADOWS if ((visibleLights[i].lightType == LightType.Spot || visibleLights[i].lightType == LightType.Point) && light != null && light.shadows != LightShadows.None) -#else - // Temporarily disable Point Light Shadows until feature OK from Product perspective - if ((visibleLights[i].lightType == LightType.Spot /*|| visibleLights[i].lightType == LightType.Point*/) && light != null && light.shadows != LightShadows.None) -#endif { additionalLightsCastShadows = true; break;