diff --git a/Packages/com.unity.render-pipelines.core/.buginfo b/Packages/com.unity.render-pipelines.core/.buginfo index 9074ad17503..c567d7cad5e 100644 --- a/Packages/com.unity.render-pipelines.core/.buginfo +++ b/Packages/com.unity.render-pipelines.core/.buginfo @@ -1,5 +1,5 @@ rule1: - area: SRP Architecture & API + area: SRP Foundation rule2: when: diff --git a/Packages/com.unity.render-pipelines.core/Documentation~/Images/srp-vrs-example.jpg b/Packages/com.unity.render-pipelines.core/Documentation~/Images/srp-vrs-example.jpg new file mode 100644 index 00000000000..bc51e43de44 Binary files /dev/null and b/Packages/com.unity.render-pipelines.core/Documentation~/Images/srp-vrs-example.jpg differ diff --git a/Packages/com.unity.render-pipelines.core/Documentation~/Rendering-Debugger.md b/Packages/com.unity.render-pipelines.core/Documentation~/Rendering-Debugger.md index 5d041d9ec3c..988b773307f 100644 --- a/Packages/com.unity.render-pipelines.core/Documentation~/Rendering-Debugger.md +++ b/Packages/com.unity.render-pipelines.core/Documentation~/Rendering-Debugger.md @@ -6,7 +6,7 @@ If your project uses a custom Scriptable Render Pipeline (SRP), you can add cont If your project uses the Universal Render Pipeline (URP) or the High-Definition Render Pipeline (HDRP), refer to the following pages: -- [Add controls to the Rendering Debugger in URP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@15.0/manual/features/rendering-debugger-add-controls.html) +- [Add controls to the Rendering Debugger in URP](https://docs.unity3d.com/Manual/urp/features/rendering-debugger-add-controls.html) - [Add controls to the Rendering Debugger in HDRP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@15.0/manual/Rendering-Debugger-Add-Controls.html) ## How to access the Rendering Debugger diff --git a/Packages/com.unity.render-pipelines.core/Documentation~/TableOfContents.md b/Packages/com.unity.render-pipelines.core/Documentation~/TableOfContents.md index 172b72b8a8c..ebb1e28fd88 100644 --- a/Packages/com.unity.render-pipelines.core/Documentation~/TableOfContents.md +++ b/Packages/com.unity.render-pipelines.core/Documentation~/TableOfContents.md @@ -2,6 +2,7 @@ * [What's new](whats-new.md) * [12](whats-new-12.md) * [13](whats-new-13.md) + * [17](whats-new-17.md) * [Creating a custom render pipeline](srp-custom.md) * [Create a custom Scriptable Render Pipeline](srp-custom-getting-started.md) * [Create a Render Pipeline Asset and Render Pipeline Instance in a custom render pipeline](srp-creating-render-pipeline-asset-and-render-pipeline-instance.md) diff --git a/Packages/com.unity.render-pipelines.core/Documentation~/User-Render-Requests.md b/Packages/com.unity.render-pipelines.core/Documentation~/User-Render-Requests.md index e322283530f..fbad4c18bef 100644 --- a/Packages/com.unity.render-pipelines.core/Documentation~/User-Render-Requests.md +++ b/Packages/com.unity.render-pipelines.core/Documentation~/User-Render-Requests.md @@ -8,7 +8,7 @@ The request is processed sequentially in your script, so there's no callback inv `RenderPipeline.StandardRequest` renders the following: -* A full stack of cameras in the [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html) (URP). +* A full stack of cameras in the [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html) (URP). * A single camera in the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html) (HDRP). The following code sample gets the output of the scriptable render pipeline when you select a GUI button. Attach the script to a camera and select **Enter Play Mode**. @@ -91,4 +91,4 @@ public class StandardRenderRequest : MonoBehaviour ## Other useful information -* On [Universal Render Pipeline (URP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/manual/User-Render-Requests.html). +* On [Universal Render Pipeline (URP)](https://docs.unity3d.com/Manual/urp/User-Render-Requests.html). diff --git a/Packages/com.unity.render-pipelines.core/Documentation~/in-loop-render-requests.md b/Packages/com.unity.render-pipelines.core/Documentation~/in-loop-render-requests.md index 409f3e1da7b..9fd2f01e0db 100644 --- a/Packages/com.unity.render-pipelines.core/Documentation~/in-loop-render-requests.md +++ b/Packages/com.unity.render-pipelines.core/Documentation~/in-loop-render-requests.md @@ -4,7 +4,7 @@ Render from cameras nested inside the render loop of other cameras. Attach the provided script to a GameObject with a Camera component to nest multiple cameras, that are rendering with [RenderPipeline.SubmitRenderRequest](https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Rendering.RenderPipeline.SubmitRenderRequest.html), inside the render loop of other cameras. -**Note**: If your project uses the [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html) (URP), the recommended best practice is to use [UniversalRenderPipeline.SingleCameraRequest](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/api/UnityEngine.Rendering.Universal.UniversalRenderPipeline.SingleCameraRequest.html) instead of [StandardRequest](https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Rendering.RenderPipeline.StandardRequest.html), to make sure you only render the camera provided to the `RenderRequest` API instead of the full stack of cameras. +**Note**: If your project uses the [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html) (URP), the recommended best practice is to use [UniversalRenderPipeline.SingleCameraRequest](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.2/api/UnityEngine.Rendering.Universal.UniversalRenderPipeline.SingleCameraRequest.html) instead of [StandardRequest](https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Rendering.RenderPipeline.StandardRequest.html), to make sure you only render the camera provided to the `RenderRequest` API instead of the full stack of cameras. ## Attach the script to nest diff --git a/Packages/com.unity.render-pipelines.core/Documentation~/index.md b/Packages/com.unity.render-pipelines.core/Documentation~/index.md index d1724a3269f..7a0b3dbefa3 100644 --- a/Packages/com.unity.render-pipelines.core/Documentation~/index.md +++ b/Packages/com.unity.render-pipelines.core/Documentation~/index.md @@ -6,4 +6,4 @@ SRP Core contains reusable code, including boilerplate code for working with pla If you are creating a custom SRP from scratch or customizing a prebuilt SRP, using SRP Core will save you time. -For more information on SRP, including a guide to getting started with a custom SRP, see the [SRP documentation](https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html). For more information on Unity's prebuilt SRPs, see the [Universal Render Pipeline (URP) documentation](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest), or the [High Definition Render Pipeline (HDRP) documentation](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest). +For more information on SRP, including a guide to getting started with a custom SRP, see the [SRP documentation](https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html). For more information on Unity's prebuilt SRPs, see the [Universal Render Pipeline (URP) documentation](https://docs.unity3d.com/Manual/urp/urp-introduction.html), or the [High Definition Render Pipeline (HDRP) documentation](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest). diff --git a/Packages/com.unity.render-pipelines.core/Documentation~/whats-new-17.md b/Packages/com.unity.render-pipelines.core/Documentation~/whats-new-17.md index 901ec893f94..0aee2ac7f4f 100644 --- a/Packages/com.unity.render-pipelines.core/Documentation~/whats-new-17.md +++ b/Packages/com.unity.render-pipelines.core/Documentation~/whats-new-17.md @@ -1,6 +1,22 @@ -# What's new in SRP Core version 17 / Unity 6 +# What's new in SRP Core 17.1 / Unity 6.1 +The following are the new features and improvements added to the SRP Core package 17.1, embedded Unity 6.1. -This page contains an overview of new features, improvements, and issues resolved in version 17 of the Scriptable Render Pipeline (SRP) Core package, embedded in Unity 6. +## Added +### Disable pass merging in the render graph system +Added a render graph debug setting that allows you to temporarily disable pass merging to isolate issues or investigate performance changes. + +### New variable rate shading (VRS) API +You can use the new variable rate shading (VRS) API to control the shading rate of Scriptable Renderer Features, and balance between GPU performance and image quality. This API is supported on DirectX 12, Vulkan, and compatible consoles. + +VRS is also known as fragment shading rate, and is a technique which allows you to decouple the rasterization and pixel shading rate. VRS can vary the shading rate across the screen space by using a shading rate image, which encodes the shading rates for different regions of the screen at different rates. When setting a lower shading rate, the pixel shader will execute at a lower frequency, which can drastically improve GPU performance. + +![A scene with a shading rate image (SRI) in the corner. The blue and red areas represent the different shading rates of the UI and the game visuals.](Images/srp-vrs-example.jpg) + +For more information about VRS, refer to the [Optimize Renderer Features with Variable Rate Shading in Unity 6.1](https://discussions.unity.com/t/optimize-renderer-features-with-variable-rate-shading-in-unity-6-1/1605893/1) Unity Discussions page. + +## What's new in SRP Core version 17.0 / Unity 6.0 + +The following is an overview of new features, improvements, and issues resolved in version 17 of the Scriptable Render Pipeline (SRP) Core package, embedded in Unity 6. ## Improvements diff --git a/Packages/com.unity.render-pipelines.core/Editor/.buginfo b/Packages/com.unity.render-pipelines.core/Editor/.buginfo index 4e2adcc5b61..5154420c7c2 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Editor/.buginfo @@ -1,5 +1,5 @@ rule1: - area: SRP Architecture & API + area: SRP Foundation rule2: when: @@ -10,15 +10,20 @@ rule2: rule3: when: path: - - ^.*Camera.*$ - ^.*ContextualMenuDispatcher.*$ - ^.*CoreRenderPipelinePreferences.*$ - ^.*InspectorCurveEditor.*$ - ^.*RemoveAdditionalDataUtils.*$ - area: SRP Workflow - + area: SRP Settings + rule4: when: path: - ^.*Upgrader.*$ - area: Graphics Tools \ No newline at end of file + area: Graphics Tools + +rule5: + when: + path: + - ^.*CameraEditorUtils.*$ + area: Camera \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Editor/Camera/.buginfo b/Packages/com.unity.render-pipelines.core/Editor/Camera/.buginfo index 716a23b6629..74caee799c0 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Camera/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Editor/Camera/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: Camera \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Editor/Debugging/.buginfo b/Packages/com.unity.render-pipelines.core/Editor/Debugging/.buginfo index a8e3ae67ae4..272688b1879 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Debugging/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Editor/Debugging/.buginfo @@ -1 +1 @@ -area: Graphics Tools \ No newline at end of file +area: Graphics Debugging Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugState.cs b/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugState.cs index 7ef2035d97e..cbd40f64e0f 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugState.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugState.cs @@ -237,9 +237,15 @@ public override void SetValue(object value, DebugUI.IValueField field) /// /// Unsigned Integer Debug State. /// - [Serializable, DebugState(typeof(DebugUI.UIntField), typeof(DebugUI.MaskField))] + [Serializable, DebugState(typeof(DebugUI.UIntField))] public sealed class DebugStateUInt : DebugState { } + /// + /// Rendering layer mask state. + /// + [Serializable, DebugState(typeof(DebugUI.RenderingLayerField))] + public sealed class DebugStateRenderingLayer : DebugState { } + /// /// Float Debug State. /// diff --git a/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugUIDrawer.Builtins.cs b/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugUIDrawer.Builtins.cs index 1ebe3a30e37..6c31172a55e 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugUIDrawer.Builtins.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugUIDrawer.Builtins.cs @@ -424,12 +424,11 @@ protected override Enum DoGUI(Rect rect, GUIContent label, DebugUI.BitField fiel } } - /// /// Builtin Drawer for Maskfield Debug Items. /// - [DebugUIDrawer(typeof(DebugUI.MaskField))] - public sealed class DebugUIDrawerMaskField : DebugUIFieldDrawer + [DebugUIDrawer(typeof(DebugUI.RenderingLayerField))] + public sealed class DebugUIDrawerRenderingLayerField : DebugUIFieldDrawer { /// /// Does the field of the given type @@ -439,15 +438,10 @@ public sealed class DebugUIDrawerMaskField : DebugUIFieldDrawerThe field /// The state /// The current value from the UI - protected override uint DoGUI(Rect rect, GUIContent label, DebugUI.MaskField field, DebugStateUInt state) + protected override RenderingLayerMask DoGUI(Rect rect, GUIContent label, DebugUI.RenderingLayerField field, DebugStateRenderingLayer state) { uint value = field.GetValue(); - - var enumNames = new string[field.enumNames.Length]; - for (int i = 0; i < enumNames.Length; i++) - enumNames[i] = field.enumNames[i].text; - var mask = EditorGUI.MaskField(rect, label, (int)value, enumNames); - + var mask = EditorGUI.MaskField(rect, label, (int)value, field.renderingLayersNames); return (uint)mask; } } @@ -859,7 +853,7 @@ public override bool OnGUI(DebugUI.Widget widget, DebugState state) bool isAlternate = r % 2 == 0; - EditorGUI.LabelField(rowRect, GUIContent.none, EditorGUIUtility.TrTextContent(row.displayName),isAlternate ? DebugWindow.Styles.centeredLeft : DebugWindow.Styles.centeredLeftAlternate); + EditorGUI.LabelField(rowRect, GUIContent.none, EditorGUIUtility.TrTextContent(row.displayName), isAlternate ? DebugWindow.Styles.centeredLeft : DebugWindow.Styles.centeredLeftAlternate); rowRect.xMin -= 2; rowRect.xMax += 2; diff --git a/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugUIHandlerCanvasEditor.cs b/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugUIHandlerCanvasEditor.cs index 5e2c2b21ec4..dc3b0b25685 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugUIHandlerCanvasEditor.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugUIHandlerCanvasEditor.cs @@ -60,7 +60,7 @@ void OnEnable() { var prefab = list.serializedProperty.GetArrayElementAtIndex(list.index).FindPropertyRelative("prefab").objectReferenceValue as GameObject; if (prefab) - EditorGUIUtility.PingObject(prefab.gameObject); + EditorGUIUtility.PingObject(prefab); } }; } diff --git a/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugWindow.cs b/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugWindow.cs index b2f470f40c4..be733338d7c 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugWindow.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugWindow.cs @@ -43,7 +43,7 @@ void OnEnable() hideFlags = HideFlags.HideAndDontSave; } } - + [CoreRPHelpURL("Rendering-Debugger")] sealed class DebugWindow : EditorWindowWithHelpButton, IHasCustomMenu { @@ -271,17 +271,17 @@ DebugState GetOrCreateDebugStateForValueField(DebugUI.Widget widget) if (widget is not DebugUI.IValueField valueField) return null; - string guid = widget.queryPath; - if (!m_WidgetStates.TryGetValue(guid, out var state) || state == null) + string queryPath = widget.queryPath; + if (!m_WidgetStates.TryGetValue(queryPath, out var state) || state == null) { var widgetType = widget.GetType(); if (s_WidgetStateMap.TryGetValue(widgetType, out Type stateType)) { Assert.IsNotNull(stateType); state = (DebugState)CreateInstance(stateType); - state.queryPath = guid; + state.queryPath = queryPath; state.SetValue(valueField.GetValue(), valueField); - m_WidgetStates[guid] = state; + m_WidgetStates[queryPath] = state; } } @@ -312,15 +312,20 @@ void UpdateWidgetStates(DebugUI.IContainer container) public void ApplyStates(bool forceApplyAll = false) { + // If we are in playmode, and the runtime UI is shown, avoid that the editor UI + // applies the data of the internal debug states, as they are not kept in sync + if (Application.isPlaying && DebugManager.instance.displayRuntimeUI) + return; + if (!forceApplyAll && DebugState.m_CurrentDirtyState != null) { ApplyState(DebugState.m_CurrentDirtyState.queryPath, DebugState.m_CurrentDirtyState); - DebugState.m_CurrentDirtyState = null; - return; } - - foreach (var state in m_WidgetStates) - ApplyState(state.Key, state.Value); + else + { + foreach (var state in m_WidgetStates) + ApplyState(state.Key, state.Value); + } DebugState.m_CurrentDirtyState = null; } @@ -382,6 +387,8 @@ void Update() UpdateWidgetStates(); ApplyStates(); m_IsDirty = false; + + Repaint(); } } @@ -488,22 +495,22 @@ void OnGUI() using (new EditorGUILayout.VerticalScope()) { var selectedPanel = panels[m_Settings.selectedPanel]; - + using (new EditorGUILayout.HorizontalScope()) { var style = new GUIStyle(CoreEditorStyles.sectionHeaderStyle) { fontStyle = FontStyle.Bold }; EditorGUILayout.LabelField(new GUIContent(selectedPanel.displayName), style); - + // Context menu var rect = GUILayoutUtility.GetLastRect(); var contextMenuRect = new Rect(rect.xMax, rect.y + 4f, 16f, 16f); - + CoreEditorUtils.ShowHelpButton(contextMenuRect, selectedPanel.documentationUrl, new GUIContent($"{selectedPanel.displayName} panel.")); } const float leftMargin = 4f; GUILayout.Space(leftMargin); - + using (var scrollScope = new EditorGUILayout.ScrollViewScope(m_ContentScroll)) { TraverseContainerGUI(selectedPanel); @@ -554,6 +561,12 @@ void OnWidgetGUI(DebugUI.Widget widget) if (widget.isInactiveInEditor || widget.isHidden) return; + if (widget.queryPath == null) + { + Debug.LogError($"Widget {widget.GetType()} query path is null"); + return; + } + GUILayout.Space(4); if (!s_WidgetDrawerMap.TryGetValue(widget.GetType(), out DebugUIDrawer drawer)) diff --git a/Packages/com.unity.render-pipelines.core/Editor/Deprecated.cs b/Packages/com.unity.render-pipelines.core/Editor/Deprecated.cs index e24459166bf..cea5bdd6459 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Deprecated.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/Deprecated.cs @@ -181,4 +181,34 @@ public DefaultVolumeProfileEditor(Editor baseEditor, VolumeProfile profile) m_TargetSerializedObject = baseEditor.serializedObject; } } + + + + /// + /// Builtin Drawer for Maskfield Debug Items. + /// + [DebugUIDrawer(typeof(DebugUI.MaskField))] + [Obsolete("DebugUI.MaskField has been deprecated and is not longer supported, please use BitField instead. #from(6000.2)", false)] + public sealed class DebugUIDrawerMaskField : DebugUIFieldDrawer + { + /// + /// Does the field of the given type + /// + /// The rect to draw the field + /// The label for the field + /// The field + /// The state + /// The current value from the UI + protected override uint DoGUI(Rect rect, GUIContent label, DebugUI.MaskField field, DebugStateUInt state) + { + uint value = field.GetValue(); + + var enumNames = new string[field.enumNames.Length]; + for (int i = 0; i < enumNames.Length; i++) + enumNames[i] = field.enumNames[i].text; + var mask = EditorGUI.MaskField(rect, label, (int)value, enumNames); + + return (uint)mask; + } + } } diff --git a/Packages/com.unity.render-pipelines.core/Editor/Gizmo/.buginfo b/Packages/com.unity.render-pipelines.core/Editor/Gizmo/.buginfo index 716a23b6629..a8e3ae67ae4 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Gizmo/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Editor/Gizmo/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: Graphics Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Editor/Gizmo/HierarchicalSphere.cs b/Packages/com.unity.render-pipelines.core/Editor/Gizmo/HierarchicalSphere.cs index 5aabac07689..f5446f555c3 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Gizmo/HierarchicalSphere.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/Gizmo/HierarchicalSphere.cs @@ -128,7 +128,7 @@ public void DrawHull(bool filled) if (filled) { material.SetPass(0); - Matrix4x4 drawMatrix = Matrix4x4.TRS((Vector3)Handles.matrix.GetColumn(3), Quaternion.identity, Vector3.one * radius * 2f); + Matrix4x4 drawMatrix = Matrix4x4.TRS((Vector3)Handles.matrix.GetColumn(3), Quaternion.identity, 2f * radius * Vector3.one); Graphics.DrawMeshNow(k_MeshSphere, drawMatrix); } diff --git a/Packages/com.unity.render-pipelines.core/Editor/Icons/.buginfo b/Packages/com.unity.render-pipelines.core/Editor/Icons/.buginfo index 716a23b6629..232e4ce2766 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Icons/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Editor/Icons/.buginfo @@ -1 +1,7 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings + +graphic-tools: + when: + path: + - ^.*RenderGraphViewer.*$ + area: Graphics Debugging Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Editor/Icons/RenderGraphViewer/MemorylessTexture@2x.png b/Packages/com.unity.render-pipelines.core/Editor/Icons/RenderGraphViewer/MemorylessTexture@2x.png new file mode 100644 index 00000000000..7368f52d0c8 Binary files /dev/null and b/Packages/com.unity.render-pipelines.core/Editor/Icons/RenderGraphViewer/MemorylessTexture@2x.png differ diff --git a/Packages/com.unity.render-pipelines.core/Editor/Icons/RenderGraphViewer/MemorylessTexture@2x.png.meta b/Packages/com.unity.render-pipelines.core/Editor/Icons/RenderGraphViewer/MemorylessTexture@2x.png.meta new file mode 100644 index 00000000000..dec7a618603 --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Editor/Icons/RenderGraphViewer/MemorylessTexture@2x.png.meta @@ -0,0 +1,156 @@ +fileFormatVersion: 2 +guid: ec3a3173916c141d8962a4466c366be6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: CloudRendering + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: iOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Editor/Icons/RenderGraphViewer/d_MemorylessTexture@2x.png b/Packages/com.unity.render-pipelines.core/Editor/Icons/RenderGraphViewer/d_MemorylessTexture@2x.png new file mode 100644 index 00000000000..61eda112e6f Binary files /dev/null and b/Packages/com.unity.render-pipelines.core/Editor/Icons/RenderGraphViewer/d_MemorylessTexture@2x.png differ diff --git a/Packages/com.unity.render-pipelines.core/Editor/Icons/RenderGraphViewer/d_MemorylessTexture@2x.png.meta b/Packages/com.unity.render-pipelines.core/Editor/Icons/RenderGraphViewer/d_MemorylessTexture@2x.png.meta new file mode 100644 index 00000000000..4a6c4b74da1 --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Editor/Icons/RenderGraphViewer/d_MemorylessTexture@2x.png.meta @@ -0,0 +1,156 @@ +fileFormatVersion: 2 +guid: e813aef83a70543b79d435ef65ec86ee +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: CloudRendering + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: iOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Editor/Lighting/CoreLightEditorUtilities.cs b/Packages/com.unity.render-pipelines.core/Editor/Lighting/CoreLightEditorUtilities.cs index 1feb37ca587..e894846f35f 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Lighting/CoreLightEditorUtilities.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/Lighting/CoreLightEditorUtilities.cs @@ -315,7 +315,7 @@ static void DrawHandleLabel(Vector3 handlePosition, string labelText, float offs var style = new GUIStyle { normal = { background = Texture2D.whiteTexture } }; GUI.color = new Color(0.82f, 0.82f, 0.82f, 1); - labelPosition = handlePosition + Handles.inverseMatrix.MultiplyVector(Vector3.up) * HandleUtility.GetHandleSize(handlePosition) * offsetFromHandle; + labelPosition = handlePosition + HandleUtility.GetHandleSize(handlePosition) * offsetFromHandle * Handles.inverseMatrix.MultiplyVector(Vector3.up); Handles.Label(labelPosition, labelText, style); } diff --git a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.Invalidation.cs b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.Invalidation.cs index 842f2a857b4..ebffb04e428 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.Invalidation.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.Invalidation.cs @@ -61,7 +61,7 @@ static int ReadProbeIndex(int x, int y, int z, int dataWidth, int dataHeight) // TODO: This whole process will need optimization. static bool NeighbourhoodIsEmptySpace(Vector3 pos, float searchDistance, Bounds boundsToCheckAgainst) { - Vector3 halfExtents = Vector3.one * searchDistance * 0.5f; + Vector3 halfExtents = 0.5f * searchDistance * Vector3.one; Vector3 brickCenter = pos + halfExtents; Collider[] colliders = Physics.OverlapBox(brickCenter, halfExtents); diff --git a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeBuildProcessor.cs b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeBuildProcessor.cs index 7e751855587..62805d21890 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeBuildProcessor.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeBuildProcessor.cs @@ -117,6 +117,15 @@ public override void PrepareForBuild(BuildPlayerContext buildPlayerContext) if (!bakingSet.cellSharedDataAsset.IsValid()) // Not baked continue; + // APV doesn't work with WebGL, so let's warn the user. + if (buildPlayerContext.BuildPlayerOptions.target == BuildTarget.WebGL) + { + Debug.LogError( + $"The scene '{scene}' contains baked Adaptive Probe Volumes, but the build target is WebGL. " + + "Adaptive Probe Volumes are not supported when targeting WebGL."); + continue; + } + var bakingSetGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(bakingSet)); var basePath = Path.Combine(tempStreamingAssetsPath, bakingSetGUID); diff --git a/Packages/com.unity.render-pipelines.core/Editor/LookDev/CameraController.cs b/Packages/com.unity.render-pipelines.core/Editor/LookDev/CameraController.cs index a2271c88f3c..c38ea5e3de2 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/LookDev/CameraController.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/LookDev/CameraController.cs @@ -313,7 +313,7 @@ Vector3 GetMotionDirection() m_FlySpeedAccelerated = 9; else m_FlySpeedAccelerated *= Mathf.Pow(k_FlyAcceleration, deltaTime); - result = m_MotionDirection.normalized * m_FlySpeedAccelerated * speed * deltaTime; + result = m_FlySpeedAccelerated * speed * deltaTime * m_MotionDirection.normalized; return result; } diff --git a/Packages/com.unity.render-pipelines.core/Editor/LookDev/CameraState.cs b/Packages/com.unity.render-pipelines.core/Editor/LookDev/CameraState.cs index e813437b9ae..c721b52f4ed 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/LookDev/CameraState.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/LookDev/CameraState.cs @@ -78,8 +78,8 @@ internal Vector3 QuickReprojectionWithFixedFOVOnPivotPlane(Rect screen, Vector2 screenPoint.x * 2f / screen.width - 1f, screenPoint.y * 2f / screen.height - 1f); return pivot - - up * verticalDistance * normalizedScreenPoint.y - - right * verticalDistance * aspect * normalizedScreenPoint.x; + - verticalDistance * normalizedScreenPoint.y * up + - verticalDistance * aspect * normalizedScreenPoint.x * right; } //Pivot is always on center axis by construction @@ -92,8 +92,7 @@ internal Vector3 QuickProjectPivotInScreen(Rect screen) /// The camera to update public void UpdateCamera(Camera camera) { - camera.transform.rotation = rotation; - camera.transform.position = position; + camera.transform.SetPositionAndRotation(position, rotation); camera.nearClipPlane = nearClip; camera.farClipPlane = farClip; camera.fieldOfView = fieldOfView; diff --git a/Packages/com.unity.render-pipelines.core/Editor/LookDev/ComparisonGizmoController.cs b/Packages/com.unity.render-pipelines.core/Editor/LookDev/ComparisonGizmoController.cs index 9d8a9b56ab9..3e59e606fe1 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/LookDev/ComparisonGizmoController.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/LookDev/ComparisonGizmoController.cs @@ -211,7 +211,7 @@ void SelectGizmoZone(Vector2 normalizedMousePosition) if (absDistanceToPlane < ComparisonGizmoState.thicknessSelected) selected = Selected.PlaneSeparator; - Vector2 circleCenter = m_State.center + side * orthoPlaneNormal * m_State.length; + Vector2 circleCenter = m_State.center + m_State.length * side * orthoPlaneNormal; float d = Vector2.Distance(normalizedMousePosition, circleCenter); if (d <= ComparisonGizmoState.circleRadiusSelected) selected = side > 0.0f ? Selected.NodeFirstView : Selected.NodeSecondView; diff --git a/Packages/com.unity.render-pipelines.core/Editor/LookDev/Stage.cs b/Packages/com.unity.render-pipelines.core/Editor/LookDev/Stage.cs index b900ec544d6..35cf5845895 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/LookDev/Stage.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/LookDev/Stage.cs @@ -104,8 +104,7 @@ public void MoveIntoStage(GameObject gameObject, Vector3 position, Quaternion ro return; SceneManager.MoveGameObjectToScene(gameObject, m_PreviewScene); - gameObject.transform.position = position; - gameObject.transform.rotation = rotation; + gameObject.transform.SetPositionAndRotation(position, rotation); if (persistent) m_PersistentGameObjects.Add(gameObject); else @@ -195,16 +194,13 @@ static void InitAddedObjectsRecursively(GameObject go) go.hideFlags = HideFlags.HideAndDontSave; go.layer = k_PreviewCullingLayerIndex; - var meshRenderer = go.GetComponent(); - if (meshRenderer != null) + if (go.TryGetComponent(out var meshRenderer)) meshRenderer.lightProbeUsage = UnityEngine.Rendering.LightProbeUsage.Off; - var skinnedMeshRenderer = go.GetComponent(); - if (skinnedMeshRenderer != null) + if (go.TryGetComponent(out var skinnedMeshRenderer)) skinnedMeshRenderer.lightProbeUsage = UnityEngine.Rendering.LightProbeUsage.Off; - var lineRenderer = go.GetComponent(); - if (lineRenderer != null) + if (go.TryGetComponent(out var lineRenderer)) lineRenderer.lightProbeUsage = UnityEngine.Rendering.LightProbeUsage.Off; var volumes = go.GetComponents(); diff --git a/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/.buginfo b/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/.buginfo index a8e3ae67ae4..272688b1879 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/.buginfo @@ -1 +1 @@ -area: Graphics Tools \ No newline at end of file +area: Graphics Debugging Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.SidePanel.cs b/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.SidePanel.cs index 8ae75375ebe..ef70fe56e88 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.SidePanel.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.SidePanel.cs @@ -18,6 +18,14 @@ public partial class RenderGraphViewer "Compute Pass" }; + static readonly string[] k_PassTypeNamesNotMergedMessage = + { + "This is a Legacy Render Pass. Only Raster Render Passes can be merged.", + "This is an Unsafe Render Pass. Only Raster Render Passes can be merged.", + "Pass merging was disabled.", + "This is a Compute Pass. Only Raster Render Passes can be merged." + }; + static partial class Names { public const string kPanelContainer = "panel-container"; @@ -263,7 +271,7 @@ void PopulateResourceList() var foldoutCheckmark = resourceItem.Q("unity-checkmark"); // Add resource type icon before the label - foldoutCheckmark.parent.Insert(1, CreateResourceTypeIcon(visibleResourceElement.type)); + foldoutCheckmark.parent.Insert(1, CreateResourceTypeIcon(visibleResourceElement.type, resourceData.memoryless)); foldoutCheckmark.parent.Add(iconContainer); foldoutCheckmark.BringToFront(); // Move foldout checkmark to the right @@ -370,8 +378,7 @@ void CreateTextElement(VisualElement parent, string text, string className = nul else { CreateTextElement(passItem, "Pass break reasoning", Classes.kSubHeaderText); - var msg = $"This is a {k_PassTypeNames[(int) firstPassData.type]}. Only Raster Render Passes can be merged."; - msg = msg.Replace("a Unsafe", "an Unsafe"); + string msg = k_PassTypeNamesNotMergedMessage[(int)firstPassData.type]; CreateTextElement(passItem, msg); } diff --git a/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.cs b/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.cs index d6a78d50983..04fbe881e80 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/RenderGraph/RenderGraphViewer.cs @@ -24,6 +24,7 @@ static partial class Names public const string kCurrentExecutionDropdown = "current-execution-dropdown"; public const string kPassFilterField = "pass-filter-field"; public const string kResourceFilterField = "resource-filter-field"; + public const string kViewOptionsField = "view-options-field"; public const string kContentContainer = "content-container"; public const string kMainContainer = "main-container"; public const string kPassList = "pass-list"; @@ -63,6 +64,7 @@ static partial class Classes public const string kResourceIconGlobalLight = "resource-icon--global-light"; public const string kResourceIconFbfetch = "resource-icon--fbfetch"; public const string kResourceIconTexture = "resource-icon--texture"; + public const string kResourceIconMemorylessTexture = "resource-icon--memoryless-texture"; public const string kResourceIconBuffer = "resource-icon--buffer"; public const string kResourceIconAccelerationStructure = "resource-icon--acceleration-structure"; public const string kResourceGridRow = "resource-grid__row"; @@ -77,6 +79,17 @@ static partial class Classes public const string kResourceDependencyBlockReadWrite = "dependency-block-readwrite"; public const string kGridLine = "grid-line"; public const string kGridLineHighlight = "grid-line--highlight"; + public const string kLoadAction = "dependency-block-load-action"; + public const string kLoadActionLoad = "load-action-load"; + public const string kLoadActionClear = "load-action-clear"; + public const string kLoadActionDontCare = "load-action-dont-care"; + public const string kStoreAction = "dependency-block-store-action"; + public const string kStoreActionStore = "store-action-store"; + public const string kStoreActionResolve = "store-action-resolve"; + public const string kStoreActionStoreAndResolve = "store-action-store-resolve"; + public const string kStoreActionDontCare = "store-action-dont-care"; + public const string kLoadActionBorder = "dependency-block-load-action-border"; + public const string kStoreActionBorder = "dependency-block-store-action-border"; } const string k_TemplatePath = "Packages/com.unity.render-pipelines.core/Editor/UXML/RenderGraphViewer.uxml"; @@ -121,6 +134,7 @@ static partial class Classes const string kPassFilterEditorPrefsKey = "RenderGraphViewer.PassFilter"; const string kResourceFilterEditorPrefsKey = "RenderGraphViewer.ResourceFilter"; const string kSelectedExecutionEditorPrefsKey = "RenderGraphViewer.SelectedExecution"; + const string kViewOptionsEditorPrefsKey = "RenderGraphViewer.ViewOptions"; PassFilter m_PassFilter = PassFilter.CulledPasses | PassFilter.RasterPasses | PassFilter.UnsafePasses | PassFilter.ComputePasses; PassFilterLegacy m_PassFilterLegacy = PassFilterLegacy.CulledPasses; @@ -129,6 +143,8 @@ static partial class Classes ResourceFilter.ImportedResources | ResourceFilter.Textures | ResourceFilter.Buffers | ResourceFilter.AccelerationStructures; + ViewOptions m_ViewOptions = 0; + enum EmptyStateReason { None = 0, @@ -151,6 +167,23 @@ enum EmptyStateReason L10n.Tr("No resources to display. Select a different Resource Filter to display contents.") }; + private static readonly string[] kLoadActionNames = + { + "", + L10n.Tr("Load"), + L10n.Tr("Clear"), + L10n.Tr("Don't Care"), + }; + + private static readonly string[] kStoreActionNames = + { + "", + L10n.Tr("Store"), + L10n.Tr("Resolve"), + L10n.Tr("Store and Resolve"), + L10n.Tr("Don't Care"), + }; + static readonly string kOpenInCSharpEditorTooltip = L10n.Tr("Click to open {0} definition in C# editor."); [MenuItem("Window/Analysis/Render Graph Viewer", false, 10006)] @@ -184,6 +217,12 @@ enum ResourceFilter AccelerationStructures = 1 << 3, } + [Flags] + enum ViewOptions + { + LoadStoreActions = 1 << 0, + } + class ResourceElementInfo { public RenderGraphResourceType type; @@ -205,11 +244,31 @@ public enum UsageFlags FramebufferFetch = 1 << 1, } + public enum LoadAction + { + None, + Load, + Clear, + DontCare, + } + + public enum StoreAction + { + None, + Store, + Resolve, + StoreAndResolve, + DontCare, + } + public VisualElement element; public string tooltip; public int visibleResourceIndex; public bool read; public bool write; + public bool memoryless; + public LoadAction load; + public StoreAction store; public UsageFlags usage; public bool HasMultipleUsageFlags() @@ -925,6 +984,13 @@ void OnResourceFilterChanged(ChangeEvent evt) RebuildGraphViewerUI(); } + void OnViewOptionsChanged(ChangeEvent evt) + { + m_ViewOptions = (ViewOptions) evt.newValue; + EditorPrefs.SetInt(kViewOptionsEditorPrefsKey, (int)m_ViewOptions); + RebuildGraphViewerUI(); + } + void RebuildPassFilterUI() { var passFilter = rootVisualElement.Q(Names.kPassFilterField); @@ -953,6 +1019,15 @@ void RebuildResourceFilterUI() resourceFilter.RegisterCallback>(OnResourceFilterChanged); } + void RebuildViewOptionsUI() + { + var viewOptions = rootVisualElement.Q(Names.kViewOptionsField); + viewOptions.style.display = DisplayStyle.Flex; + viewOptions.UnregisterCallback>(OnViewOptionsChanged); + viewOptions.Init(m_ViewOptions); + viewOptions.RegisterCallback>(OnViewOptionsChanged); + } + void RebuildHeaderUI() { RebuildRenderGraphPopup(); @@ -1048,6 +1123,9 @@ bool IsPassVisible(RenderGraph.DebugData.PassData pass) static readonly string[] k_ResourceNames = { "Texture Resource", "Buffer Resource", "Acceleration Structure Resource" }; + static readonly string[] k_MemorylessResourceNames = + { "Memoryless Texture Resource", "Memoryless Buffer Resource", "Memoryless Acceleration Structure Resource" }; + // Pass title ellipsis must be generated manually because it can't be done right for rotated text using uss. void TruncatePassTitle(GeometryChangedEvent evt) @@ -1216,19 +1294,19 @@ VisualElement CreatePassGridLine(int gridLineHeightPx, int offsetPx) return gridline; } - VisualElement CreateResourceTypeIcon(RenderGraphResourceType type) + VisualElement CreateResourceTypeIcon(RenderGraphResourceType type, bool memoryless) { var resourceTypeIcon = new VisualElement(); resourceTypeIcon.AddToClassList(Classes.kResourceIcon); string className = type switch { - RenderGraphResourceType.Texture => Classes.kResourceIconTexture, + RenderGraphResourceType.Texture => memoryless ? Classes.kResourceIconMemorylessTexture : Classes.kResourceIconTexture, RenderGraphResourceType.Buffer => Classes.kResourceIconBuffer, RenderGraphResourceType.AccelerationStructure => Classes.kResourceIconAccelerationStructure, _ => throw new ArgumentOutOfRangeException(nameof(type)) }; resourceTypeIcon.AddToClassList(className); - resourceTypeIcon.tooltip = k_ResourceNames[(int)type]; + resourceTypeIcon.tooltip = memoryless ? k_MemorylessResourceNames[(int)type] : k_ResourceNames[(int)type]; return resourceTypeIcon; } @@ -1238,7 +1316,7 @@ VisualElement CreateResourceListItem(RenderGraph.DebugData.ResourceData res, Ren resourceListItem.AddToClassList(Classes.kResourceListItem); var resourceTitleContainer = new VisualElement(); - resourceTitleContainer.Add(CreateResourceTypeIcon(type)); + resourceTitleContainer.Add(CreateResourceTypeIcon(type, res.memoryless)); var resourceLabel = new Label(); resourceLabel.text = res.name; @@ -1308,6 +1386,22 @@ void CreateRWResourceBlockElement(int offsetPx, ResourceRWBlock block) if (!string.IsNullOrEmpty(accessType)) tooltip += $"{accessType} access to this resource."; + if (block.load != ResourceRWBlock.LoadAction.None) + { + if (tooltip.Length > 0) + tooltip += "
"; + + tooltip += $"Load Action: {kLoadActionNames[(int)block.load]}"; + } + + if (block.store != ResourceRWBlock.StoreAction.None) + { + if (tooltip.Length > 0) + tooltip += "
"; + + tooltip += $"Store Action: {kStoreActionNames[(int)block.store]}"; + } + if (block.usage != ResourceRWBlock.UsageFlags.None) { string resourceIconClassName = string.Empty; @@ -1334,6 +1428,66 @@ void CreateRWResourceBlockElement(int offsetPx, ResourceRWBlock block) tooltip += "
- Read is using framebuffer fetch."; if (block.usage.HasFlag(ResourceRWBlock.UsageFlags.UpdatesGlobalResource)) tooltip += "
- Updates a global resource slot."; + if (block.memoryless) + tooltip += "
- Memory usage is memoryless."; + } + + if (m_ViewOptions.HasFlag(ViewOptions.LoadStoreActions)) + { + if (block.load != ResourceRWBlock.LoadAction.None) + { + var loadActionBorder = new TriangleElement { useStyle = true }; + loadActionBorder.AddToClassList(Classes.kLoadAction); + loadActionBorder.AddToClassList(Classes.kLoadActionBorder); + + var loadAction = new TriangleElement { useStyle = true }; + loadAction.AddToClassList(Classes.kLoadAction); + + switch (block.load) + { + case ResourceRWBlock.LoadAction.Load: + loadAction.AddToClassList(Classes.kLoadActionLoad); + break; + case ResourceRWBlock.LoadAction.Clear: + loadAction.AddToClassList(Classes.kLoadActionClear); + break; + case ResourceRWBlock.LoadAction.DontCare: + loadAction.AddToClassList(Classes.kLoadActionDontCare); + break; + } + + block.element.Add(loadActionBorder); + block.element.Add(loadAction); + } + + if( block.store != ResourceRWBlock.StoreAction.None) + { + var storeActionBorder = new TriangleElement { useStyle = true }; + storeActionBorder.AddToClassList(Classes.kStoreAction); + storeActionBorder.AddToClassList(Classes.kStoreActionBorder); + + var storeAction = new TriangleElement { useStyle = true }; + storeAction.AddToClassList(Classes.kStoreAction); + + switch (block.store) + { + case ResourceRWBlock.StoreAction.Store: + storeAction.AddToClassList(Classes.kStoreActionStore); + break; + case ResourceRWBlock.StoreAction.Resolve: + storeAction.AddToClassList(Classes.kStoreActionResolve); + break; + case ResourceRWBlock.StoreAction.StoreAndResolve: + storeAction.AddToClassList(Classes.kStoreActionStoreAndResolve); + break; + case ResourceRWBlock.StoreAction.DontCare: + storeAction.AddToClassList(Classes.kStoreActionDontCare); + break; + } + + block.element.Add(storeActionBorder); + block.element.Add(storeAction); + } } block.tooltip = tooltip; @@ -1397,20 +1551,97 @@ VisualElement CreateResourceGridRow( foreach (var writePassId in res.producerList) blocks[writePassId].write = true; + var currentResource = m_CurrentDebugData.resourceLists[(int)resourceType][resourceIndex]; + HashSet uniqueRenderPassInfos = new(); + + // Build pass blocks for (int passId = 0; passId < blocks.Count; passId++) { ResourceRWBlock block = blocks[passId]; - if (m_PassIdToVisiblePassIndex.TryGetValue(passId, out int visiblePassIndex)) + var pass = m_CurrentDebugData.passList[passId]; + if (resourceType == RenderGraphResourceType.Texture && pass.nrpInfo != null) + { + if (pass.nrpInfo.textureFBFetchList.Contains(resourceIndex)) + block.usage |= ResourceRWBlock.UsageFlags.FramebufferFetch; + if (pass.nrpInfo.setGlobals.Contains(resourceIndex)) + block.usage |= ResourceRWBlock.UsageFlags.UpdatesGlobalResource; + if (pass.nrpInfo.nativePassInfo != null) + { + uniqueRenderPassInfos.Add(pass.nrpInfo.nativePassInfo); + + foreach (var attachmentInfo in pass.nrpInfo.nativePassInfo.attachmentInfos) + { + if (attachmentInfo.resourceName == currentResource.name) + { + block.memoryless = attachmentInfo.attachment.memoryless; + + block.load = attachmentInfo.attachment.loadAction switch + { + RenderBufferLoadAction.Load => ResourceRWBlock.LoadAction.Load, + RenderBufferLoadAction.Clear => ResourceRWBlock.LoadAction.Clear, + RenderBufferLoadAction.DontCare => ResourceRWBlock.LoadAction.DontCare, + _ => ResourceRWBlock.LoadAction.None + }; + + block.store = attachmentInfo.attachment.storeAction switch + { + RenderBufferStoreAction.Store => ResourceRWBlock.StoreAction.Store, + RenderBufferStoreAction.Resolve => ResourceRWBlock.StoreAction.Resolve, + RenderBufferStoreAction.StoreAndResolve => ResourceRWBlock.StoreAction.StoreAndResolve, + RenderBufferStoreAction.DontCare => ResourceRWBlock.StoreAction.DontCare, + _ => ResourceRWBlock.StoreAction.None, + }; + break; + } + } + } + } + } + + // Adjust blocks to only show first load/store actions for each merged native render pass + foreach (var nrpInfo in uniqueRenderPassInfos) + { + int minLoadPass = int.MaxValue; + int maxStorePass = int.MinValue; + + // Find the first and last load/store pair + foreach (int mergedPassId in nrpInfo.mergedPassIds) + { + var mergedPass = m_CurrentDebugData.passList[mergedPassId]; + foreach (var attachmentInfo in mergedPass.nrpInfo.nativePassInfo.attachmentInfos) + { + bool read = mergedPass.resourceReadLists[(int)resourceType].Contains(resourceIndex); + bool write = mergedPass.resourceWriteLists[(int)resourceType].Contains(resourceIndex); + if (attachmentInfo.resourceName == currentResource.name && (read || write)) + { + minLoadPass = Mathf.Min(minLoadPass, mergedPassId); + maxStorePass = Mathf.Max(maxStorePass, mergedPassId); + } + } + } + + // Remove load/store actions between the first load and last store pass + if (minLoadPass < maxStorePass) { - var pass = m_CurrentDebugData.passList[passId]; - if (resourceType == RenderGraphResourceType.Texture && pass.nrpInfo != null) + blocks[minLoadPass].store = ResourceRWBlock.StoreAction.None; + + for (int i = minLoadPass + 1, imax = maxStorePass; i < imax; ++i) { - if (pass.nrpInfo.textureFBFetchList.Contains(resourceIndex)) - block.usage |= ResourceRWBlock.UsageFlags.FramebufferFetch; - if (pass.nrpInfo.setGlobals.Contains(resourceIndex)) - block.usage |= ResourceRWBlock.UsageFlags.UpdatesGlobalResource; + var block = blocks[i]; + block.load = ResourceRWBlock.LoadAction.None; + block.store = ResourceRWBlock.StoreAction.None; } + blocks[maxStorePass].load = ResourceRWBlock.LoadAction.None; + } + } + + // Add blocks that are visible + for (int passId = 0; passId < blocks.Count; passId++) + { + ResourceRWBlock block = blocks[passId]; + if (m_PassIdToVisiblePassIndex.TryGetValue(passId, out int visiblePassIndex)) + { if (!block.read && !block.write && block.usage == ResourceRWBlock.UsageFlags.None) continue; // No need to create a visual element @@ -1617,6 +1848,9 @@ void InitializePersistentElements() var resourceFilter = rootVisualElement.Q(Names.kResourceFilterField); resourceFilter.style.display = DisplayStyle.None; // Hidden until the compiler is known + var viewOptions = rootVisualElement.Q(Names.kViewOptionsField); + viewOptions.style.display = DisplayStyle.None; + // Hover overlay var hoverOverlay = rootVisualElement.Q(Names.kHoverOverlay); hoverOverlay.RegisterCallback(_ => HoverResourceGrid(-1, -1)); @@ -1706,32 +1940,32 @@ void OnDebugDataCaptured() RebuildPassFilterUI(); RebuildResourceFilterUI(); + RebuildViewOptionsUI(); RebuildGraphViewerUI(); } } }; } - void OnEnable() + void CreateGUI() { - var registeredGraph = RenderGraph.GetRegisteredRenderGraphs(); - foreach (var graph in registeredGraph) - m_RegisteredGraphs.Add(graph, new HashSet()); - - SubscribeToRenderGraphEvents(); - if (EditorPrefs.HasKey(kPassFilterLegacyEditorPrefsKey)) m_PassFilterLegacy = (PassFilterLegacy)EditorPrefs.GetInt(kPassFilterLegacyEditorPrefsKey); if (EditorPrefs.HasKey(kPassFilterEditorPrefsKey)) m_PassFilter = (PassFilter)EditorPrefs.GetInt(kPassFilterEditorPrefsKey); if (EditorPrefs.HasKey(kResourceFilterEditorPrefsKey)) m_ResourceFilter = (ResourceFilter)EditorPrefs.GetInt(kResourceFilterEditorPrefsKey); + if (EditorPrefs.HasKey(kViewOptionsEditorPrefsKey)) + m_ViewOptions = (ViewOptions)EditorPrefs.GetInt(kViewOptionsEditorPrefsKey); GraphicsToolLifetimeAnalytic.WindowOpened(); - } - void CreateGUI() - { + var registeredGraph = RenderGraph.GetRegisteredRenderGraphs(); + foreach (var graph in registeredGraph) + m_RegisteredGraphs.Add(graph, new HashSet()); + + SubscribeToRenderGraphEvents(); + m_ResourceListIcon = AssetDatabase.LoadAssetAtPath(string.Format(k_ResourceListIconPath, EditorGUIUtility.isProSkin ? "d_" : "")); m_PassListIcon = AssetDatabase.LoadAssetAtPath(string.Format(k_PassListIconPath, EditorGUIUtility.isProSkin ? "d_" : "")); @@ -1791,11 +2025,18 @@ internal partial class TriangleElement : VisualElement public Color color { get; set; } + public bool useStyle { get; set; } + public TriangleElement() { generateVisualContent += ctx => { var painter = ctx.painter2D; + var resolvedStyle = ctx.visualElement.resolvedStyle; + var color = useStyle ? resolvedStyle.color : this.color; + var width = useStyle ? resolvedStyle.width : this.width; + var height = useStyle ? resolvedStyle.height : this.height; + painter.fillColor = color; painter.BeginPath(); painter.MoveTo(new Vector2(0, height)); diff --git a/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates.meta b/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates.meta new file mode 100644 index 00000000000..d0b4225942e --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 863f1a3fb862346d7a3344bcb3024f1b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/BlitSRP.txt b/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/BlitSRP.txt new file mode 100644 index 00000000000..76881f7550b --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/BlitSRP.txt @@ -0,0 +1,31 @@ +Shader "Custom/#SCRIPTNAME#" +{ + SubShader + { + HLSLINCLUDE + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blit.hlsl" + ENDHLSL + + Tags { "RenderType"="Opaque" } + LOD 100 + ZWrite Off Cull Off + Pass + { + Name "#SCRIPTNAME#" + + HLSLPROGRAM + + #pragma vertex Vert + #pragma fragment Frag + + float4 Frag (Varyings input) : SV_Target + { + float4 color = SAMPLE_TEXTURE2D(_BlitTexture, sampler_LinearClamp, input.texcoord).rgba; + return color; + } + + ENDHLSL + } + } +} diff --git a/Tests/SRPTests/Packages/local.code.coverage.references/package.json.meta b/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/BlitSRP.txt.meta similarity index 60% rename from Tests/SRPTests/Packages/local.code.coverage.references/package.json.meta rename to Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/BlitSRP.txt.meta index 8fdcd3c9f60..bae723e8563 100644 --- a/Tests/SRPTests/Packages/local.code.coverage.references/package.json.meta +++ b/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/BlitSRP.txt.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 -guid: 2206b52eb14cec944ba9b2a6076e8c10 -PackageManifestImporter: +guid: 0c69256ff57964383b6408cfd6119fb3 +TextScriptImporter: externalObjects: {} userData: assetBundleName: diff --git a/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/ScriptTemplates.cs b/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/ScriptTemplates.cs new file mode 100644 index 00000000000..58b3cbdd71a --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/ScriptTemplates.cs @@ -0,0 +1,13 @@ +namespace UnityEditor.Rendering +{ + internal static class ScriptTemplates + { + internal const string ScriptTemplatePath = "Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/"; + + [MenuItem("Assets/Create/Shader/SRP Blit Shader", priority = 1)] + static void CreateBlitSRPShader() + { + ProjectWindowUtil.CreateScriptAssetFromTemplateFile($"{ScriptTemplatePath}BlitSRP.txt", "NewBlitScriptableRenderPipelineShader.shader"); + } + } +} diff --git a/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/ScriptTemplates.cs.meta b/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/ScriptTemplates.cs.meta new file mode 100644 index 00000000000..95bfb8aae91 --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Editor/ScriptTemplates/ScriptTemplates.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c870ee1bdda2f46839aa9823ce9d94ca \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Editor/Settings/.buginfo b/Packages/com.unity.render-pipelines.core/Editor/Settings/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Settings/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Editor/Settings/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Editor/StyleSheets/RenderGraphViewer.uss b/Packages/com.unity.render-pipelines.core/Editor/StyleSheets/RenderGraphViewer.uss index c55af2fcf28..01d915472ad 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/StyleSheets/RenderGraphViewer.uss +++ b/Packages/com.unity.render-pipelines.core/Editor/StyleSheets/RenderGraphViewer.uss @@ -12,6 +12,10 @@ --dependency-block-height: 26px; --dependency-block-width: var(--pass-width); --hover-overlay-offset-top: 204px; + --action-border-width: 13px; + --action-border-height: var(--action-border-width); + --action-width: 12px; + --action-height: var(--action-width); --side-panel-width: 380px; --side-panel-pass-title-width: 330px; /* adjust if changing --side-panel-width */ @@ -607,4 +611,31 @@ ScrollView TextElement { margin-bottom: 12px; } +.dependency-block-load-action { + width: var(--action-width); + height: var(--action-height); + position: absolute; + top: 0; + left: 0; +} + +.dependency-block-load-action-border { + width: var(--action-border-width); + height: var(--action-border-height); + color: var(--load-action-border-color); +} +.dependency-block-store-action { + width: var(--action-width); + height: var(--action-height); + position: absolute; + rotate: 180deg; + bottom: 0; + right: 0; +} + +.dependency-block-store-action-border { + width: var(--action-border-width); + height: var(--action-border-height); + color: var(--store-action-border-color); +} diff --git a/Packages/com.unity.render-pipelines.core/Editor/StyleSheets/RenderGraphViewerDark.uss b/Packages/com.unity.render-pipelines.core/Editor/StyleSheets/RenderGraphViewerDark.uss index 182870c48c4..e634ee12584 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/StyleSheets/RenderGraphViewerDark.uss +++ b/Packages/com.unity.render-pipelines.core/Editor/StyleSheets/RenderGraphViewerDark.uss @@ -19,6 +19,8 @@ --side-panel-background-color: #383838; --side-panel-item-border-color: #666666; --side-panel-secondary-text-color: #808080; + --load-action-border-color: #555555; + --store-action-border-color: #555555; } #capture-button { @@ -49,6 +51,10 @@ background-image: url("../Icons/RenderGraphViewer/d_Texture@2x.png"); } +.resource-icon--memoryless-texture { + background-image: url("../Icons/RenderGraphViewer/d_MemorylessTexture@2x.png"); +} + .resource-icon--buffer { background-image: url("../Icons/RenderGraphViewer/d_Buffer@2x.png"); } @@ -78,3 +84,31 @@ .custom-foldout-arrow > Toggle > VisualElement:hover #unity-checkmark { -unity-background-image-tint-color: white; } + +.load-action-load { + color: #9deb24; +} + +.load-action-clear { + color: cornflowerblue; +} + +.load-action-dont-care { + color: lightslategray; +} + +.store-action-store { + color: darkred; +} + +.store-action-resolve { + color: lightseagreen; +} + +.store-action-store-resolve { + color: lightsalmon; +} + +.store-action-dont-care { + color: lightslategray; +} diff --git a/Packages/com.unity.render-pipelines.core/Editor/StyleSheets/RenderGraphViewerLight.uss b/Packages/com.unity.render-pipelines.core/Editor/StyleSheets/RenderGraphViewerLight.uss index 17e663c347c..cd4c9aa0135 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/StyleSheets/RenderGraphViewerLight.uss +++ b/Packages/com.unity.render-pipelines.core/Editor/StyleSheets/RenderGraphViewerLight.uss @@ -19,6 +19,8 @@ --side-panel-background-color: #cbcbcb; --side-panel-item-border-color: #666666; --side-panel-secondary-text-color: #707070; + --load-action-border-color: #555555; + --store-action-border-color: #555555; } #capture-button { @@ -49,6 +51,10 @@ background-image: url("../Icons/RenderGraphViewer/Texture@2x.png"); } +.resource-icon--memoryless-texture { + background-image: url("../Icons/RenderGraphViewer/MemorylessTexture@2x.png"); +} + .resource-icon--buffer { background-image: url("../Icons/RenderGraphViewer/Buffer@2x.png"); } @@ -82,3 +88,31 @@ .custom-foldout-arrow > Toggle > VisualElement:hover #unity-checkmark { -unity-background-image-tint-color: grey; } + +.load-action-load { + color: #9deb24; +} + +.load-action-clear { + color: cornflowerblue; +} + +.load-action-dont-care { + color: lightslategray; +} + +.store-action-store { + color: darkred; +} + +.store-action-resolve { + color: lightseagreen; +} + +.store-action-store-resolve { + color: lightsalmon; +} + +.store-action-dont-care { + color: lightslategray; +} diff --git a/Packages/com.unity.render-pipelines.core/Editor/UXML/RenderGraphViewer.uxml b/Packages/com.unity.render-pipelines.core/Editor/UXML/RenderGraphViewer.uxml index bc58e87832c..e9997269616 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/UXML/RenderGraphViewer.uxml +++ b/Packages/com.unity.render-pipelines.core/Editor/UXML/RenderGraphViewer.uxml @@ -6,6 +6,7 @@ + diff --git a/Packages/com.unity.render-pipelines.core/Editor/Volume/.buginfo b/Packages/com.unity.render-pipelines.core/Editor/Volume/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Volume/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Editor/Volume/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Editor/Volume/VolumeProfileFactory.cs b/Packages/com.unity.render-pipelines.core/Editor/Volume/VolumeProfileFactory.cs index ee1245b688a..9c64879813f 100644 --- a/Packages/com.unity.render-pipelines.core/Editor/Volume/VolumeProfileFactory.cs +++ b/Packages/com.unity.render-pipelines.core/Editor/Volume/VolumeProfileFactory.cs @@ -12,7 +12,7 @@ namespace UnityEditor.Rendering ///
public static class VolumeProfileFactory { - [MenuItem("Assets/Create/Rendering/Volume Profile", priority = 201)] + [MenuItem("Assets/Create/Rendering/Volume Profile", priority = 10)] static void CreateVolumeProfile() { ProjectWindowUtil.StartNameEditingIfProjectWindowExists( diff --git a/Packages/com.unity.render-pipelines.core/Runtime/AssemblyInfo.cs b/Packages/com.unity.render-pipelines.core/Runtime/AssemblyInfo.cs index 96162f18722..b2216854adc 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/AssemblyInfo.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/AssemblyInfo.cs @@ -9,3 +9,4 @@ // Smoke test project visibility [assembly: InternalsVisibleTo("SRPSmoke.Runtime.Tests")] [assembly: InternalsVisibleTo("SRPSmoke.Editor.Tests")] +[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")] diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Camera/.buginfo b/Packages/com.unity.render-pipelines.core/Runtime/Camera/.buginfo index 716a23b6629..74caee799c0 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Camera/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Runtime/Camera/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: Camera \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Camera/CameraSwitcher.cs b/Packages/com.unity.render-pipelines.core/Runtime/Camera/CameraSwitcher.cs index 8da9abdbfde..7c839d88cc4 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Camera/CameraSwitcher.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Camera/CameraSwitcher.cs @@ -104,14 +104,10 @@ void SetCameraIndex(int index) if (m_CurrentCamera != null) { // If we witch back to the original camera, put back the transform in it. - if (m_CurrentCamera == m_OriginalCamera) - { - m_OriginalCamera.transform.position = m_OriginalCameraPosition; - m_OriginalCamera.transform.rotation = m_OriginalCameraRotation; - } - - transform.position = m_CurrentCamera.transform.position; - transform.rotation = m_CurrentCamera.transform.rotation; + if (m_CurrentCamera == m_OriginalCamera) + m_OriginalCamera.transform.SetPositionAndRotation(m_OriginalCameraPosition, m_OriginalCameraRotation); + + transform.SetPositionAndRotation(m_CurrentCamera.transform.position, m_CurrentCamera.transform.rotation); } } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Camera/FreeCamera.cs b/Packages/com.unity.render-pipelines.core/Runtime/Camera/FreeCamera.cs index 0b9f74f6609..e3b1f3f29a0 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Camera/FreeCamera.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Camera/FreeCamera.cs @@ -194,9 +194,9 @@ void Update() float moveSpeed = Time.deltaTime * m_MoveSpeed; if (fire1 || leftShiftBoost && leftShift) moveSpeed *= m_Turbo; - transform.position += transform.forward * moveSpeed * inputVertical; - transform.position += transform.right * moveSpeed * inputHorizontal; - transform.position += Vector3.up * moveSpeed * inputYAxis; + transform.position += transform.forward * (moveSpeed * inputVertical) + + transform.right * (moveSpeed * inputHorizontal) + + Vector3.up * (moveSpeed * inputYAxis); } } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Common/.buginfo b/Packages/com.unity.render-pipelines.core/Runtime/Common/.buginfo index 329e848ef5b..0eb675f0456 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Common/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Runtime/Common/.buginfo @@ -1,5 +1,5 @@ rule1: - area: SRP Architecture & API + area: SRP Foundation rule2: when: @@ -7,4 +7,4 @@ rule2: - ^.*CoreAttributes.*$ - ^.*IAdditionalData.*$ - ^.*Reload.*$ - area: SRP Workflow + area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/.buginfo b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/.buginfo index a8e3ae67ae4..272688b1879 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/.buginfo @@ -1 +1 @@ -area: Graphics Tools \ No newline at end of file +area: Graphics Debugging Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsVolumes.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsVolumes.cs index c68319938f8..28ddad6fa06 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsVolumes.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugDisplaySettingsVolumes.cs @@ -1,8 +1,10 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Reflection; + +#if UNITY_EDITOR using UnityEditor; +#endif namespace UnityEngine.Rendering { @@ -12,36 +14,273 @@ namespace UnityEngine.Rendering public class DebugDisplaySettingsVolume : IDebugDisplaySettingsData { /// Current volume debug settings. + [Obsolete("This property has been obsoleted and will be removed in a future version. #from(6000.2)", false)] public IVolumeDebugSettings volumeDebugSettings { get; } + private int m_SelectedComponentIndex = -1; + + /// Current volume component to debug. + public int selectedComponent + { + get => m_SelectedComponentIndex; + set + { + if (value != m_SelectedComponentIndex) + { + m_SelectedComponentIndex = value; + OnSelectionChanged(); + } + } + } + + private void DestroyVolumeInterpolatedResults() + { + if (m_VolumeInterpolatedResults != null) + ScriptableObject.DestroyImmediate(m_VolumeInterpolatedResults); + } + + /// Type of the current component to debug. + public Type selectedComponentType + { + get => selectedComponent > 0 ? volumeComponentsPathAndType[selectedComponent - 1].Item2 : null; + set + { + var index = volumeComponentsPathAndType.FindIndex(t => t.Item2 == value); + if (index != -1) + selectedComponent = index + 1; + } + } + + /// List of Volume component types. + public List<(string, Type)> volumeComponentsPathAndType => VolumeManager.instance.GetVolumeComponentsForDisplay(GraphicsSettings.currentRenderPipelineAssetType); + + private Camera m_SelectedCamera; + + /// Current camera to debug. + public Camera selectedCamera + { + get + { +#if UNITY_EDITOR + // By default pick the one scene camera + if (m_SelectedCamera == null && SceneView.lastActiveSceneView != null) + { + var sceneCamera = SceneView.lastActiveSceneView.camera; + if (sceneCamera != null) + m_SelectedCamera = sceneCamera; + } +#endif + + return m_SelectedCamera; + } + set + { + if (value != null && value != m_SelectedCamera) + { + m_SelectedCamera = value; + OnSelectionChanged(); + } + } + } + + private void OnSelectionChanged() + { + ClearInterpolationData(); + DestroyVolumeInterpolatedResults(); + } + + VolumeComponent m_VolumeInterpolatedResults; + private bool m_StoreStackInterpolatedValues; + private ObservableList m_InfluenceVolumes = new (); + private List<(Volume volume, float weight)> m_VolumesWeights = new (); + + private void ClearInterpolationData() + { + m_VolumesWeights.Clear(); + } + + static bool AreVolumesChanged(ObservableList influenceVolumes, List<(Volume volume, float weight)> volumesWeights) + { + // First, check if the lists have the same number of elements + if (influenceVolumes.Count != volumesWeights.Count) + return true; + + // Sequence Equals + for (int i = 0; i < influenceVolumes.Count; i++) + { + if (influenceVolumes[i] != volumesWeights[i].volume) + return true; + } + + // If all checks pass, the lists are the same (in terms of both content and order) + return false; + } + + private void OnBeginVolumeStackUpdate(VolumeStack stack, Camera camera) + { + if (camera == selectedCamera) + { + ClearInterpolationData(); + m_StoreStackInterpolatedValues = selectedCamera != null && selectedComponentType != null; + } + } + + private void OnEndVolumeStackUpdate(VolumeStack stack, Camera camera) + { + if (m_StoreStackInterpolatedValues) + { + if (AreVolumesChanged(m_InfluenceVolumes, m_VolumesWeights)) + { + m_InfluenceVolumes.Clear(); + foreach (var pair in m_VolumesWeights) + m_InfluenceVolumes.Add(pair.volume); + } + + // Copy the results of the interpolation into our resulVolumeComponent + var componentInStack = stack.GetComponent(selectedComponentType); + + for (int i = 0; i < componentInStack.parameters.Count; ++i) + { + resultVolumeComponent.parameters[i].SetValue(componentInStack.parameters[i]); + } + + m_StoreStackInterpolatedValues = false; + } + } + + private void OnVolumeStackInterpolated(VolumeStack stack, Volume volume, float interpolationFactor) + { + if (m_StoreStackInterpolatedValues) + { + m_VolumesWeights.Add((volume, interpolationFactor)); + } + } + + /// + /// Obtains the volume weight + /// + /// + /// The weight of the volume + public float GetVolumeWeight(Volume volume) + { + // Try to get the weight associated with the volume + // If the volume is not found, return a default value (e.g., 0.0f) + if (m_VolumesWeights.Count == 0) + return 0.0f; + + foreach (var pair in m_VolumesWeights) + { + if (volume == pair.volume) + return pair.weight; + } + + return 0.0f; + } + + /// + /// Gets the Volumes List for the current camera and selected volume component + /// + /// The list of influenced volumes + public ObservableList GetVolumesList() + { + return m_InfluenceVolumes; + } + + + void IDebugDisplaySettingsData.Reset() + { +#if UNITY_EDITOR || DEVELOPMENT_BUILD + VolumeManager.instance.overrideVolumeStackData -= OnVolumeStackInterpolated; + VolumeManager.instance.beginVolumeStackUpdate -= OnBeginVolumeStackUpdate; + VolumeManager.instance.endVolumeStackUpdate -= OnEndVolumeStackUpdate; + VolumeManager.instance.renderingDebuggerAttached = false; +#endif + + ClearInterpolationData(); + DestroyVolumeInterpolatedResults(); + } + /// /// Constructor with the settings /// /// The volume debug settings object used for configuration. + [Obsolete("This constructor has been obsoleted and will be removed in a future version. #from(6000.2)", false)] public DebugDisplaySettingsVolume(IVolumeDebugSettings volumeDebugSettings) + : this() { this.volumeDebugSettings = volumeDebugSettings; } + /// + /// Constructor with the settings + /// + public DebugDisplaySettingsVolume() + { +#if UNITY_EDITOR || DEVELOPMENT_BUILD + VolumeManager.instance.overrideVolumeStackData += OnVolumeStackInterpolated; + VolumeManager.instance.beginVolumeStackUpdate += OnBeginVolumeStackUpdate; + VolumeManager.instance.endVolumeStackUpdate += OnEndVolumeStackUpdate; +#endif + } + internal int volumeComponentEnumIndex; + internal VolumeComponent resultVolumeComponent + { + get + { + if (m_VolumeInterpolatedResults == null) + m_VolumeInterpolatedResults = ScriptableObject.CreateInstance(selectedComponentType) as VolumeComponent; - internal Dictionary debugState = new Dictionary(); + return m_VolumeInterpolatedResults; + } + } + + internal static string ExtractResult(VolumeParameter param) + { + if (param == null) + return Strings.parameterNotCalculated; + + var paramType = param.GetType(); + + var property = paramType.GetProperty("value"); + if (property == null) + return "-"; + + var value = property.GetValue(param); + var propertyType = property.PropertyType; + if (value == null || value.Equals(null)) + return Strings.none + $" ({propertyType.Name})"; + + var toString = propertyType.GetMethod("ToString", Type.EmptyTypes); + if ((toString == null) || (toString.DeclaringType == typeof(object)) || (toString.DeclaringType == typeof(Object))) + { + // Check if the parameter has a name + var nameProp = property.PropertyType.GetProperty("name"); + if (nameProp == null) + return Strings.debugViewNotSupported; + + var valueString = $"{nameProp.GetValue(value)}"; + return valueString ?? Strings.none; + } + + return value.ToString(); + } static class Styles { public static readonly GUIContent none = new GUIContent("None"); - public static readonly GUIContent editorCamera = new GUIContent("Editor Camera"); } static class Strings { + public static readonly string cameraNeedsRendering = "Values might not be fully updated if the camera you are inspecting is not rendered."; public static readonly string none = "None"; public static readonly string parameter = "Parameter"; public static readonly string component = "Component"; public static readonly string debugViewNotSupported = "N/A"; - public static readonly string parameterNotOverrided = "-"; public static readonly string volumeInfo = "Volume Info"; public static readonly string gameObject = "GameObject"; + public static readonly string priority = "Priority"; public static readonly string resultValue = "Result"; public static readonly string resultValueTooltip = "The interpolated result value of the parameter. This value is used to render the camera."; public static readonly string globalDefaultValue = "Graphics Settings"; @@ -51,6 +290,7 @@ static class Strings public static readonly string global = "Global"; public static readonly string local = "Local"; public static readonly string volumeProfile = "Volume Profile"; + public static readonly string parameterNotCalculated = "N/A"; } const string k_PanelTitle = "Volume"; @@ -73,7 +313,7 @@ public static DebugUI.EnumField CreateComponentSelector(SettingsPanel panel, Act var componentNames = new List() { Styles.none }; var componentValues = new List() { componentIndex++ }; - var volumesAndTypes = VolumeManager.instance.GetVolumeComponentsForDisplay(GraphicsSettings.currentRenderPipelineAssetType); + var volumesAndTypes = panel.data.volumeComponentsPathAndType; foreach (var type in volumesAndTypes) { componentNames.Add(new GUIContent() { text = type.Item1 }); @@ -83,8 +323,8 @@ public static DebugUI.EnumField CreateComponentSelector(SettingsPanel panel, Act return new DebugUI.EnumField { displayName = Strings.component, - getter = () => panel.data.volumeDebugSettings.selectedComponent, - setter = value => panel.data.volumeDebugSettings.selectedComponent = value, + getter = () => panel.data.selectedComponent, + setter = value => panel.data.selectedComponent = value, enumNames = componentNames.ToArray(), enumValues = componentValues.ToArray(), getIndex = () => panel.data.volumeComponentEnumIndex, @@ -97,21 +337,20 @@ public static DebugUI.ObjectPopupField CreateCameraSelector(SettingsPanel panel, { return new DebugUI.CameraSelector() { - getter = () => panel.data.volumeDebugSettings.selectedCamera, - setter = value => - { - var c = panel.data.volumeDebugSettings.cameras.ToArray(); - panel.data.volumeDebugSettings.selectedCameraIndex = Array.IndexOf(c, value as Camera); - }, + getter = () => panel.data.selectedCamera, + setter = value => panel.data.selectedCamera = value as Camera, onValueChanged = refresh }; } - static DebugUI.Widget CreateVolumeParameterWidget(string name, bool isResultParameter, VolumeParameter param, Func isHiddenCallback = null) + internal static DebugUI.Widget CreateVolumeParameterWidget(string name, bool isResultParameter, VolumeParameter param) { #if UNITY_EDITOR || DEVELOPMENT_BUILD if (param != null) { + Func isHiddenCallback = isResultParameter ? + () => false : + () => !param.overrideState; var parameterType = param.GetType(); if (parameterType == typeof(ColorParameter)) { @@ -126,6 +365,31 @@ static DebugUI.Widget CreateVolumeParameterWidget(string name, bool isResultPara isHiddenCallback = isHiddenCallback }; } + else if (parameterType.BaseType.IsGenericType && parameterType.BaseType.GetGenericArguments().Length > 0) + { + // Get the generic type argument, e.g., in VolumeParameter + var genericArgument = parameterType.BaseType.GetGenericArguments()[0]; + + // Check if the argument is a UnityEngine.Object or derived type + if (typeof(Object).IsAssignableFrom(genericArgument)) + { + return new DebugUI.ObjectField() + { + displayName = name, + getter = () => + { + var property = parameterType.GetProperty("value"); + if (property == null) + return null; + + var value = property.GetValue(param); + return value as Object; + + }, + isHiddenCallback = isHiddenCallback + }; + } + } var typeInfo = parameterType.GetTypeInfo(); var genericArguments = typeInfo.BaseType.GenericTypeArguments; @@ -135,48 +399,20 @@ static DebugUI.Widget CreateVolumeParameterWidget(string name, bool isResultPara { displayName = name, getter = () => (Object[])parameterType.GetProperty("value").GetValue(param, null), - type = parameterType + type = parameterType, + isHiddenCallback = isHiddenCallback }; } return new DebugUI.Value() { displayName = name, - getter = () => - { - var property = param.GetType().GetProperty("value"); - if (property == null) - return "-"; - - if (isResultParameter || param.overrideState) - { - var value = property.GetValue(param); - var propertyType = property.PropertyType; - if (value == null || value.Equals(null)) - return Strings.none + $" ({propertyType.Name})"; - - var toString = propertyType.GetMethod("ToString", Type.EmptyTypes); - if ((toString == null) || (toString.DeclaringType == typeof(object)) || (toString.DeclaringType == typeof(UnityEngine.Object))) - { - // Check if the parameter has a name - var nameProp = property.PropertyType.GetProperty("name"); - if (nameProp == null) - return Strings.debugViewNotSupported; - - var valueString = nameProp.GetValue(value); - return valueString ?? Strings.none; - } - - return value.ToString(); - } - - return Strings.parameterNotOverrided; - }, + getter = () => ExtractResult(param), isHiddenCallback = isHiddenCallback }; } #endif - return new DebugUI.Value(); + return new DebugUI.Value() { displayName = name, getter = () => Strings.parameterNotCalculated, }; } static DebugUI.Value s_EmptyDebugUIValue = new DebugUI.Value { getter = () => string.Empty }; @@ -204,14 +440,11 @@ static List GetResolutionChain(DebugDisplaySettingsVolume { List chain = new List(); - Type selectedType = data.volumeDebugSettings.selectedComponentType; - if (selectedType == null) + Type selectedType = data.selectedComponentType; + if (data.selectedCamera == null || selectedType == null) return chain; - var volumeManager = VolumeManager.instance; - var stack = data.volumeDebugSettings.selectedCameraVolumeStack ?? volumeManager.stack; - var stackComponent = stack.GetComponent(selectedType); - if (stackComponent == null) + if (data.resultVolumeComponent == null) return chain; var result = new VolumeParameterChain() @@ -221,15 +454,17 @@ static List GetResolutionChain(DebugDisplaySettingsVolume name = Strings.resultValue, tooltip = Strings.resultValueTooltip, }, - volumeComponent = stackComponent, + volumeComponent = data.resultVolumeComponent }; chain.Add(result); - // Add volume components that override default values - var volumes = data.volumeDebugSettings.GetVolumes(); - foreach (var volume in volumes) + // Add volume components that override the default values. + // Iterate in reverse order to display the last interpolated Volume (most relevant) next to the result in the table view. + var volumes = data.GetVolumesList(); + for (int i = volumes.Count - 1; i >= 0; i--) { + var volume = volumes[i]; var profile = volume.HasInstantiatedProfile() ? volume.profile : volume.sharedProfile; var overrideComponent = GetSelectedVolumeComponent(profile, selectedType); if (overrideComponent != null) @@ -250,9 +485,9 @@ static List GetResolutionChain(DebugDisplaySettingsVolume } // Add custom default profiles - if (volumeManager.customDefaultProfiles != null) + if (VolumeManager.instance.customDefaultProfiles != null) { - foreach (var customProfile in volumeManager.customDefaultProfiles) + foreach (var customProfile in VolumeManager.instance.customDefaultProfiles) { var customProfileComponent = GetSelectedVolumeComponent(customProfile, selectedType); if (customProfileComponent != null) @@ -273,9 +508,9 @@ static List GetResolutionChain(DebugDisplaySettingsVolume } // Add Quality Settings - if (volumeManager.globalDefaultProfile != null) + if (VolumeManager.instance.qualityDefaultProfile != null) { - var qualitySettingsComponent = GetSelectedVolumeComponent(volumeManager.qualityDefaultProfile, selectedType); + var qualitySettingsComponent = GetSelectedVolumeComponent(VolumeManager.instance.qualityDefaultProfile, selectedType); if (qualitySettingsComponent != null) { var overrideVolume = new VolumeParameterChain() @@ -285,7 +520,7 @@ static List GetResolutionChain(DebugDisplaySettingsVolume name = Strings.qualityLevelValue, tooltip = Strings.qualityLevelValueTooltip, }, - volumeProfile = volumeManager.qualityDefaultProfile, + volumeProfile = VolumeManager.instance.qualityDefaultProfile, volumeComponent = qualitySettingsComponent, }; chain.Add(overrideVolume); @@ -293,9 +528,9 @@ static List GetResolutionChain(DebugDisplaySettingsVolume } // Add Graphics Settings - if (volumeManager.globalDefaultProfile != null) + if (VolumeManager.instance.globalDefaultProfile != null) { - var graphicsSettingsComponent = GetSelectedVolumeComponent(volumeManager.globalDefaultProfile, selectedType); + var graphicsSettingsComponent = GetSelectedVolumeComponent(VolumeManager.instance.globalDefaultProfile, selectedType); if (graphicsSettingsComponent != null) { var overrideVolume = new VolumeParameterChain() @@ -305,7 +540,7 @@ static List GetResolutionChain(DebugDisplaySettingsVolume name = Strings.globalDefaultValue, tooltip = Strings.globalDefaultValueTooltip, }, - volumeProfile = volumeManager.globalDefaultProfile, + volumeProfile = VolumeManager.instance.globalDefaultProfile, volumeComponent = graphicsSettingsComponent, }; chain.Add(overrideVolume); @@ -317,11 +552,21 @@ static List GetResolutionChain(DebugDisplaySettingsVolume public static DebugUI.Table CreateVolumeTable(DebugDisplaySettingsVolume data) { + // Function for updating the attach state and also checking if the table should be visible + Func hiddenCallback = () => + { +#if UNITY_EDITOR || DEVELOPMENT_BUILD + VolumeManager.instance.renderingDebuggerAttached = data.selectedComponent > 0 && data.selectedCamera != null; + return !VolumeManager.instance.renderingDebuggerAttached; +#else + return true; +#endif + }; var table = new DebugUI.Table() { displayName = Strings.parameter, isReadOnly = true, - isHiddenCallback = () => data.volumeDebugSettings.selectedComponent == 0 + isHiddenCallback = hiddenCallback, }; var resolutionChain = GetResolutionChain(data); @@ -331,67 +576,9 @@ public static DebugUI.Table CreateVolumeTable(DebugDisplaySettingsVolume data) GenerateTableRows(table, resolutionChain); GenerateTableColumns(table, data, resolutionChain); - float timer = 0.0f, refreshRate = 0.2f; - var volumes = data.volumeDebugSettings.GetVolumes(); - table.isHiddenCallback = () => - { - timer += Time.deltaTime; - if (timer >= refreshRate) - { - if (data.volumeDebugSettings.selectedCamera != null) - { - SetTableColumnVisibility(data, table); - - var newVolumes = data.volumeDebugSettings.GetVolumes(); - if (!volumes.SequenceEqual(newVolumes)) - { - volumes = newVolumes; - DebugManager.instance.ReDrawOnScreenDebug(); - } - } - - timer = 0.0f; - } - return false; - }; - return table; } - private static void SetTableColumnVisibility(DebugDisplaySettingsVolume data, DebugUI.Table table) - { - var newResolutionChain = GetResolutionChain(data); - for (int i = 1; i < newResolutionChain.Count; i++) // We always skip the interpolated stack that is in index 0 - { - bool visible = true; - if (newResolutionChain[i].volume != null) - { - visible = data.volumeDebugSettings.VolumeHasInfluence(newResolutionChain[i].volume); - } - else - { - visible = newResolutionChain[i].volumeComponent.active; - - if (visible) - { - bool atLeastOneParameterIsOverriden = false; - foreach (var parameter in newResolutionChain[i].volumeComponent.parameterList) - { - if (parameter.overrideState == true) - { - atLeastOneParameterIsOverriden = true; - break; - } - } - - visible &= atLeastOneParameterIsOverriden; - } - } - - table.SetColumnVisibility(i, visible); - } - } - private static void GenerateTableColumns(DebugUI.Table table, DebugDisplaySettingsVolume data, List resolutionChain) { for (int i = 0; i < resolutionChain.Count; ++i) @@ -407,12 +594,20 @@ private static void GenerateTableColumns(DebugUI.Table table, DebugDisplaySettin getter = () => { var scope = chain.volume.isGlobal ? Strings.global : Strings.local; - var weight = data.volumeDebugSettings.GetVolumeWeight(chain.volume); - return scope + " (" + (weight * 100f) + "%)"; + var weight = data.GetVolumeWeight(chain.volume); + if (chain.volumeComponent.active) + return $"{scope} ({(weight * 100f):F2}%)"; + else + return $"{scope} (disabled)"; }, refreshRate = 0.2f }); ((DebugUI.Table.Row)table.children[++iRowIndex]).children.Add(new DebugUI.ObjectField() { displayName = string.Empty, getter = () => chain.volume }); + ((DebugUI.Table.Row)table.children[++iRowIndex]).children.Add(new DebugUI.Value() + { + nameAndTooltip = chain.nameAndTooltip, + getter = () => chain.volume.priority + }); } else { @@ -422,9 +617,11 @@ private static void GenerateTableColumns(DebugUI.Table table, DebugDisplaySettin getter = () => string.Empty }); ((DebugUI.Table.Row)table.children[++iRowIndex]).children.Add(s_EmptyDebugUIValue); + ((DebugUI.Table.Row)table.children[++iRowIndex]).children.Add(s_EmptyDebugUIValue); } - ((DebugUI.Table.Row)table.children[++iRowIndex]).children.Add(chain.volumeProfile != null ? new DebugUI.ObjectField() { displayName = string.Empty, getter = () => chain.volumeProfile } : + ((DebugUI.Table.Row)table.children[++iRowIndex]).children.Add(chain.volumeProfile != null ? + new DebugUI.ObjectField() { displayName = string.Empty, getter = () => chain.volumeProfile } : s_EmptyDebugUIValue); ((DebugUI.Table.Row)table.children[++iRowIndex]).children.Add(s_EmptyDebugUIValue); @@ -433,14 +630,14 @@ private static void GenerateTableColumns(DebugUI.Table table, DebugDisplaySettin for (int j = 0; j < chain.volumeComponent.parameterList.Count; ++j) { var parameter = chain.volumeComponent.parameterList[j]; - ((DebugUI.Table.Row)table.children[++iRowIndex]).children.Add(CreateVolumeParameterWidget(chain.nameAndTooltip.name, isResultParameter, parameter)); + ((DebugUI.Table.Row)table.children[++iRowIndex]).children.Add( + CreateVolumeParameterWidget(chain.nameAndTooltip.name, isResultParameter, parameter)); } } } private static void GenerateTableRows(DebugUI.Table table, List resolutionChain) { - // First row for volume info var volumeInfoRow = new DebugUI.Table.Row() { displayName = Strings.volumeInfo, @@ -449,7 +646,6 @@ private static void GenerateTableRows(DebugUI.Table table, List { + // When we are moving the scene camera, we want the editor window to be repainted too + public override DebugUI.Flags Flags => DebugUI.Flags.EditorForceUpdate; + + public override void Dispose() + { + base.Dispose(); + + data.GetVolumesList().ItemAdded -= OnVolumeInfluenceChanged; + data.GetVolumesList().ItemRemoved -= OnVolumeInfluenceChanged; + } + public SettingsPanel(DebugDisplaySettingsVolume data) : base(data) { AddWidget(WidgetFactory.CreateCameraSelector(this, (_, __) => Refresh())); AddWidget(WidgetFactory.CreateComponentSelector(this, (_, __) => Refresh())); - m_VolumeTable = WidgetFactory.CreateVolumeTable(m_Data); + + Func hiddenCallback = () => data.selectedCamera == null || data.selectedComponent <= 0; + AddWidget(new DebugUI.MessageBox() + { + displayName = Strings.cameraNeedsRendering, + style = DebugUI.MessageBox.Style.Warning, + isHiddenCallback = hiddenCallback, + }); + m_VolumeTable = WidgetFactory.CreateVolumeTable(data); AddWidget(m_VolumeTable); + data.GetVolumesList().ItemAdded += OnVolumeInfluenceChanged; + data.GetVolumesList().ItemRemoved += OnVolumeInfluenceChanged; + } + + private void OnVolumeInfluenceChanged(ObservableList sender, ListChangedEventArgs e) + { + Refresh(); + DebugManager.instance.ReDrawOnScreenDebug(); } DebugUI.Table m_VolumeTable = null; @@ -512,22 +742,22 @@ void Refresh() return; bool needsRefresh = false; - if (m_VolumeTable != null) + if (m_Data.selectedComponent > 0 && m_Data.selectedCamera != null) { needsRefresh = true; - panel.children.Remove(m_VolumeTable); - } + var volumeTable = WidgetFactory.CreateVolumeTable(m_Data); - if (m_Data.volumeDebugSettings.selectedComponent > 0 && m_Data.volumeDebugSettings.selectedCamera != null) - { - needsRefresh = true; - m_VolumeTable = WidgetFactory.CreateVolumeTable(m_Data); - AddWidget(m_VolumeTable); - panel.children.Add(m_VolumeTable); + m_VolumeTable.children.Clear(); + foreach (var row in volumeTable.children) + { + m_VolumeTable.children.Add(row); + } } if (needsRefresh) + { DebugManager.instance.ReDrawOnScreenDebug(); + } } } @@ -542,7 +772,6 @@ public IDebugDisplaySettingsPanelDisposable CreatePanel() { return new SettingsPanel(this); } - #endregion } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs index ee86b1ede28..9d5e3346112 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Fields.cs @@ -242,6 +242,134 @@ public override float ValidateValue(float value) } } + /// + /// Field that displays + /// + public class RenderingLayerField : Field, IContainer + { + static readonly NameAndTooltip s_RenderingLayerColors = new() + { + name = "Layers Color", + tooltip = "Select the display color for each Rendering Layer" + }; + + private string[] m_RenderingLayersNames = Array.Empty(); + + private int m_DefinedRenderingLayersCount = -1; + + private int maxRenderingLayerCount + { + get + { +#if UNITY_EDITOR + if (UnityEditor.Rendering.EditorGraphicsSettings. + TryGetFirstRenderPipelineSettingsFromInterface(out var settings)) + return Mathf.Min(settings.maxSupportedRenderingLayers, RenderingLayerMask.GetRenderingLayerCount()); +#endif + + return RenderingLayerMask.GetRenderingLayerCount(); + } + } + + private void Resize() + { + m_DefinedRenderingLayersCount = RenderingLayerMask.GetDefinedRenderingLayerCount(); + + // Fill layer names + m_RenderingLayersNames = new string[maxRenderingLayerCount]; + for (int i = 0; i < maxRenderingLayerCount; i++) + { + var definedLayerName = RenderingLayerMask.RenderingLayerToName(i); + if (string.IsNullOrEmpty(definedLayerName)) + definedLayerName = $"Unused Rendering Layer {i}"; + m_RenderingLayersNames[i] = definedLayerName; + } + + // Foldout + Color for each layer + m_RenderingLayersColors.Clear(); + var layersColor = new DebugUI.Foldout() + { + nameAndTooltip = s_RenderingLayerColors, + flags = Flags.EditorOnly, + parent = this, + }; + m_RenderingLayersColors.Add(layersColor); + + for (int i = 0; i < m_RenderingLayersNames.Length; i++) + { + var index = i; // capture the variable for the color field index + layersColor.children.Add(new DebugUI.ColorField + { + displayName = m_RenderingLayersNames[index], + getter = () => + { + Assert.IsNotNull(getRenderingLayerColor, "Please specify a method for getting the rendering layer color"); + return getRenderingLayerColor(index); + }, + setter = value => + { + Assert.IsNotNull(setRenderingLayerColor, "Please specify a method for setting the rendering layer color"); + setRenderingLayerColor(value, index); + } + }); + } + + GenerateQueryPath(); + } + + /// + /// Obtains the list of the available rendering layer names + /// + public string[] renderingLayersNames + { + get + { + if (m_DefinedRenderingLayersCount != RenderingLayerMask.GetDefinedRenderingLayerCount()) + { + Resize(); + } + + return m_RenderingLayersNames; + } + } + + private ObservableList m_RenderingLayersColors = new ObservableList(); + + /// + /// Gets the list of widgets representing the rendering layer colors. + /// + public ObservableList children + { + get + { + if (m_DefinedRenderingLayersCount != RenderingLayerMask.GetDefinedRenderingLayerCount()) + { + Resize(); + } + + return m_RenderingLayersColors; + } + } + + /// + /// Obtains the color in a given index + /// + public Func getRenderingLayerColor { get; set; } + /// + /// Sets the color for a given index + /// + public Action setRenderingLayerColor { get; set; } + + internal override void GenerateQueryPath() + { + base.GenerateQueryPath(); + + int numChildren = children.Count; + for (int i = 0; i < numChildren; i++) + children[i].GenerateQueryPath(); + } + } + /// /// Generic that stores enumNames and enumValues /// @@ -504,47 +632,6 @@ public Type enumType } } - /// - /// Maskfield enumeration field. - /// - public class MaskField : EnumField - { - /// - /// Fills the enum using the provided names - /// - /// names to fill the enum - public void Fill(string[] names) - { - using (ListPool.Get(out var tmpNames)) - using (ListPool.Get(out var tmpValues)) - { - for (int i=0; i<(names.Length); ++i) - { - tmpNames.Add(new GUIContent(names[i])); - tmpValues.Add(i); - } - enumNames = tmpNames.ToArray(); - enumValues = tmpValues.ToArray(); - } - } - - /// - /// Assigns a value to the maskfield. - /// - /// value for the maskfield - public override void SetValue(uint value) - { - Assert.IsNotNull(setter); - var validValue = ValidateValue(value); - - if (!validValue.Equals(getter())) - { - setter(validValue); - onValueChanged?.Invoke(this, validValue); - } - } - } - /// /// Color field. /// diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/IVolumeDebugSettings.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/IVolumeDebugSettings.cs index 249729ed379..6f60a5bfcfb 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/IVolumeDebugSettings.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/IVolumeDebugSettings.cs @@ -7,6 +7,7 @@ namespace UnityEngine.Rendering /// Volume debug settings. /// This variant is obsolete and kept only for not breaking user code. Use for all new usage. /// + [Obsolete("This is not longer supported Please use DebugDisplaySettingsVolume. #from(6000.2)", false)] public interface IVolumeDebugSettings { /// Selected component. @@ -65,7 +66,7 @@ public interface IVolumeDebugSettings /// Volume debug settings. /// #pragma warning disable CS0618 // Type or member is obsolete - [Obsolete("This variant is obsolete and kept only for not breaking user code. Use IVolumeDebugSettings instead. #from(23.2) (UnityUpgradable) -> IVolumeDebugSettings", false)] + [Obsolete("This is not longer supported Please use DebugDisplaySettingsVolume. #from(6000.2)", false)] public interface IVolumeDebugSettings2 : IVolumeDebugSettings #pragma warning restore CS0618 // Type or member is obsolete diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerContainer.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerContainer.cs index 5b080933d4a..1f8a2c13921 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerContainer.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerContainer.cs @@ -57,8 +57,7 @@ List GetActiveChildren() if (!t.gameObject.activeInHierarchy) continue; - var c = t.GetComponent(); - if (c != null) + if (t.TryGetComponent(out var c)) list.Add(c); } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerObject.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerObject.cs index f58514e300a..06e68f35d3a 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerObject.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerObject.cs @@ -16,8 +16,10 @@ internal override void SetWidget(DebugUI.Widget widget) { base.SetWidget(widget); var field = CastWidget(); + nameLabel.text = field.displayName; - valueLabel.text = field.GetValue().name; + var obj = field.GetValue(); + valueLabel.text = obj != null ? obj.name : "None"; } /// diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerObjectPopupField.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerObjectPopupField.cs index 649f67279a1..d884fd80639 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerObjectPopupField.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerObjectPopupField.cs @@ -29,7 +29,7 @@ private void ChangeSelectedObject() return; var elementsArray = elements.ToArray(); - var count = elementsArray.Count(); + var count = elementsArray.Length; if (m_Index >= count) { diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerRenderingLayerField.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerRenderingLayerField.cs new file mode 100644 index 00000000000..7516c5811cb --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerRenderingLayerField.cs @@ -0,0 +1,152 @@ +using System.Collections.Generic; +using UnityEngine.Assertions; +using UnityEngine.UI; + +namespace UnityEngine.Rendering.UI +{ + /// + /// DebugUIHandler for RenderingLayerField widget. + /// + public class DebugUIHandlerRenderingLayerField : DebugUIHandlerWidget + { + /// Name of the widget. + public Text nameLabel; + /// Value toggle. + public UIFoldout valueToggle; + + /// Toggles for the RenderingLayerField. + public List toggles; + + DebugUI.RenderingLayerField m_Field; + DebugUIHandlerContainer m_Container; + + internal override void SetWidget(DebugUI.Widget widget) + { + base.SetWidget(widget); + m_Field = CastWidget(); + m_Container = GetComponent(); + nameLabel.text = m_Field.displayName; + + int toggleIndex = 0; + var count = m_Field.renderingLayersNames.Length - 1; + foreach (var layerName in m_Field.renderingLayersNames) + { + if (toggleIndex >= toggles.Count) + continue; + + var toggle = toggles[toggleIndex]; + toggle.getter = GetValue; + toggle.setter = SetValue; + toggle.nextUIHandler = toggleIndex < count ? toggles[toggleIndex + 1] : null; + toggle.previousUIHandler = toggleIndex > 0 ? toggles[toggleIndex - 1] : null; + toggle.parentUIHandler = this; + toggle.index = toggleIndex; + toggle.nameLabel.text = layerName; + toggle.Init(); + toggleIndex++; + } + + // Destroy the remaining toggles outside of the range of the displayed enum. + for (; toggleIndex < toggles.Count; ++toggleIndex) + { + CoreUtils.Destroy(toggles[toggleIndex].gameObject); + toggles[toggleIndex] = null; + } + } + + bool GetValue(int index) + { + var mask = m_Field.GetValue(); + return (mask & (1u << index)) != 0; + } + + void SetValue(int index, bool value) + { + var mask = m_Field.GetValue(); + if (value) + mask |= 1 << index; + else + mask &= ~(1 << index); + m_Field.SetValue(mask); + } + + /// + /// OnSelection implementation. + /// + /// True if the selection wrapped around. + /// Previous widget. + /// True if the selection is allowed. + public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous) + { + if (fromNext || valueToggle.isOn == false) + { + nameLabel.color = colorSelected; + } + else if (valueToggle.isOn) + { + if (m_Container.IsDirectChild(previous)) + { + nameLabel.color = colorSelected; + } + else + { + var lastItem = m_Container.GetLastItem(); + DebugManager.instance.ChangeSelection(lastItem, false); + } + } + + return true; + } + + /// + /// OnDeselection implementation. + /// + public override void OnDeselection() + { + nameLabel.color = colorDefault; + } + + /// + /// OnIncrement implementation. + /// + /// True if incrementing fast. + public override void OnIncrement(bool fast) + { + valueToggle.isOn = true; + } + + /// + /// OnDecrement implementation. + /// + /// Trye if decrementing fast. + public override void OnDecrement(bool fast) + { + valueToggle.isOn = false; + } + + /// + /// OnAction implementation. + /// + public override void OnAction() + { + valueToggle.isOn = !valueToggle.isOn; + } + + /// + /// Next implementation. + /// + /// Next widget UI handler, parent if there is none. + public override DebugUIHandlerWidget Next() + { + if (!valueToggle.isOn || m_Container == null) + return base.Next(); + + var firstChild = m_Container.GetFirstItem(); + + if (firstChild == null) + return base.Next(); + + return firstChild; + } + } +} diff --git a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewRendererFeatureDropdownItem.cs.meta b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerRenderingLayerField.cs.meta similarity index 83% rename from Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewRendererFeatureDropdownItem.cs.meta rename to Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerRenderingLayerField.cs.meta index 4dfee44eae3..600e05f1b49 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewRendererFeatureDropdownItem.cs.meta +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerRenderingLayerField.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1287deb3e25a9af409ca6c1d046ca981 +guid: ea44ef5968bb44a48b7855c36dae02c4 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerRow.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerRow.cs index 9c19dc1ae06..72afa20210d 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerRow.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerRow.cs @@ -42,7 +42,7 @@ bool TryGetChild(int index, out GameObject child) bool IsActive(DebugUI.Table table, int index, GameObject child) { - if (!table.GetColumnVisibility(index)) + if (table == null || !table.GetColumnVisibility(index)) return false; var valueChild = child.transform.Find("Value"); diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerWidget.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerWidget.cs index 3b34da029c0..567cbecb3a1 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerWidget.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Scripts/DebugUIHandlerWidget.cs @@ -109,13 +109,7 @@ public virtual void OnDecrement(bool fast) { } /// Previous widget UI handler, parent if there is none. public virtual DebugUIHandlerWidget Previous() { - if (previousUIHandler != null) - return previousUIHandler; - - if (parentUIHandler != null) - return parentUIHandler; - - return null; + return previousUIHandler != null ? previousUIHandler : parentUIHandler; } /// diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUIHandlerRenderingLayerField.prefab b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUIHandlerRenderingLayerField.prefab new file mode 100644 index 00000000000..f75ebd752cf --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUIHandlerRenderingLayerField.prefab @@ -0,0 +1,12455 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &74822769193199464 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1958888752443160004} + - component: {fileID: 6679106303399258962} + - component: {fileID: 5050348896946348867} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1958888752443160004 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 74822769193199464} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8356148564785885022} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6679106303399258962 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 74822769193199464} + m_CullTransparentMesh: 0 +--- !u!114 &5050348896946348867 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 74822769193199464} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &198308496328705422 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7290923337117366102} + - component: {fileID: 8069964854434385667} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7290923337117366102 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 198308496328705422} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6075760728334120815} + m_Father: {fileID: 3747482945603663964} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &8069964854434385667 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 198308496328705422} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2700416459006292345} + toggleTransition: 1 + graphic: {fileID: 5802453145572142467} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &210585996295577721 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5983516410954562191} + - component: {fileID: 2707655605294999502} + - component: {fileID: 4746959147978535488} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5983516410954562191 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 210585996295577721} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5833546809406971014} + m_Father: {fileID: 3807659439045052884} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2707655605294999502 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 210585996295577721} + m_CullTransparentMesh: 0 +--- !u!114 &4746959147978535488 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 210585996295577721} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &235513122320341711 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1483444589931372990} + - component: {fileID: 1448067562088378152} + - component: {fileID: 3439658608168239967} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1483444589931372990 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 235513122320341711} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3626888406440555363} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &1448067562088378152 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 235513122320341711} + m_CullTransparentMesh: 0 +--- !u!114 &3439658608168239967 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 235513122320341711} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &246970216348187374 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8356148564785885022} + - component: {fileID: 2749009075916353680} + - component: {fileID: 5002250424606232238} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8356148564785885022 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 246970216348187374} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1958888752443160004} + m_Father: {fileID: 1670263807047702912} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2749009075916353680 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 246970216348187374} + m_CullTransparentMesh: 0 +--- !u!114 &5002250424606232238 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 246970216348187374} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &273425814977816694 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4976284874825399851} + - component: {fileID: 3545676079014388947} + - component: {fileID: 1546348349704106882} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4976284874825399851 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 273425814977816694} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1425864700568453755} + m_Father: {fileID: 7432866224741430686} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3545676079014388947 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 273425814977816694} + m_CullTransparentMesh: 0 +--- !u!114 &1546348349704106882 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 273425814977816694} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &292985107547532810 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1425864700568453755} + - component: {fileID: 8941389240832981586} + - component: {fileID: 4957790091271580714} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1425864700568453755 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 292985107547532810} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4976284874825399851} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8941389240832981586 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 292985107547532810} + m_CullTransparentMesh: 0 +--- !u!114 &4957790091271580714 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 292985107547532810} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &460735431326532047 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1904428486749382773} + - component: {fileID: 9003751344240168844} + m_Layer: 5 + m_Name: DebugUI Toggle 22 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1904428486749382773 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 460735431326532047} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3141594381208770657} + - {fileID: 6353858620915095577} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &9003751344240168844 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 460735431326532047} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 2284996109865033884} + valueToggle: {fileID: 3456792024118400511} + checkmarkImage: {fileID: 9060318935775576703} +--- !u!1 &600368409436158652 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8557170861926017448} + - component: {fileID: 930171243308949994} + - component: {fileID: 3955374361418223195} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8557170861926017448 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 600368409436158652} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5001324386341305675} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &930171243308949994 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 600368409436158652} + m_CullTransparentMesh: 0 +--- !u!114 &3955374361418223195 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 600368409436158652} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &789524568955009124 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4787045164725599468} + - component: {fileID: 5387021893471557754} + - component: {fileID: 8019534688361173590} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4787045164725599468 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 789524568955009124} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7597631521775465986} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5387021893471557754 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 789524568955009124} + m_CullTransparentMesh: 0 +--- !u!114 &8019534688361173590 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 789524568955009124} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &904359353859202414 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3769025729730033565} + - component: {fileID: 8271676633369491976} + - component: {fileID: 7083163093166539205} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3769025729730033565 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 904359353859202414} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1143708577816669107} + m_Father: {fileID: 7380185792925235767} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8271676633369491976 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 904359353859202414} + m_CullTransparentMesh: 0 +--- !u!114 &7083163093166539205 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 904359353859202414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &1255721778690630820 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1850453015581534804} + - component: {fileID: 5989295061535193187} + - component: {fileID: 6701717425365996163} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1850453015581534804 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1255721778690630820} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8643262011863657182} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &5989295061535193187 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1255721778690630820} + m_CullTransparentMesh: 0 +--- !u!114 &6701717425365996163 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1255721778690630820} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &1257738450584450071 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2748700044399894202} + - component: {fileID: 4493443016418537037} + - component: {fileID: 3530406180247266972} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2748700044399894202 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1257738450584450071} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3002137670299042156} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &4493443016418537037 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1257738450584450071} + m_CullTransparentMesh: 0 +--- !u!114 &3530406180247266972 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1257738450584450071} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &1337984993859421813 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3160084798452651386} + - component: {fileID: 485236091688378859} + - component: {fileID: 8209430775002992777} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3160084798452651386 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1337984993859421813} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 428045328721135137} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &485236091688378859 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1337984993859421813} + m_CullTransparentMesh: 0 +--- !u!114 &8209430775002992777 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1337984993859421813} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &1377925216867464122 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2314514058934025060} + - component: {fileID: 9179246579421883796} + - component: {fileID: 1050381230042893636} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2314514058934025060 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1377925216867464122} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4199920854957040706} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &9179246579421883796 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1377925216867464122} + m_CullTransparentMesh: 0 +--- !u!114 &1050381230042893636 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1377925216867464122} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &1383658768669401416 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2590341387017464519} + - component: {fileID: 7090020572617868160} + m_Layer: 5 + m_Name: DebugUI Toggle 28 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2590341387017464519 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1383658768669401416} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3916575158388844691} + - {fileID: 1698301253758164178} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &7090020572617868160 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1383658768669401416} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 1736220021016928009} + valueToggle: {fileID: 5352515433852677119} + checkmarkImage: {fileID: 4818644045601654872} +--- !u!1 &1401422664981114516 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1994050603111272669} + - component: {fileID: 7150958925909432444} + - component: {fileID: 1133652755111259454} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1994050603111272669 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1401422664981114516} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8625410696850161855} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &7150958925909432444 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1401422664981114516} + m_CullTransparentMesh: 0 +--- !u!114 &1133652755111259454 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1401422664981114516} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &1408560429885557106 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6386133981247227809} + - component: {fileID: 2451434126944430322} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6386133981247227809 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1408560429885557106} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8351659506645333476} + m_Father: {fileID: 3954105840611946110} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2451434126944430322 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1408560429885557106} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4755971768771506769} + toggleTransition: 1 + graphic: {fileID: 8599129644269611419} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &1454308972692154975 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5154472422670747833} + - component: {fileID: 4353645496875133955} + - component: {fileID: 4818644045601654872} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5154472422670747833 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1454308972692154975} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1185291142442617761} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4353645496875133955 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1454308972692154975} + m_CullTransparentMesh: 0 +--- !u!114 &4818644045601654872 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1454308972692154975} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &1486507231905896618 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 958809557181456115} + - component: {fileID: 5378385216208721069} + - component: {fileID: 5432711013158779192} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &958809557181456115 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1486507231905896618} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3803781275079323733} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &5378385216208721069 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1486507231905896618} + m_CullTransparentMesh: 0 +--- !u!114 &5432711013158779192 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1486507231905896618} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &1512534620145188899 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6667855967321245346} + - component: {fileID: 5904973363994399480} + - component: {fileID: 164768344116107986} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6667855967321245346 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1512534620145188899} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1071186331609494896} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &5904973363994399480 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1512534620145188899} + m_CullTransparentMesh: 0 +--- !u!114 &164768344116107986 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1512534620145188899} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &1519841233505932146 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2075241552360254502} + - component: {fileID: 8562085848866449756} + m_Layer: 5 + m_Name: DebugUI Toggle 17 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2075241552360254502 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1519841233505932146} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8235471640864529742} + - {fileID: 7432866224741430686} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &8562085848866449756 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1519841233505932146} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 7954571544824238787} + valueToggle: {fileID: 2405871519029774392} + checkmarkImage: {fileID: 4957790091271580714} +--- !u!1 &1805931634763419227 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8429224242260680381} + - component: {fileID: 3660393548531142813} + - component: {fileID: 5654365300560118476} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8429224242260680381 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1805931634763419227} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2759500403880505928} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &3660393548531142813 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1805931634763419227} + m_CullTransparentMesh: 0 +--- !u!114 &5654365300560118476 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1805931634763419227} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &1841768535940055272 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1237372008052714286} + - component: {fileID: 8189617005992343066} + - component: {fileID: 4128875111787400469} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1237372008052714286 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1841768535940055272} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3954105840611946110} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &8189617005992343066 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1841768535940055272} + m_CullTransparentMesh: 0 +--- !u!114 &4128875111787400469 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1841768535940055272} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &1892104052310373591 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 800688055469850145} + - component: {fileID: 6391126850643013647} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &800688055469850145 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1892104052310373591} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5283382075449741548} + m_Father: {fileID: 8643262011863657182} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &6391126850643013647 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1892104052310373591} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 3792906712613004423} + toggleTransition: 1 + graphic: {fileID: 5356581191142619947} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &1912957997510059643 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1914011185745597247} + - component: {fileID: 3243688633497074117} + - component: {fileID: 4324276223801582212} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1914011185745597247 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1912957997510059643} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4880028377363535173} + m_Father: {fileID: 9157722414083985858} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3243688633497074117 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1912957997510059643} + m_CullTransparentMesh: 0 +--- !u!114 &4324276223801582212 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1912957997510059643} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &1938792781808105035 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5369190403499271288} + - component: {fileID: 2958440384749385630} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5369190403499271288 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1938792781808105035} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7956694805050852688} + m_Father: {fileID: 7816446078609134115} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2958440384749385630 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1938792781808105035} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4189231263243852722} + toggleTransition: 1 + graphic: {fileID: 9162012530475593324} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &1971118125168773045 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1698301253758164178} + - component: {fileID: 5352515433852677119} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1698301253758164178 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971118125168773045} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1185291142442617761} + m_Father: {fileID: 2590341387017464519} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &5352515433852677119 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1971118125168773045} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 6797895232316676442} + toggleTransition: 1 + graphic: {fileID: 4818644045601654872} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &2067454400387581445 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3747482945603663964} + - component: {fileID: 6537490383020632609} + m_Layer: 5 + m_Name: DebugUI Toggle 13 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3747482945603663964 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2067454400387581445} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8233626477581283555} + - {fileID: 7290923337117366102} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &6537490383020632609 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2067454400387581445} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 4427599279144680947} + valueToggle: {fileID: 8069964854434385667} + checkmarkImage: {fileID: 5802453145572142467} +--- !u!1 &2067722791479922788 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5647913056700805355} + - component: {fileID: 5078048544661078628} + - component: {fileID: 7875341202550150707} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5647913056700805355 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2067722791479922788} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2652713077043660966} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &5078048544661078628 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2067722791479922788} + m_CullTransparentMesh: 0 +--- !u!114 &7875341202550150707 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2067722791479922788} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &2073291026924378913 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1189216680378437486} + - component: {fileID: 1217054267639125318} + - component: {fileID: 7495417191435204136} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1189216680378437486 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2073291026924378913} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1544810510454982857} + m_Father: {fileID: 7954316942891746433} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1217054267639125318 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2073291026924378913} + m_CullTransparentMesh: 0 +--- !u!114 &7495417191435204136 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2073291026924378913} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2086480278583842799 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2451940126815751474} + - component: {fileID: 6087187633097608169} + m_Layer: 5 + m_Name: DebugUI Toggle 24 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2451940126815751474 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2086480278583842799} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6697593953020889603} + - {fileID: 4086772113621016208} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &6087187633097608169 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2086480278583842799} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 4846740409493721984} + valueToggle: {fileID: 970757129289726534} + checkmarkImage: {fileID: 6029727342443417148} +--- !u!1 &2110357719490854994 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3612299115344139013} + - component: {fileID: 5687218474045752718} + - component: {fileID: 5811605465015081675} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3612299115344139013 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2110357719490854994} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8558628789733519512} + m_Father: {fileID: 8413373871896021635} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5687218474045752718 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2110357719490854994} + m_CullTransparentMesh: 0 +--- !u!114 &5811605465015081675 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2110357719490854994} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2129180063755082928 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3803781275079323733} + - component: {fileID: 7493564373867626443} + m_Layer: 5 + m_Name: DebugUI Toggle 6 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3803781275079323733 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2129180063755082928} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 958809557181456115} + - {fileID: 6644699419958076397} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &7493564373867626443 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2129180063755082928} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 5432711013158779192} + valueToggle: {fileID: 147858285169255864} + checkmarkImage: {fileID: 4127528762848208377} +--- !u!1 &2207389410027094222 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3737111891372312802} + - component: {fileID: 2037913533698422136} + - component: {fileID: 1701711077839953596} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3737111891372312802 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2207389410027094222} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 319426443455914023} + m_Father: {fileID: 906931124344334618} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2037913533698422136 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2207389410027094222} + m_CullTransparentMesh: 0 +--- !u!114 &1701711077839953596 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2207389410027094222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2210364538776165098 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5076517029326469307} + - component: {fileID: 953415876542653751} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5076517029326469307 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2210364538776165098} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 428045328721135137} + m_Father: {fileID: 5081734458789119777} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &953415876542653751 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2210364538776165098} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 8813570217460717391} + toggleTransition: 1 + graphic: {fileID: 8209430775002992777} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &2260129634959441134 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 791520587265625091} + - component: {fileID: 4607543735610172353} + - component: {fileID: 5356581191142619947} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &791520587265625091 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2260129634959441134} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5283382075449741548} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4607543735610172353 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2260129634959441134} + m_CullTransparentMesh: 0 +--- !u!114 &5356581191142619947 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2260129634959441134} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2312190080207680053 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5283382075449741548} + - component: {fileID: 6899205371889111843} + - component: {fileID: 3792906712613004423} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5283382075449741548 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2312190080207680053} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 791520587265625091} + m_Father: {fileID: 800688055469850145} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6899205371889111843 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2312190080207680053} + m_CullTransparentMesh: 0 +--- !u!114 &3792906712613004423 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2312190080207680053} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2320641401228566767 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7388519436634992578} + - component: {fileID: 1196526696592632852} + - component: {fileID: 5067439095481778869} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7388519436634992578 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2320641401228566767} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2069466459521621409} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1196526696592632852 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2320641401228566767} + m_CullTransparentMesh: 0 +--- !u!114 &5067439095481778869 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2320641401228566767} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2405211379384313265 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7361462984932131187} + - component: {fileID: 3269991560789098383} + - component: {fileID: 8683242940989415304} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7361462984932131187 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2405211379384313265} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3110659917968075140} + m_Father: {fileID: 1763134690699169346} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3269991560789098383 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2405211379384313265} + m_CullTransparentMesh: 0 +--- !u!114 &8683242940989415304 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2405211379384313265} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2472766322376748401 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6546067790357044605} + - component: {fileID: 3251042231684009560} + - component: {fileID: 4755439529892379193} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6546067790357044605 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2472766322376748401} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4894700207822734448} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3251042231684009560 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2472766322376748401} + m_CullTransparentMesh: 0 +--- !u!114 &4755439529892379193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2472766322376748401} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2528115446453954515 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7508261725234730334} + - component: {fileID: 4251434431392806875} + - component: {fileID: 6982057837895959611} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7508261725234730334 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2528115446453954515} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8995314096000718896} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4251434431392806875 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2528115446453954515} + m_CullTransparentMesh: 0 +--- !u!114 &6982057837895959611 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2528115446453954515} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2656729411710343347 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1670263807047702912} + - component: {fileID: 1441446908436994080} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1670263807047702912 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2656729411710343347} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8356148564785885022} + m_Father: {fileID: 4761151331139786934} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1441446908436994080 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2656729411710343347} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 5002250424606232238} + toggleTransition: 1 + graphic: {fileID: 5050348896946348867} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &2735537141019569035 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1064151588746797128} + - component: {fileID: 5415619581143717901} + - component: {fileID: 8599129644269611419} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1064151588746797128 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2735537141019569035} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8351659506645333476} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5415619581143717901 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2735537141019569035} + m_CullTransparentMesh: 0 +--- !u!114 &8599129644269611419 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2735537141019569035} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2756405507098548097 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4086772113621016208} + - component: {fileID: 970757129289726534} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4086772113621016208 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2756405507098548097} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 591433198773945814} + m_Father: {fileID: 2451940126815751474} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &970757129289726534 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2756405507098548097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1681414707425253133} + toggleTransition: 1 + graphic: {fileID: 6029727342443417148} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &2797151631749506656 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5124529111177426770} + - component: {fileID: 5568758194233421245} + - component: {fileID: 2270273949667200229} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5124529111177426770 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2797151631749506656} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3680364213637305159} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &5568758194233421245 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2797151631749506656} + m_CullTransparentMesh: 0 +--- !u!114 &2270273949667200229 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2797151631749506656} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &2985614219956721450 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6551000627649811944} + - component: {fileID: 7462788929612166242} + - component: {fileID: 8907934119334727340} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6551000627649811944 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2985614219956721450} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2336108770712772099} + m_Father: {fileID: 1869528527587065075} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7462788929612166242 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2985614219956721450} + m_CullTransparentMesh: 0 +--- !u!114 &8907934119334727340 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2985614219956721450} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3171115851903540441 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7954316942891746433} + - component: {fileID: 2258849323521112219} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7954316942891746433 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3171115851903540441} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1189216680378437486} + m_Father: {fileID: 8818044284439774689} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2258849323521112219 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3171115851903540441} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 7495417191435204136} + toggleTransition: 1 + graphic: {fileID: 888460402368909444} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &3204111589982867630 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1544810510454982857} + - component: {fileID: 7980649047932582416} + - component: {fileID: 888460402368909444} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1544810510454982857 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3204111589982867630} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1189216680378437486} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7980649047932582416 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3204111589982867630} + m_CullTransparentMesh: 0 +--- !u!114 &888460402368909444 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3204111589982867630} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3239541957581880198 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1568876051421469522} + - component: {fileID: 6393270941446573718} + - component: {fileID: 7069956242290131492} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1568876051421469522 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3239541957581880198} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4295031112077750847} + m_Father: {fileID: 5941713586452052334} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6393270941446573718 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3239541957581880198} + m_CullTransparentMesh: 0 +--- !u!114 &7069956242290131492 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3239541957581880198} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3308387163373142073 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7956694805050852688} + - component: {fileID: 3660989855823199432} + - component: {fileID: 4189231263243852722} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7956694805050852688 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3308387163373142073} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3774037929180827509} + m_Father: {fileID: 5369190403499271288} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3660989855823199432 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3308387163373142073} + m_CullTransparentMesh: 0 +--- !u!114 &4189231263243852722 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3308387163373142073} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3315913571245561063 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3774037929180827509} + - component: {fileID: 3804283252385965860} + - component: {fileID: 9162012530475593324} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3774037929180827509 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3315913571245561063} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7956694805050852688} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3804283252385965860 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3315913571245561063} + m_CullTransparentMesh: 0 +--- !u!114 &9162012530475593324 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3315913571245561063} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3368454694728957684 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6644699419958076397} + - component: {fileID: 147858285169255864} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6644699419958076397 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3368454694728957684} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2567792433006010677} + m_Father: {fileID: 3803781275079323733} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &147858285169255864 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3368454694728957684} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 6640962838804556285} + toggleTransition: 1 + graphic: {fileID: 4127528762848208377} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &3369459815916386821 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7464475961458692551} + - component: {fileID: 2163830951127551774} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7464475961458692551 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3369459815916386821} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5001324386341305675} + m_Father: {fileID: 8625410696850161855} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2163830951127551774 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3369459815916386821} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 6925205396671069} + toggleTransition: 1 + graphic: {fileID: 3955374361418223195} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &3374982763725671149 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 699944379274011391} + - component: {fileID: 4982503990233528976} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &699944379274011391 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3374982763725671149} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4894700207822734448} + m_Father: {fileID: 2652713077043660966} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &4982503990233528976 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3374982763725671149} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 5624070143109776842} + toggleTransition: 1 + graphic: {fileID: 4755439529892379193} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &3384862175355358611 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3954105840611946110} + - component: {fileID: 1510212987001653101} + m_Layer: 5 + m_Name: DebugUI Toggle 4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3954105840611946110 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3384862175355358611} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1237372008052714286} + - {fileID: 6386133981247227809} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1510212987001653101 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3384862175355358611} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 4128875111787400469} + valueToggle: {fileID: 2451434126944430322} + checkmarkImage: {fileID: 8599129644269611419} +--- !u!1 &3428755322359797045 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7380185792925235767} + - component: {fileID: 8590323334709990305} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7380185792925235767 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3428755322359797045} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3769025729730033565} + m_Father: {fileID: 3002137670299042156} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &8590323334709990305 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3428755322359797045} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 7083163093166539205} + toggleTransition: 1 + graphic: {fileID: 7629182826719062560} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &3516696314699177012 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8654207302046996467} + - component: {fileID: 3282158458090981443} + m_Layer: 5 + m_Name: DebugUI Toggle 3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8654207302046996467 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3516696314699177012} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 49982278915739227} + - {fileID: 4397487224462890380} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3282158458090981443 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3516696314699177012} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 2720401729764849792} + valueToggle: {fileID: 7118092976832869884} + checkmarkImage: {fileID: 4899798569211387073} +--- !u!1 &3569379677769956627 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7816446078609134115} + - component: {fileID: 7448835212396526773} + m_Layer: 5 + m_Name: DebugUI Toggle 9 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7816446078609134115 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3569379677769956627} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2531124078508228213} + - {fileID: 5369190403499271288} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &7448835212396526773 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3569379677769956627} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 7700455392299810905} + valueToggle: {fileID: 2958440384749385630} + checkmarkImage: {fileID: 9162012530475593324} +--- !u!1 &3571443757009416159 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3642279660512588141} + - component: {fileID: 3639759082769292463} + - component: {fileID: 3459723882786048853} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3642279660512588141 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3571443757009416159} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3641684792875398575} + m_Father: {fileID: 3641221951591520489} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3639759082769292463 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3571443757009416159} + m_CullTransparentMesh: 0 +--- !u!114 &3459723882786048853 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3571443757009416159} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3571527177030264211 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3641221951591520489} + - component: {fileID: 3462889519718661877} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3641221951591520489 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3571527177030264211} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3642279660512588141} + m_Father: {fileID: 3641905530822378611} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3462889519718661877 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3571527177030264211} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 3459723882786048853} + toggleTransition: 1 + graphic: {fileID: 3459027866663724429} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &3572023702122751751 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3641174431038411831} + - component: {fileID: 3639509330965081415} + - component: {fileID: 3459080543867973199} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3641174431038411831 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3572023702122751751} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3641905530822378611} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &3639509330965081415 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3572023702122751751} + m_CullTransparentMesh: 0 +--- !u!114 &3459080543867973199 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3572023702122751751} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &3572471841810415943 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3641905530822378611} + - component: {fileID: 3572471841810415940} + m_Layer: 5 + m_Name: DebugUI Toggle 0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3641905530822378611 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3572471841810415943} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3641174431038411831} + - {fileID: 3641221951591520489} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -13} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3572471841810415940 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3572471841810415943} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 3459080543867973199} + valueToggle: {fileID: 3462889519718661877} + checkmarkImage: {fileID: 3459027866663724429} +--- !u!1 &3572808593452157577 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3641684792875398575} + - component: {fileID: 3639164083858556819} + - component: {fileID: 3459027866663724429} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3641684792875398575 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3572808593452157577} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3642279660512588141} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3639164083858556819 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3572808593452157577} + m_CullTransparentMesh: 0 +--- !u!114 &3459027866663724429 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3572808593452157577} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3585643264467902480 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4894700207822734448} + - component: {fileID: 5095661899487818905} + - component: {fileID: 5624070143109776842} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4894700207822734448 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3585643264467902480} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6546067790357044605} + m_Father: {fileID: 699944379274011391} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5095661899487818905 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3585643264467902480} + m_CullTransparentMesh: 0 +--- !u!114 &5624070143109776842 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3585643264467902480} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3631579074025567380 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3141594381208770657} + - component: {fileID: 9014116387579602363} + - component: {fileID: 2284996109865033884} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3141594381208770657 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3631579074025567380} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1904428486749382773} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &9014116387579602363 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3631579074025567380} + m_CullTransparentMesh: 0 +--- !u!114 &2284996109865033884 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3631579074025567380} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &3645164844498060459 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8413373871896021635} + - component: {fileID: 7471413337957999450} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8413373871896021635 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3645164844498060459} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3612299115344139013} + m_Father: {fileID: 2759500403880505928} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &7471413337957999450 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3645164844498060459} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 5811605465015081675} + toggleTransition: 1 + graphic: {fileID: 4289623129001525722} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &3657568049055452192 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8558628789733519512} + - component: {fileID: 5209445438387244003} + - component: {fileID: 4289623129001525722} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8558628789733519512 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3657568049055452192} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3612299115344139013} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5209445438387244003 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3657568049055452192} + m_CullTransparentMesh: 0 +--- !u!114 &4289623129001525722 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3657568049055452192} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3712882999369957480 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1143708577816669107} + - component: {fileID: 6245370273393918545} + - component: {fileID: 7629182826719062560} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1143708577816669107 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3712882999369957480} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3769025729730033565} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6245370273393918545 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3712882999369957480} + m_CullTransparentMesh: 0 +--- !u!114 &7629182826719062560 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3712882999369957480} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3765212742840115414 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4880028377363535173} + - component: {fileID: 1706073112578242183} + - component: {fileID: 7322248292256421261} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4880028377363535173 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3765212742840115414} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1914011185745597247} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1706073112578242183 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3765212742840115414} + m_CullTransparentMesh: 0 +--- !u!114 &7322248292256421261 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3765212742840115414} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &3880431613689876023 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7399658697125515523} + - component: {fileID: 2309084006960021099} + m_Layer: 5 + m_Name: DebugUI Toggle 25 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7399658697125515523 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3880431613689876023} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1221176923530238434} + - {fileID: 1869528527587065075} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2309084006960021099 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3880431613689876023} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 5102590157774239751} + valueToggle: {fileID: 8562629198898424411} + checkmarkImage: {fileID: 5177354320781382892} +--- !u!1 &3884623341178589105 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4263894447749242993} + - component: {fileID: 5756384988777549420} + - component: {fileID: 6243446961833559651} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4263894447749242993 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3884623341178589105} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4157811473205521841} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &5756384988777549420 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3884623341178589105} + m_CullTransparentMesh: 0 +--- !u!114 &6243446961833559651 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3884623341178589105} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &3941629718707521949 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6667778054025323136} + - component: {fileID: 2456697693204756471} + - component: {fileID: 3659922831755168663} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6667778054025323136 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3941629718707521949} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1133780997644914158} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &2456697693204756471 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3941629718707521949} + m_CullTransparentMesh: 0 +--- !u!114 &3659922831755168663 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3941629718707521949} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &4027286663159150654 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6445334109479971278} + - component: {fileID: 8058732095134162664} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6445334109479971278 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4027286663159150654} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8573571124664108074} + m_Father: {fileID: 9173084524125034988} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &8058732095134162664 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4027286663159150654} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4482108447807922650} + toggleTransition: 1 + graphic: {fileID: 962910717536914882} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &4037875838780246769 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8818044284439774689} + - component: {fileID: 8114663146547476803} + m_Layer: 5 + m_Name: DebugUI Toggle 11 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8818044284439774689 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4037875838780246769} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 9026513043517260611} + - {fileID: 7954316942891746433} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &8114663146547476803 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4037875838780246769} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 8196305987243256177} + valueToggle: {fileID: 2258849323521112219} + checkmarkImage: {fileID: 888460402368909444} +--- !u!1 &4079825732997906742 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6353858620915095577} + - component: {fileID: 3456792024118400511} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6353858620915095577 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4079825732997906742} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6341387859349373114} + m_Father: {fileID: 1904428486749382773} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3456792024118400511 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4079825732997906742} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4830864563684941362} + toggleTransition: 1 + graphic: {fileID: 9060318935775576703} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &4113300208803229572 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4278529981198013852} + - component: {fileID: 8694217767465827808} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4278529981198013852 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4113300208803229572} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7198286586904223138} + m_Father: {fileID: 4199920854957040706} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &8694217767465827808 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4113300208803229572} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 785927379557597115} + toggleTransition: 1 + graphic: {fileID: 8002195202206546742} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &4115723969835415551 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1763134690699169346} + - component: {fileID: 3776545304459646159} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1763134690699169346 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4115723969835415551} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7361462984932131187} + m_Father: {fileID: 1133780997644914158} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3776545304459646159 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4115723969835415551} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 8683242940989415304} + toggleTransition: 1 + graphic: {fileID: 7141046430449178186} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &4136008973788615843 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6520704134104925015} + - component: {fileID: 1702414852724651410} + m_Layer: 5 + m_Name: DebugUI Toggle 26 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6520704134104925015 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4136008973788615843} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4047548843005941320} + - {fileID: 5941713586452052334} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1702414852724651410 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4136008973788615843} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 4510461617772264124} + valueToggle: {fileID: 4787017756125165782} + checkmarkImage: {fileID: 332153022343275791} +--- !u!1 &4179571699095856206 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1185291142442617761} + - component: {fileID: 2313539819687221356} + - component: {fileID: 6797895232316676442} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1185291142442617761 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4179571699095856206} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5154472422670747833} + m_Father: {fileID: 1698301253758164178} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2313539819687221356 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4179571699095856206} + m_CullTransparentMesh: 0 +--- !u!114 &6797895232316676442 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4179571699095856206} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4254056818223299175 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3002137670299042156} + - component: {fileID: 7788606920463215453} + m_Layer: 5 + m_Name: DebugUI Toggle 18 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3002137670299042156 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4254056818223299175} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2748700044399894202} + - {fileID: 7380185792925235767} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &7788606920463215453 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4254056818223299175} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 3530406180247266972} + valueToggle: {fileID: 8590323334709990305} + checkmarkImage: {fileID: 7629182826719062560} +--- !u!1 &4329563734337181686 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1413563205384497702} + - component: {fileID: 7286666392514011208} + - component: {fileID: 4509044584000312710} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1413563205384497702 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4329563734337181686} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6872577016307684039} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7286666392514011208 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4329563734337181686} + m_CullTransparentMesh: 0 +--- !u!114 &4509044584000312710 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4329563734337181686} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4442289739500596448 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6697593953020889603} + - component: {fileID: 1135027492066294985} + - component: {fileID: 4846740409493721984} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6697593953020889603 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4442289739500596448} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2451940126815751474} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &1135027492066294985 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4442289739500596448} + m_CullTransparentMesh: 0 +--- !u!114 &4846740409493721984 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4442289739500596448} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &4595870184737454115 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 591433198773945814} + - component: {fileID: 6409064332323974544} + - component: {fileID: 1681414707425253133} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &591433198773945814 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4595870184737454115} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1299297123745915370} + m_Father: {fileID: 4086772113621016208} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6409064332323974544 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4595870184737454115} + m_CullTransparentMesh: 0 +--- !u!114 &1681414707425253133 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4595870184737454115} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4612880306164105923 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7413620405051575626} + - component: {fileID: 6285758457108715709} + - component: {fileID: 2165066025782384386} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7413620405051575626 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4612880306164105923} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3434169616513257095} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &6285758457108715709 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4612880306164105923} + m_CullTransparentMesh: 0 +--- !u!114 &2165066025782384386 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4612880306164105923} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &4639780946518862453 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6341387859349373114} + - component: {fileID: 3261218236385974570} + - component: {fileID: 4830864563684941362} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6341387859349373114 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4639780946518862453} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 213539999138786333} + m_Father: {fileID: 6353858620915095577} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3261218236385974570 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4639780946518862453} + m_CullTransparentMesh: 0 +--- !u!114 &4830864563684941362 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4639780946518862453} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4649577923568229521 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1299297123745915370} + - component: {fileID: 7678348437943295021} + - component: {fileID: 6029727342443417148} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1299297123745915370 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4649577923568229521} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 591433198773945814} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7678348437943295021 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4649577923568229521} + m_CullTransparentMesh: 0 +--- !u!114 &6029727342443417148 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4649577923568229521} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4849482690791000872 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6075760728334120815} + - component: {fileID: 3882171044134844897} + - component: {fileID: 2700416459006292345} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6075760728334120815 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4849482690791000872} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6493715579490047529} + m_Father: {fileID: 7290923337117366102} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3882171044134844897 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4849482690791000872} + m_CullTransparentMesh: 0 +--- !u!114 &2700416459006292345 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4849482690791000872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5014516996357532671 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5001324386341305675} + - component: {fileID: 185118308965006561} + - component: {fileID: 6925205396671069} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5001324386341305675 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5014516996357532671} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8557170861926017448} + m_Father: {fileID: 7464475961458692551} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &185118308965006561 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5014516996357532671} + m_CullTransparentMesh: 0 +--- !u!114 &6925205396671069 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5014516996357532671} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5041280086884305940 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8927555893094689660} + - component: {fileID: 3176317505229877131} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8927555893094689660 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5041280086884305940} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7461098207183238788} + m_Father: {fileID: 4817301142119688916} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3176317505229877131 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5041280086884305940} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2358232831280620294} + toggleTransition: 1 + graphic: {fileID: 2981323361707958040} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &5069726341249081048 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4047548843005941320} + - component: {fileID: 5397351996381731281} + - component: {fileID: 4510461617772264124} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4047548843005941320 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5069726341249081048} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6520704134104925015} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &5397351996381731281 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5069726341249081048} + m_CullTransparentMesh: 0 +--- !u!114 &4510461617772264124 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5069726341249081048} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &5130458670307175369 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3916575158388844691} + - component: {fileID: 6082500289769078190} + - component: {fileID: 1736220021016928009} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3916575158388844691 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5130458670307175369} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2590341387017464519} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &6082500289769078190 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5130458670307175369} + m_CullTransparentMesh: 0 +--- !u!114 &1736220021016928009 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5130458670307175369} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &5202510230799889004 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3626888406440555363} + - component: {fileID: 8180736816758371908} + m_Layer: 5 + m_Name: DebugUI Toggle 8 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3626888406440555363 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5202510230799889004} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1483444589931372990} + - {fileID: 9157722414083985858} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &8180736816758371908 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5202510230799889004} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 3439658608168239967} + valueToggle: {fileID: 2214193822323440039} + checkmarkImage: {fileID: 7322248292256421261} +--- !u!1 &5216377504156040801 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5927895885435220356} + - component: {fileID: 7966387800811379961} + - component: {fileID: 3496924685570888828} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5927895885435220356 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5216377504156040801} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4817301142119688916} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &7966387800811379961 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5216377504156040801} + m_CullTransparentMesh: 0 +--- !u!114 &3496924685570888828 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5216377504156040801} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &5267050426723971953 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5267050426723971950} + - component: {fileID: 5267050426723971948} + - component: {fileID: 5267050426723971951} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5267050426723971950 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050426723971953} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5267050428775862375} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5267050426723971948 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050426723971953} + m_CullTransparentMesh: 0 +--- !u!114 &5267050426723971951 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050426723971953} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5267050426938384531 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5267050426938384528} + - component: {fileID: 5267050426938384529} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5267050426938384528 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050426938384531} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5267050428775862375} + m_Father: {fileID: 5267050427034451046} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &5267050426938384529 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050426938384531} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 5267050428775862372} + toggleTransition: 1 + graphic: {fileID: 5267050426723971951} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &5267050427034451049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5267050427034451046} + - component: {fileID: 5267050427034451047} + m_Layer: 5 + m_Name: DebugUI Toggle 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5267050427034451046 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050427034451049} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5267050427060996203} + - {fileID: 5267050426938384528} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &5267050427034451047 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050427034451049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 5267050427060996200} + valueToggle: {fileID: 5267050426938384529} + checkmarkImage: {fileID: 5267050426723971951} +--- !u!1 &5267050427060996202 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5267050427060996203} + - component: {fileID: 5267050427060996201} + - component: {fileID: 5267050427060996200} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5267050427060996203 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050427060996202} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5267050427034451046} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &5267050427060996201 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050427060996202} + m_CullTransparentMesh: 0 +--- !u!114 &5267050427060996200 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050427060996202} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &5267050428775862374 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5267050428775862375} + - component: {fileID: 5267050428775862373} + - component: {fileID: 5267050428775862372} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5267050428775862375 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050428775862374} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5267050426723971950} + m_Father: {fileID: 5267050426938384528} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5267050428775862373 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050428775862374} + m_CullTransparentMesh: 0 +--- !u!114 &5267050428775862372 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5267050428775862374} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5462907878922134795 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2759500403880505928} + - component: {fileID: 8677530327100967840} + m_Layer: 5 + m_Name: DebugUI Toggle 27 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2759500403880505928 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5462907878922134795} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8429224242260680381} + - {fileID: 8413373871896021635} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &8677530327100967840 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5462907878922134795} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 5654365300560118476} + valueToggle: {fileID: 7471413337957999450} + checkmarkImage: {fileID: 4289623129001525722} +--- !u!1 &5483026217932215876 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 319426443455914023} + - component: {fileID: 2203183165023518730} + - component: {fileID: 1504294621800433182} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &319426443455914023 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5483026217932215876} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3737111891372312802} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2203183165023518730 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5483026217932215876} + m_CullTransparentMesh: 0 +--- !u!114 &1504294621800433182 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5483026217932215876} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5576049767558804990 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7792108644153214049} + - component: {fileID: 6296772535290834005} + - component: {fileID: 2353148834173414365} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7792108644153214049 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5576049767558804990} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7977966139789023458} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &6296772535290834005 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5576049767558804990} + m_CullTransparentMesh: 0 +--- !u!114 &2353148834173414365 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5576049767558804990} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &5661721680391056024 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2069466459521621409} + - component: {fileID: 1684022678578897709} + - component: {fileID: 8306564221555339770} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2069466459521621409 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5661721680391056024} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7388519436634992578} + m_Father: {fileID: 1471453698717655133} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1684022678578897709 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5661721680391056024} + m_CullTransparentMesh: 0 +--- !u!114 &8306564221555339770 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5661721680391056024} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5713211408484041554 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8235471640864529742} + - component: {fileID: 7780419505253050479} + - component: {fileID: 7954571544824238787} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8235471640864529742 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5713211408484041554} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2075241552360254502} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &7780419505253050479 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5713211408484041554} + m_CullTransparentMesh: 0 +--- !u!114 &7954571544824238787 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5713211408484041554} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &5750870979089988624 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2336108770712772099} + - component: {fileID: 967809402997970503} + - component: {fileID: 5177354320781382892} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2336108770712772099 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5750870979089988624} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6551000627649811944} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &967809402997970503 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5750870979089988624} + m_CullTransparentMesh: 0 +--- !u!114 &5177354320781382892 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5750870979089988624} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5801129305911044462 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4199920854957040706} + - component: {fileID: 3036984858544632144} + m_Layer: 5 + m_Name: DebugUI Toggle 15 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4199920854957040706 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5801129305911044462} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2314514058934025060} + - {fileID: 4278529981198013852} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3036984858544632144 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5801129305911044462} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 1050381230042893636} + valueToggle: {fileID: 8694217767465827808} + checkmarkImage: {fileID: 8002195202206546742} +--- !u!1 &5923712961749352638 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2542400616675058289} + - component: {fileID: 8748157484271708675} + - component: {fileID: 4127528762848208377} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2542400616675058289 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5923712961749352638} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2567792433006010677} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8748157484271708675 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5923712961749352638} + m_CullTransparentMesh: 0 +--- !u!114 &4127528762848208377 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5923712961749352638} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6047295618778324901 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5833403709247139747} + - component: {fileID: 5836198589662574527} + - component: {fileID: 5943836262754876151} + m_Layer: 5 + m_Name: Arrow Closed + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5833403709247139747 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047295618778324901} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5834238147341516467} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &5836198589662574527 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047295618778324901} + m_CullTransparentMesh: 0 +--- !u!114 &5943836262754876151 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047295618778324901} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 7a0568d5e3330b84687e307992be3030, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6047428593800107549 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5833894441773011497} + - component: {fileID: 5836132423617176489} + - component: {fileID: 5944573348398787477} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5833894441773011497 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047428593800107549} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5834238147341516467} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 10, y: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5836132423617176489 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047428593800107549} + m_CullTransparentMesh: 0 +--- !u!114 &5944573348398787477 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047428593800107549} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'BitField + +' +--- !u!1 &6047464508828073067 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5833912162122428113} + - component: {fileID: 5836418015764029031} + - component: {fileID: 5944727394572058481} + m_Layer: 5 + m_Name: Arrow Opened + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &5833912162122428113 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047464508828073067} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5834238147341516467} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &5836418015764029031 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047464508828073067} + m_CullTransparentMesh: 0 +--- !u!114 &5944727394572058481 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047464508828073067} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: a674720496c1ed248a5b7ea3e22a11fd, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6047609828951176373 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5834238147341516467} + - component: {fileID: 5943742358506384225} + m_Layer: 5 + m_Name: Header + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5834238147341516467 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047609828951176373} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5833912162122428113} + - {fileID: 5833403709247139747} + - {fileID: 5833894441773011497} + m_Father: {fileID: 5833802642077810669} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &5943742358506384225 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6047609828951176373} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e4786b5477cac0a42855b21fdaa2242f, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 0} + toggleTransition: 0 + graphic: {fileID: 0} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 0 + content: {fileID: 6048264713057143749} + arrowOpened: {fileID: 6047464508828073067} + arrowClosed: {fileID: 6047295618778324901} +--- !u!1 &6048035622621399599 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3110659917968075140} + - component: {fileID: 5134166864003699706} + - component: {fileID: 7141046430449178186} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3110659917968075140 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048035622621399599} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7361462984932131187} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5134166864003699706 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048035622621399599} + m_CullTransparentMesh: 0 +--- !u!114 &7141046430449178186 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048035622621399599} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6048135192916836887 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5833802642077810669} + - component: {fileID: 5943726395919352301} + - component: {fileID: 5940633483949707567} + - component: {fileID: 5944332278156944397} + - component: {fileID: 4742033028387346344} + m_Layer: 0 + m_Name: DebugUIHandlerRenderingLayerField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5833802642077810669 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048135192916836887} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5834238147341516467} + - {fileID: 5832985335166806795} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 293.5, y: 0} + m_SizeDelta: {x: 577, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &5943726395919352301 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048135192916836887} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &5940633483949707567 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048135192916836887} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 2 +--- !u!114 &5944332278156944397 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048135192916836887} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2bd470ffc0c0fe54faddbf8d466bf519, type: 3} + m_Name: + m_EditorClassIdentifier: + contentHolder: {fileID: 5832985335166806795} +--- !u!114 &4742033028387346344 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048135192916836887} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ea44ef5968bb44a48b7855c36dae02c4, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.RenderPipelines.Core.Runtime::UnityEngine.Rendering.UI.DebugUIHandlerRenderingLayerField + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 5944573348398787477} + valueToggle: {fileID: 5943742358506384225} + toggles: + - {fileID: 3572471841810415940} + - {fileID: 5267050427034451047} + - {fileID: 8451891156616883890} + - {fileID: 3282158458090981443} + - {fileID: 1510212987001653101} + - {fileID: 6392172160440368498} + - {fileID: 7493564373867626443} + - {fileID: 4371419930628413674} + - {fileID: 8180736816758371908} + - {fileID: 7448835212396526773} + - {fileID: 3618360561353404684} + - {fileID: 8114663146547476803} + - {fileID: 1735825134769845716} + - {fileID: 6537490383020632609} + - {fileID: 2462861946137041447} + - {fileID: 3036984858544632144} + - {fileID: 3757811077270860227} + - {fileID: 8562085848866449756} + - {fileID: 7788606920463215453} + - {fileID: 6603789859038349866} + - {fileID: 9022096370556916318} + - {fileID: 5317882346756600920} + - {fileID: 9003751344240168844} + - {fileID: 8192731229695085962} + - {fileID: 6087187633097608169} + - {fileID: 2309084006960021099} + - {fileID: 1702414852724651410} + - {fileID: 8677530327100967840} + - {fileID: 7090020572617868160} + - {fileID: 6749636456503821663} + - {fileID: 1654229716869570161} + - {fileID: 4713833427757240811} +--- !u!1 &6048264713057143749 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5832985335166806795} + - component: {fileID: 5944589737316668415} + - component: {fileID: 5943701092258004071} + - component: {fileID: 5836253473327886437} + - component: {fileID: 5940597155278695931} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &5832985335166806795 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048264713057143749} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3641905530822378611} + - {fileID: 5267050427034451046} + - {fileID: 5081734458789119777} + - {fileID: 8654207302046996467} + - {fileID: 3954105840611946110} + - {fileID: 1071186331609494896} + - {fileID: 3803781275079323733} + - {fileID: 8930712156476357657} + - {fileID: 3626888406440555363} + - {fileID: 7816446078609134115} + - {fileID: 8625410696850161855} + - {fileID: 8818044284439774689} + - {fileID: 1133780997644914158} + - {fileID: 3747482945603663964} + - {fileID: 4761151331139786934} + - {fileID: 4199920854957040706} + - {fileID: 4817301142119688916} + - {fileID: 2075241552360254502} + - {fileID: 3002137670299042156} + - {fileID: 9173084524125034988} + - {fileID: 4157811473205521841} + - {fileID: 3434169616513257095} + - {fileID: 1904428486749382773} + - {fileID: 8643262011863657182} + - {fileID: 2451940126815751474} + - {fileID: 7399658697125515523} + - {fileID: 6520704134104925015} + - {fileID: 2759500403880505928} + - {fileID: 2590341387017464519} + - {fileID: 7977966139789023458} + - {fileID: 2652713077043660966} + - {fileID: 3680364213637305159} + m_Father: {fileID: 5833802642077810669} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 288.5, y: -52.5} + m_SizeDelta: {x: 577, y: 53} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &5944589737316668415 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048264713057143749} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 25 + m_Right: 0 + m_Top: 0 + m_Bottom: 4 + m_ChildAlignment: 0 + m_Spacing: 1 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &5943701092258004071 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048264713057143749} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 1 +--- !u!222 &5836253473327886437 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048264713057143749} + m_CullTransparentMesh: 0 +--- !u!114 &5940597155278695931 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6048264713057143749} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.2509804} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 127279d577f25ac4ea17dae3782e5074, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6054211915192511925 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3434169616513257095} + - component: {fileID: 5317882346756600920} + m_Layer: 5 + m_Name: DebugUI Toggle 21 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3434169616513257095 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6054211915192511925} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7413620405051575626} + - {fileID: 906931124344334618} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &5317882346756600920 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6054211915192511925} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 2165066025782384386} + valueToggle: {fileID: 171724460343184333} + checkmarkImage: {fileID: 1504294621800433182} +--- !u!1 &6255634095443365774 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1617024272870076377} + - component: {fileID: 1463420292870698296} + - component: {fileID: 2981323361707958040} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1617024272870076377 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6255634095443365774} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7461098207183238788} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1463420292870698296 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6255634095443365774} + m_CullTransparentMesh: 0 +--- !u!114 &2981323361707958040 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6255634095443365774} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6319982235128125421 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5941713586452052334} + - component: {fileID: 4787017756125165782} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5941713586452052334 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6319982235128125421} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1568876051421469522} + m_Father: {fileID: 6520704134104925015} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &4787017756125165782 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6319982235128125421} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 7069956242290131492} + toggleTransition: 1 + graphic: {fileID: 332153022343275791} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &6393401694846712333 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5784938561067271187} + - component: {fileID: 4365777817241233862} + - component: {fileID: 3314591442341821866} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5784938561067271187 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6393401694846712333} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8930712156476357657} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &4365777817241233862 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6393401694846712333} + m_CullTransparentMesh: 0 +--- !u!114 &3314591442341821866 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6393401694846712333} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &6398709037057264613 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2652713077043660966} + - component: {fileID: 1654229716869570161} + m_Layer: 5 + m_Name: DebugUI Toggle 30 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2652713077043660966 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6398709037057264613} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5647913056700805355} + - {fileID: 699944379274011391} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1654229716869570161 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6398709037057264613} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 7875341202550150707} + valueToggle: {fileID: 4982503990233528976} + checkmarkImage: {fileID: 4755439529892379193} +--- !u!1 &6434403705248118292 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2531124078508228213} + - component: {fileID: 6369504825566277162} + - component: {fileID: 7700455392299810905} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2531124078508228213 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6434403705248118292} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7816446078609134115} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &6369504825566277162 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6434403705248118292} + m_CullTransparentMesh: 0 +--- !u!114 &7700455392299810905 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6434403705248118292} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &6435836762835265831 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3912983369996595199} + - component: {fileID: 8673800743758914287} + - component: {fileID: 4899798569211387073} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3912983369996595199 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6435836762835265831} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4700199911600101284} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8673800743758914287 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6435836762835265831} + m_CullTransparentMesh: 0 +--- !u!114 &4899798569211387073 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6435836762835265831} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6457266601126856795 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3807659439045052884} + - component: {fileID: 4529595284317267641} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3807659439045052884 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6457266601126856795} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5983516410954562191} + m_Father: {fileID: 1071186331609494896} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &4529595284317267641 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6457266601126856795} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4746959147978535488} + toggleTransition: 1 + graphic: {fileID: 4947107805862492328} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &6647650129815640830 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2414531926316930725} + - component: {fileID: 6013907816282172337} + - component: {fileID: 962910717536914882} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2414531926316930725 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6647650129815640830} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8573571124664108074} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6013907816282172337 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6647650129815640830} + m_CullTransparentMesh: 0 +--- !u!114 &962910717536914882 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6647650129815640830} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6716624449677664242 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 906931124344334618} + - component: {fileID: 171724460343184333} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &906931124344334618 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6716624449677664242} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3737111891372312802} + m_Father: {fileID: 3434169616513257095} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &171724460343184333 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6716624449677664242} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1701711077839953596} + toggleTransition: 1 + graphic: {fileID: 1504294621800433182} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &6761454948229671359 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7597631521775465986} + - component: {fileID: 289195601024694387} + - component: {fileID: 367787215377800833} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7597631521775465986 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6761454948229671359} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4787045164725599468} + m_Father: {fileID: 8139433324506673700} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &289195601024694387 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6761454948229671359} + m_CullTransparentMesh: 0 +--- !u!114 &367787215377800833 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6761454948229671359} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6770269405074232191 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2567792433006010677} + - component: {fileID: 715164927613047327} + - component: {fileID: 6640962838804556285} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2567792433006010677 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6770269405074232191} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2542400616675058289} + m_Father: {fileID: 6644699419958076397} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &715164927613047327 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6770269405074232191} + m_CullTransparentMesh: 0 +--- !u!114 &6640962838804556285 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6770269405074232191} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6865668874098640108 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8625410696850161855} + - component: {fileID: 3618360561353404684} + m_Layer: 5 + m_Name: DebugUI Toggle 10 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8625410696850161855 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6865668874098640108} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1994050603111272669} + - {fileID: 7464475961458692551} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3618360561353404684 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6865668874098640108} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 1133652755111259454} + valueToggle: {fileID: 2163830951127551774} + checkmarkImage: {fileID: 3955374361418223195} +--- !u!1 &6960760094989099012 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4817301142119688916} + - component: {fileID: 3757811077270860227} + m_Layer: 5 + m_Name: DebugUI Toggle 16 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4817301142119688916 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6960760094989099012} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5927895885435220356} + - {fileID: 8927555893094689660} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3757811077270860227 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6960760094989099012} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 3496924685570888828} + valueToggle: {fileID: 3176317505229877131} + checkmarkImage: {fileID: 2981323361707958040} +--- !u!1 &6970906156153676647 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9157722414083985858} + - component: {fileID: 2214193822323440039} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9157722414083985858 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6970906156153676647} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1914011185745597247} + m_Father: {fileID: 3626888406440555363} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2214193822323440039 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6970906156153676647} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4324276223801582212} + toggleTransition: 1 + graphic: {fileID: 7322248292256421261} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &6993641499757403295 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8930712156476357657} + - component: {fileID: 4371419930628413674} + m_Layer: 5 + m_Name: DebugUI Toggle 7 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8930712156476357657 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6993641499757403295} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5784938561067271187} + - {fileID: 1471453698717655133} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &4371419930628413674 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6993641499757403295} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 3314591442341821866} + valueToggle: {fileID: 2933965054200657782} + checkmarkImage: {fileID: 5067439095481778869} +--- !u!1 &7107229098804190366 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7432866224741430686} + - component: {fileID: 2405871519029774392} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7432866224741430686 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7107229098804190366} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4976284874825399851} + m_Father: {fileID: 2075241552360254502} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2405871519029774392 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7107229098804190366} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1546348349704106882} + toggleTransition: 1 + graphic: {fileID: 4957790091271580714} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &7116855287743012930 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7461098207183238788} + - component: {fileID: 3657859447761797027} + - component: {fileID: 2358232831280620294} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7461098207183238788 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7116855287743012930} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1617024272870076377} + m_Father: {fileID: 8927555893094689660} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3657859447761797027 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7116855287743012930} + m_CullTransparentMesh: 0 +--- !u!114 &2358232831280620294 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7116855287743012930} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7334754811724867571 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7198286586904223138} + - component: {fileID: 926128736222914170} + - component: {fileID: 785927379557597115} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7198286586904223138 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7334754811724867571} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4305866066951985147} + m_Father: {fileID: 4278529981198013852} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &926128736222914170 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7334754811724867571} + m_CullTransparentMesh: 0 +--- !u!114 &785927379557597115 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7334754811724867571} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7358121168254530163 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8643262011863657182} + - component: {fileID: 8192731229695085962} + m_Layer: 5 + m_Name: DebugUI Toggle 23 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8643262011863657182 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7358121168254530163} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1850453015581534804} + - {fileID: 800688055469850145} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &8192731229695085962 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7358121168254530163} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 6701717425365996163} + valueToggle: {fileID: 6391126850643013647} + checkmarkImage: {fileID: 5356581191142619947} +--- !u!1 &7362354665106149521 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6872577016307684039} + - component: {fileID: 4617364959482326908} + - component: {fileID: 6744668526965383060} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6872577016307684039 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7362354665106149521} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1413563205384497702} + m_Father: {fileID: 5346538742984764208} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4617364959482326908 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7362354665106149521} + m_CullTransparentMesh: 0 +--- !u!114 &6744668526965383060 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7362354665106149521} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7449666261731372048 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5080179768469462520} + - component: {fileID: 3283613025475625064} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5080179768469462520 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7449666261731372048} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8995314096000718896} + m_Father: {fileID: 4157811473205521841} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &3283613025475625064 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7449666261731372048} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4021666774289769486} + toggleTransition: 1 + graphic: {fileID: 6982057837895959611} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &7479290689902784385 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4700199911600101284} + - component: {fileID: 105621480128343845} + - component: {fileID: 2426528291183551289} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4700199911600101284 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7479290689902784385} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3912983369996595199} + m_Father: {fileID: 4397487224462890380} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &105621480128343845 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7479290689902784385} + m_CullTransparentMesh: 0 +--- !u!114 &2426528291183551289 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7479290689902784385} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7529363791104559946 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 49982278915739227} + - component: {fileID: 3336377035561475108} + - component: {fileID: 2720401729764849792} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &49982278915739227 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7529363791104559946} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8654207302046996467} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &3336377035561475108 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7529363791104559946} + m_CullTransparentMesh: 0 +--- !u!114 &2720401729764849792 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7529363791104559946} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &7586276679416498961 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1071186331609494896} + - component: {fileID: 6392172160440368498} + m_Layer: 5 + m_Name: DebugUI Toggle 5 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1071186331609494896 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7586276679416498961} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6667855967321245346} + - {fileID: 3807659439045052884} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &6392172160440368498 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7586276679416498961} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 164768344116107986} + valueToggle: {fileID: 4529595284317267641} + checkmarkImage: {fileID: 4947107805862492328} +--- !u!1 &7597021854849206998 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 428045328721135137} + - component: {fileID: 9195918111891992531} + - component: {fileID: 8813570217460717391} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &428045328721135137 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7597021854849206998} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3160084798452651386} + m_Father: {fileID: 5076517029326469307} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &9195918111891992531 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7597021854849206998} + m_CullTransparentMesh: 0 +--- !u!114 &8813570217460717391 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7597021854849206998} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7668809704783364795 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4157811473205521841} + - component: {fileID: 9022096370556916318} + m_Layer: 5 + m_Name: DebugUI Toggle 20 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4157811473205521841 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7668809704783364795} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4263894447749242993} + - {fileID: 5080179768469462520} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &9022096370556916318 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7668809704783364795} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 6243446961833559651} + valueToggle: {fileID: 3283613025475625064} + checkmarkImage: {fileID: 6982057837895959611} +--- !u!1 &7679443995315107407 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3680364213637305159} + - component: {fileID: 4713833427757240811} + m_Layer: 5 + m_Name: DebugUI Toggle 31 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3680364213637305159 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7679443995315107407} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5124529111177426770} + - {fileID: 8139433324506673700} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &4713833427757240811 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7679443995315107407} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 2270273949667200229} + valueToggle: {fileID: 6819208608482539135} + checkmarkImage: {fileID: 8019534688361173590} +--- !u!1 &7715904839202416233 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5833546809406971014} + - component: {fileID: 2537786671583968872} + - component: {fileID: 4947107805862492328} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5833546809406971014 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7715904839202416233} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5983516410954562191} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2537786671583968872 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7715904839202416233} + m_CullTransparentMesh: 0 +--- !u!114 &4947107805862492328 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7715904839202416233} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7818452579344612254 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1133780997644914158} + - component: {fileID: 1735825134769845716} + m_Layer: 5 + m_Name: DebugUI Toggle 12 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1133780997644914158 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7818452579344612254} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6667778054025323136} + - {fileID: 1763134690699169346} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1735825134769845716 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7818452579344612254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 3659922831755168663} + valueToggle: {fileID: 3776545304459646159} + checkmarkImage: {fileID: 7141046430449178186} +--- !u!1 &7843109833182365029 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4295031112077750847} + - component: {fileID: 8702525542202927311} + - component: {fileID: 332153022343275791} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4295031112077750847 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7843109833182365029} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1568876051421469522} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8702525542202927311 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7843109833182365029} + m_CullTransparentMesh: 0 +--- !u!114 &332153022343275791 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7843109833182365029} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7898878042900185760 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1869528527587065075} + - component: {fileID: 8562629198898424411} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1869528527587065075 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7898878042900185760} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6551000627649811944} + m_Father: {fileID: 7399658697125515523} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &8562629198898424411 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7898878042900185760} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 8907934119334727340} + toggleTransition: 1 + graphic: {fileID: 5177354320781382892} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &7939045417989815978 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5346538742984764208} + - component: {fileID: 6804859282518200063} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5346538742984764208 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7939045417989815978} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6872577016307684039} + m_Father: {fileID: 7977966139789023458} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &6804859282518200063 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7939045417989815978} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 6744668526965383060} + toggleTransition: 1 + graphic: {fileID: 4509044584000312710} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &8098599426082517356 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9173084524125034988} + - component: {fileID: 6603789859038349866} + m_Layer: 5 + m_Name: DebugUI Toggle 19 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9173084524125034988 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8098599426082517356} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6378496972948662163} + - {fileID: 6445334109479971278} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &6603789859038349866 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8098599426082517356} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 5787119873324982712} + valueToggle: {fileID: 8058732095134162664} + checkmarkImage: {fileID: 962910717536914882} +--- !u!1 &8229421512619543525 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4761151331139786934} + - component: {fileID: 2462861946137041447} + m_Layer: 5 + m_Name: DebugUI Toggle 14 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4761151331139786934 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8229421512619543525} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 9130896057738824197} + - {fileID: 1670263807047702912} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2462861946137041447 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8229421512619543525} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 2966172492667721896} + valueToggle: {fileID: 1441446908436994080} + checkmarkImage: {fileID: 5050348896946348867} +--- !u!1 &8382174878446464441 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8573571124664108074} + - component: {fileID: 3541859132605311333} + - component: {fileID: 4482108447807922650} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8573571124664108074 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8382174878446464441} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2414531926316930725} + m_Father: {fileID: 6445334109479971278} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3541859132605311333 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8382174878446464441} + m_CullTransparentMesh: 0 +--- !u!114 &4482108447807922650 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8382174878446464441} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &8418424508630208074 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9026513043517260611} + - component: {fileID: 704724795174701787} + - component: {fileID: 8196305987243256177} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9026513043517260611 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8418424508630208074} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8818044284439774689} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &704724795174701787 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8418424508630208074} + m_CullTransparentMesh: 0 +--- !u!114 &8196305987243256177 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8418424508630208074} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &8419724988180278695 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8139433324506673700} + - component: {fileID: 6819208608482539135} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8139433324506673700 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8419724988180278695} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7597631521775465986} + m_Father: {fileID: 3680364213637305159} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &6819208608482539135 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8419724988180278695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 367787215377800833} + toggleTransition: 1 + graphic: {fileID: 8019534688361173590} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &8544218448054256101 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1471453698717655133} + - component: {fileID: 2933965054200657782} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1471453698717655133 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8544218448054256101} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2069466459521621409} + m_Father: {fileID: 8930712156476357657} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2933965054200657782 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8544218448054256101} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 8306564221555339770} + toggleTransition: 1 + graphic: {fileID: 5067439095481778869} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &8629100503664999682 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1221176923530238434} + - component: {fileID: 7824910029803158027} + - component: {fileID: 5102590157774239751} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1221176923530238434 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8629100503664999682} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7399658697125515523} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &7824910029803158027 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8629100503664999682} + m_CullTransparentMesh: 0 +--- !u!114 &5102590157774239751 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8629100503664999682} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &8677633347016963363 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 213539999138786333} + - component: {fileID: 7192581332987687273} + - component: {fileID: 9060318935775576703} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &213539999138786333 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8677633347016963363} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6341387859349373114} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7192581332987687273 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8677633347016963363} + m_CullTransparentMesh: 0 +--- !u!114 &9060318935775576703 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8677633347016963363} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &8685390622490100011 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7977966139789023458} + - component: {fileID: 6749636456503821663} + m_Layer: 5 + m_Name: DebugUI Toggle 29 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7977966139789023458 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8685390622490100011} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7792108644153214049} + - {fileID: 5346538742984764208} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &6749636456503821663 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8685390622490100011} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 2353148834173414365} + valueToggle: {fileID: 6804859282518200063} + checkmarkImage: {fileID: 4509044584000312710} +--- !u!1 &8802377152758538674 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6378496972948662163} + - component: {fileID: 8757688739712324464} + - component: {fileID: 5787119873324982712} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6378496972948662163 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8802377152758538674} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 9173084524125034988} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &8757688739712324464 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8802377152758538674} + m_CullTransparentMesh: 0 +--- !u!114 &5787119873324982712 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8802377152758538674} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &8891641694798509794 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4305866066951985147} + - component: {fileID: 795277854931234843} + - component: {fileID: 8002195202206546742} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4305866066951985147 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8891641694798509794} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7198286586904223138} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &795277854931234843 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8891641694798509794} + m_CullTransparentMesh: 0 +--- !u!114 &8002195202206546742 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8891641694798509794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &8907353874709907600 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8233626477581283555} + - component: {fileID: 8128548266341100821} + - component: {fileID: 4427599279144680947} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8233626477581283555 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8907353874709907600} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3747482945603663964} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &8128548266341100821 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8907353874709907600} + m_CullTransparentMesh: 0 +--- !u!114 &4427599279144680947 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8907353874709907600} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &8934854630699155733 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4397487224462890380} + - component: {fileID: 7118092976832869884} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4397487224462890380 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8934854630699155733} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4700199911600101284} + m_Father: {fileID: 8654207302046996467} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &7118092976832869884 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8934854630699155733} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 0 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2426528291183551289} + toggleTransition: 1 + graphic: {fileID: 4899798569211387073} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 1 +--- !u!1 &8938513161468718541 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6493715579490047529} + - component: {fileID: 3501081499322488200} + - component: {fileID: 5802453145572142467} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6493715579490047529 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8938513161468718541} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6075760728334120815} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -1, y: 0} + m_SizeDelta: {x: 11, y: 11} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3501081499322488200 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8938513161468718541} + m_CullTransparentMesh: 0 +--- !u!114 &5802453145572142467 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8938513161468718541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: b346b2a2df1d290438be3287b6419408, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &8941056226660783832 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9130896057738824197} + - component: {fileID: 1608539554958489079} + - component: {fileID: 2966172492667721896} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9130896057738824197 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8941056226660783832} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4761151331139786934} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &1608539554958489079 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8941056226660783832} + m_CullTransparentMesh: 0 +--- !u!114 &2966172492667721896 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8941056226660783832} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!1 &9046698730679528549 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5081734458789119777} + - component: {fileID: 8451891156616883890} + m_Layer: 5 + m_Name: DebugUI Toggle 2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5081734458789119777 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9046698730679528549} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6885379471270306523} + - {fileID: 5076517029326469307} + m_Father: {fileID: 5832985335166806795} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 301, y: -40} + m_SizeDelta: {x: 552, y: 26} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &8451891156616883890 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9046698730679528549} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0012fc4688b5d5342a441aa32c0e099e, type: 3} + m_Name: + m_EditorClassIdentifier: + colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1} + colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1} + nameLabel: {fileID: 7894181582057877634} + valueToggle: {fileID: 953415876542653751} + checkmarkImage: {fileID: 8209430775002992777} +--- !u!1 &9109294533507219646 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8351659506645333476} + - component: {fileID: 2982061304914416535} + - component: {fileID: 4755971768771506769} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8351659506645333476 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9109294533507219646} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1064151588746797128} + m_Father: {fileID: 6386133981247227809} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2982061304914416535 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9109294533507219646} + m_CullTransparentMesh: 0 +--- !u!114 &4755971768771506769 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9109294533507219646} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &9147698509246440744 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8995314096000718896} + - component: {fileID: 3459244149561950068} + - component: {fileID: 4021666774289769486} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8995314096000718896 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9147698509246440744} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7508261725234730334} + m_Father: {fileID: 5080179768469462520} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -12} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3459244149561950068 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9147698509246440744} + m_CullTransparentMesh: 0 +--- !u!114 &4021666774289769486 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9147698509246440744} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &9156468530069850769 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6885379471270306523} + - component: {fileID: 8455131147975850754} + - component: {fileID: 7894181582057877634} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6885379471270306523 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9156468530069850769} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5081734458789119777} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &8455131147975850754 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9156468530069850769} + m_CullTransparentMesh: 0 +--- !u!114 &7894181582057877634 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9156468530069850769} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUIHandlerRenderingLayerField.prefab.meta b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUIHandlerRenderingLayerField.prefab.meta new file mode 100644 index 00000000000..4efc01a70b9 --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Prefabs/Widgets/DebugUIHandlerRenderingLayerField.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 928d1ca04af80c84e8d5dabc18095d79 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Runtime UI Resources/DebugUICanvas.prefab b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Runtime UI Resources/DebugUICanvas.prefab index e6f951c943a..37aaf8c0cae 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Runtime UI Resources/DebugUICanvas.prefab +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/Runtime UI Resources/DebugUICanvas.prefab @@ -114,7 +114,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 76db615e524a19c4990482d75a475543, type: 3} m_Name: m_EditorClassIdentifier: - panelPrefab: {fileID: 224481716535368988, guid: daa46a58178a6ad41ae1ddc2dc7f856d, type: 3} + panelPrefab: {fileID: 224481716535368988, guid: daa46a58178a6ad41ae1ddc2dc7f856d, + type: 3} prefabs: - type: UnityEngine.Rendering.DebugUI+Value, Unity.RenderPipelines.Core.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null @@ -163,13 +164,15 @@ MonoBehaviour: prefab: {fileID: 224284813447651300, guid: 38a07789c9e87004dad98c2909f58369, type: 3} - type: UnityEngine.Rendering.DebugUI+BitField, Unity.RenderPipelines.Core.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - prefab: {fileID: 5833802642077810669, guid: 7c78b588b2e1f7c4a86ca4a985cf6e4a, type: 3} + prefab: {fileID: 5833802642077810669, guid: 7c78b588b2e1f7c4a86ca4a985cf6e4a, + type: 3} - type: UnityEngine.Rendering.DebugUI+HistoryBoolField, Unity.RenderPipelines.Core.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null prefab: {fileID: 108402283379224504, guid: 5088d0220f0c4df439cf06c5c270eacb, type: 3} - type: UnityEngine.Rendering.DebugUI+HistoryEnumField, Unity.RenderPipelines.Core.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - prefab: {fileID: 8535926254376877601, guid: b2da6b27df236b144b3516ed8e7d36ac, type: 3} + prefab: {fileID: 8535926254376877601, guid: b2da6b27df236b144b3516ed8e7d36ac, + type: 3} - type: UnityEngine.Rendering.DebugUI+Table, Unity.RenderPipelines.Core.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null prefab: {fileID: 224284813447651300, guid: 38a07789c9e87004dad98c2909f58369, type: 3} @@ -193,7 +196,12 @@ MonoBehaviour: prefab: {fileID: 224224135738715566, guid: ad83bc56407925d44a77a5bd01cd6783, type: 3} - type: UnityEngine.Rendering.DebugUI+ObjectPopupField, Unity.RenderPipelines.Core.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - prefab: {fileID: 4224455051203994714, guid: 48fb043c850cadc4a883b53785e14c6e, type: 3} + prefab: {fileID: 4224455051203994714, guid: 48fb043c850cadc4a883b53785e14c6e, + type: 3} - type: UnityEngine.Rendering.DebugUI+RuntimeDebugShadersMessageBox, Unity.RenderPipelines.Core.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null prefab: {fileID: 224053494956566916, guid: 10a25524b0986f9488b430e2829bbbe8, type: 3} + - type: UnityEngine.Rendering.DebugUI+RenderingLayerField, Unity.RenderPipelines.Core.Runtime, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + prefab: {fileID: 5833802642077810669, guid: 928d1ca04af80c84e8d5dabc18095d79, + type: 3} diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/VolumeDebugSettings.cs b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/VolumeDebugSettings.cs index d2310ebd81b..dd8cc1a5629 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Debugging/VolumeDebugSettings.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Debugging/VolumeDebugSettings.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using Unity.Mathematics; using UnityEditor; namespace UnityEngine.Rendering @@ -11,6 +10,7 @@ namespace UnityEngine.Rendering /// The volume settings /// /// A with + [Obsolete("This is not longer supported Please use DebugDisplaySettingsVolume. #from(6000.2)", false)] public abstract partial class VolumeDebugSettings : IVolumeDebugSettings where T : MonoBehaviour, IAdditionalData { @@ -191,7 +191,7 @@ public Volume[] GetVolumes() VolumeParameter[,] GetStates() { var fields = selectedComponentType - .GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance) + .GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance) .Where(t => t.FieldType.IsSubclassOf(typeof(VolumeParameter))) .ToArray(); diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Deprecated.cs b/Packages/com.unity.render-pipelines.core/Runtime/Deprecated.cs index 9046879c434..a0b1cc9c211 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Deprecated.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Deprecated.cs @@ -2,6 +2,8 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using UnityEngine.Assertions; +using static UnityEngine.Rendering.DebugUI; namespace UnityEngine.Rendering { @@ -153,4 +155,50 @@ public void Unregister(Volume volume, int layer) Unregister(volume); } } + + + public partial class DebugUI + { + /// + /// Maskfield enumeration field. + /// + [Obsolete("Mask field is not longer supported. Please use a BitField or implement your own Widget. #from(6000.2)", false)] + public class MaskField : EnumField + { + /// + /// Fills the enum using the provided names + /// + /// names to fill the enum + public void Fill(string[] names) + { + using (ListPool.Get(out var tmpNames)) + using (ListPool.Get(out var tmpValues)) + { + for (int i = 0; i < (names.Length); ++i) + { + tmpNames.Add(new GUIContent(names[i])); + tmpValues.Add(i); + } + enumNames = tmpNames.ToArray(); + enumValues = tmpValues.ToArray(); + } + } + + /// + /// Assigns a value to the maskfield. + /// + /// value for the maskfield + public override void SetValue(uint value) + { + Assert.IsNotNull(setter); + var validValue = ValidateValue(value); + + if (!validValue.Equals(getter())) + { + setter(validValue); + onValueChanged?.Invoke(this, validValue); + } + } + } + } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentDrawer.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentDrawer.cs index aabf6728f7b..ccf1c993352 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentDrawer.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/GPUResidentDrawer.cs @@ -392,9 +392,11 @@ private GPUResidentDrawer(GPUResidentDrawerSettings settings, int maxInstanceCou m_Dispatcher.EnableTypeTracking(TypeTrackingFlags.SceneObjects); m_Dispatcher.EnableTypeTracking(); m_Dispatcher.EnableTypeTracking(); - m_Dispatcher.EnableTransformTracking(TransformTrackingType.GlobalTRS); m_Dispatcher.EnableTypeTracking(TypeTrackingFlags.SceneObjects); + m_Dispatcher.EnableTypeTracking(TypeTrackingFlags.SceneObjects | TypeTrackingFlags.EditorOnlyObjects); + m_Dispatcher.EnableTransformTracking(TransformTrackingType.GlobalTRS); + m_Dispatcher.EnableTransformTracking(TransformTrackingType.GlobalTRS); #if UNITY_EDITOR AssemblyReloadEvents.beforeAssemblyReload += OnAssemblyReload; @@ -567,6 +569,7 @@ private void PostPostLateUpdate() var lodGroupTransformData = m_Dispatcher.GetTransformChangesAndClear(TransformTrackingType.GlobalTRS, Allocator.TempJob); var lodGroupData = m_Dispatcher.GetTypeChangesAndClear(Allocator.TempJob, noScriptingArray: true); var meshDataSorted = m_Dispatcher.GetTypeChangesAndClear(Allocator.TempJob, sortByInstanceID: true, noScriptingArray: true); + var cameraChanges = m_Dispatcher.GetTypeChangesAndClear(Allocator.TempJob, noScriptingArray: true); var materialData = m_Dispatcher.GetTypeChangesAndClear(Allocator.TempJob); var rendererData = m_Dispatcher.GetTypeChangesAndClear(Allocator.TempJob, noScriptingArray: true); Profiler.EndSample(); @@ -593,6 +596,10 @@ private void PostPostLateUpdate() ProcessLODGroups(lodGroupData.changedID, lodGroupData.destroyedID, lodGroupTransformData.transformedID); Profiler.EndSample(); + Profiler.BeginSample("GPUResidentDrawer.ProcessCameras"); + ProcessCameras(cameraChanges.changedID, cameraChanges.destroyedID); + Profiler.EndSample(); + Profiler.BeginSample("GPUResidentDrawer.ProcessRenderers"); ProcessRenderers(rendererData, unsupportedRenderers.AsArray()); Profiler.EndSample(); @@ -605,6 +612,7 @@ private void PostPostLateUpdate() lodGroupData.Dispose(); meshDataSorted.Dispose(); materialData.Dispose(); + cameraChanges.Dispose(); rendererData.Dispose(); unsupportedChangedMaterials.Dispose(); unsupportedRenderers.Dispose(); @@ -634,6 +642,12 @@ private void ProcessMaterials(NativeArray destroyedID, NativeArray uns m_Batcher.DestroyMaterials(unsupportedMaterials); } + private void ProcessCameras(NativeArray changedIDs, NativeArray destroyedIDs) + { + m_BatchersContext.UpdateCameras(changedIDs); + m_BatchersContext.FreePerCameraInstanceData(destroyedIDs); + } + private void ProcessMeshes(NativeArray destroyedID) { if (destroyedID.Length == 0) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCuller.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCuller.cs index 7d753421fc0..8fcbfa9c336 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCuller.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCuller.cs @@ -66,6 +66,7 @@ internal struct DrawKey : IEquatable { public BatchMeshID meshID; public int submeshIndex; + public int activeMeshLod; // or -1 if this draw is not using mesh LOD public BatchMaterialID materialID; public BatchDrawCommandFlags flags; public int transparentInstanceId; // non-zero for transparent instances, to ensure each instance has its own draw command (for sorting) @@ -78,6 +79,7 @@ public bool Equals(DrawKey other) return meshID == other.meshID && submeshIndex == other.submeshIndex && + activeMeshLod == other.activeMeshLod && materialID == other.materialID && flags == other.flags && transparentInstanceId == other.transparentInstanceId && @@ -91,6 +93,7 @@ public override int GetHashCode() int hash = 13; hash = (hash * 23) + (int)meshID.value; hash = (hash * 23) + (int)submeshIndex; + hash = (hash * 23) + (int)activeMeshLod; hash = (hash * 23) + (int)materialID.value; hash = (hash * 23) + (int)flags; hash = (hash * 23) + transparentInstanceId; @@ -133,15 +136,53 @@ public int visibilityConfigCount } [BurstCompile(DisableSafetyChecks = true, OptimizeFor = OptimizeFor.Performance)] + internal struct AnimateCrossFadeJob : IJobParallelFor + { + public const int k_BatchSize = 512; + public const byte k_MeshLODTransitionToLowerLODBit = 0x80; + + private const byte k_LODFadeOff = (byte)CullingJob.k_LODFadeOff; + private const float k_CrossfadeAnimationTimeS = 0.333f; + + [ReadOnly] public float deltaTime; + + public UnsafeList crossFadeArray; + + public unsafe void Execute(int instanceIndex) + { + ref var crossFadeValue = ref crossFadeArray.ElementAt(instanceIndex); + + if(crossFadeValue == k_LODFadeOff) + return; + + var prevTransitionBit = (crossFadeValue & k_MeshLODTransitionToLowerLODBit); + + crossFadeValue += (byte)((deltaTime / k_CrossfadeAnimationTimeS) * 127.0f); + + //If done with crossfade - reset mask + if (prevTransitionBit != ((crossFadeValue + 1) & k_MeshLODTransitionToLowerLODBit)) + { + crossFadeValue = k_LODFadeOff; + } + } + } + + [BurstCompile] internal struct CullingJob : IJobParallelFor { public const int k_BatchSize = 32; - const uint k_LODFadeZeroPacked = 127; + public const uint k_MeshLodCrossfadeActive = 0x40; + public const uint k_MeshLodCrossfadeSignBit = 0x80; + public const uint k_MeshLodCrossfadeBits = k_MeshLodCrossfadeSignBit | k_MeshLodCrossfadeActive; + + public const uint k_LODFadeOff = 255u; + public const uint k_LODFadeZeroPacked = 127u; + public const uint k_LODFadeIsSpeedTree = 256u; - const float k_LODPercentInvisible = 0.0f; - const float k_LODPercentFullyVisible = 1.0f; - const float k_LODPercentSpeedTree = 2.0f; + private const uint k_InvalidCrossFadeAndLevel = 0xFFFFFFFF; + + const uint k_VisibilityMaskNotVisible = 0u; const float k_SmallMeshTransitionWidth = 0.1f; @@ -149,7 +190,7 @@ enum CrossFadeType { kDisabled, kCrossFadeOut, // 1 == instance is visible in current lod, and not next - could be fading out - kCrossFadeIn, // 2 == instance is visivle in next lod level, but not current - could be fading in + kCrossFadeIn, // 2 == instance is visible in next lod level, but not current - could be fading in kVisible // 3 == instance is visible in both current and next lod level - could not be impacted by fade } @@ -157,6 +198,7 @@ enum CrossFadeType [ReadOnly] public BatchCullingViewType viewType; [ReadOnly] public float3 cameraPosition; + [ReadOnly] public float sqrMeshLodSelectionConstant; [ReadOnly] public float sqrScreenRelativeMetric; [ReadOnly] public float minScreenRelativeHeight; [ReadOnly] public bool isOrtho; @@ -164,6 +206,7 @@ enum CrossFadeType [ReadOnly] public int maxLOD; [ReadOnly] public uint cullingLayerMask; [ReadOnly] public ulong sceneCullingMask; + [ReadOnly] public bool animateCrossFades; [ReadOnly] public NativeArray frustumPlanePackets; [ReadOnly] public NativeArray frustumSplitInfos; @@ -176,7 +219,10 @@ enum CrossFadeType [NativeDisableContainerSafetyRestriction, NoAlias] [ReadOnly] public NativeList lodGroupCullingData; [NativeDisableUnsafePtrRestriction] [ReadOnly] public IntPtr occlusionBuffer; + [NativeDisableContainerSafetyRestriction] public CPUPerCameraInstanceData.PerCameraInstanceDataArrays cameraInstanceData; + [NativeDisableParallelForRestriction][WriteOnly] public NativeArray rendererVisibilityMasks; + [NativeDisableParallelForRestriction][WriteOnly] public NativeArray rendererMeshLodSettings; [NativeDisableParallelForRestriction][WriteOnly] public NativeArray rendererCrossFadeValues; @@ -192,121 +238,127 @@ static uint PackFloatToUint8(float percent) return packed; } - unsafe float CalculateLODVisibility(int instanceIndex, int sharedInstanceIndex, InstanceFlags instanceFlags) + unsafe uint CalculateLODVisibility(int instanceIndex, int sharedInstanceIndex, InstanceFlags instanceFlags) { - var lodPercent = k_LODPercentFullyVisible; var lodDataIndexAndMask = sharedInstanceData.lodGroupAndMasks[sharedInstanceIndex]; - if (lodDataIndexAndMask != 0xFFFFFFFF) + if (lodDataIndexAndMask == k_InvalidCrossFadeAndLevel) { - lodPercent = k_LODPercentInvisible; - - var lodIndex = lodDataIndexAndMask >> 8; - var lodMask = lodDataIndexAndMask & 0xFF; - Assert.IsTrue(lodMask > 0); + if(viewType >= BatchCullingViewType.SelectionOutline + || (instanceFlags & InstanceFlags.SmallMeshCulling) == 0 + || minScreenRelativeHeight == 0.0f) + return k_LODFadeOff; - ref var lodGroup = ref lodGroupCullingData.ElementAt((int)lodIndex); - float cameraSqrDistToLODCenter = isOrtho ? sqrScreenRelativeMetric : LODGroupRenderingUtils.CalculateSqrPerspectiveDistance(lodGroup.worldSpaceReferencePoint, cameraPosition, sqrScreenRelativeMetric); + // If no LODGroup available - small mesh culling. + ref readonly AABB worldAABB = ref instanceData.worldAABBs.UnsafeElementAt(instanceIndex); + var cameraSqrDist = isOrtho ? sqrScreenRelativeMetric : LODRenderingUtils.CalculateSqrPerspectiveDistance(worldAABB.center, cameraPosition, sqrScreenRelativeMetric); + var cameraDist = math.sqrt(cameraSqrDist); - // Remove lods that are beyond the max lod. - uint maxLodMask = 0xffffffff << maxLOD; - lodMask &= maxLodMask; + var aabbSize = worldAABB.extents * 2.0f; + var worldSpaceSize = math.max(math.max(aabbSize.x, aabbSize.y), aabbSize.z); + var maxDist = LODRenderingUtils.CalculateLODDistance(minScreenRelativeHeight, worldSpaceSize); + if (maxDist < cameraDist) + return k_LODFadeZeroPacked; - // Offset to the lod preceding the first for proper cross fade calculation. - int m = math.max(math.tzcnt(lodMask) - 1, maxLOD); - lodMask >>= m; + var transitionHeight = minScreenRelativeHeight + k_SmallMeshTransitionWidth * minScreenRelativeHeight; + var fadeOutRange = Mathf.Max(0.0f,maxDist - LODRenderingUtils.CalculateLODDistance(transitionHeight, worldSpaceSize)); - while (lodMask > 0) - { - var lodRangeSqrMin = m == maxLOD ? 0.0f : lodGroup.sqrDistances[m - 1]; - var lodRangeSqrMax = lodGroup.sqrDistances[m]; + var lodPercent = (maxDist - cameraDist) / fadeOutRange; + return lodPercent > 1.0f ? k_LODFadeOff : PackFloatToUint8(lodPercent); + } - // Camera is beyond the range of this all further lods. No need to proceed. - if (cameraSqrDistToLODCenter < lodRangeSqrMin) - break; + var lodIndex = lodDataIndexAndMask >> 8; + var lodMask = lodDataIndexAndMask & 0xFF; + Assert.IsTrue(lodMask > 0); - // Instance is in the min/max range of this lod. Proceeding. - if (cameraSqrDistToLODCenter < lodRangeSqrMax) - { - var type = (CrossFadeType)(lodMask & 3); + ref var lodGroup = ref lodGroupCullingData.ElementAt((int)lodIndex); - // Instance is in this and/or the next lod. - if (type != CrossFadeType.kDisabled) - { - // Instance is in both this and the next lod. No need to fade. - if (type == CrossFadeType.kVisible) - { - lodPercent = k_LODPercentFullyVisible; - } - else - { - var distanceToLodCenter = math.sqrt(cameraSqrDistToLODCenter); - var maxDist = math.sqrt(lodRangeSqrMax); + if (lodGroup.forceLODMask != 0) + return (lodGroup.forceLODMask & lodMask) != 0 ? k_LODFadeOff : k_LODFadeZeroPacked; - // SpeedTree cross fade. - if (lodGroup.percentageFlags[m]) - { - // The fading-in instance is not visible but the fading-out is visible and it does the speed tree vertex deformation. + float cameraSqrDistToLODCenter = isOrtho ? sqrScreenRelativeMetric : LODRenderingUtils.CalculateSqrPerspectiveDistance(lodGroup.worldSpaceReferencePoint, cameraPosition, sqrScreenRelativeMetric); - if (type == CrossFadeType.kCrossFadeIn) - { - lodPercent = k_LODPercentInvisible; - } - else if (type == CrossFadeType.kCrossFadeOut) - { - var minDist = m > 0 ? math.sqrt(lodGroup.sqrDistances[m - 1]) : lodGroup.worldSpaceSize; - lodPercent = k_LODPercentSpeedTree + math.max(distanceToLodCenter - minDist, 0.0f) / (maxDist - minDist); - } - } - // Dithering cross fade. - else - { - // If in the transition zone, both fading-in and fading-out instances are visible. Calculate the lod percent. - // If not then only the fading-out instance is fully visible, and fading-in is invisible. + // Remove lods that are beyond the max lod. + uint maxLodMask = 0xffffffff << maxLOD; + lodMask &= maxLodMask; - var transitionDist = lodGroup.transitionDistances[m]; - var dif = maxDist - distanceToLodCenter; + // Offset to the lod preceding the first for proper cross fade calculation. + int m = math.max(math.tzcnt(lodMask) - 1, maxLOD); + lodMask >>= m; - if (dif < transitionDist) - { - lodPercent = dif / transitionDist; + while (lodMask > 0) + { + var lodRangeSqrMin = m == maxLOD ? 0.0f : lodGroup.sqrDistances[m - 1]; + var lodRangeSqrMax = lodGroup.sqrDistances[m]; - if (type == CrossFadeType.kCrossFadeIn) - lodPercent = -lodPercent; - } - else if (type == CrossFadeType.kCrossFadeOut) - { - lodPercent = k_LODPercentFullyVisible; - } - } - } - } + // Camera is beyond the range of this all further lods. No need to proceed. + if (cameraSqrDistToLODCenter < lodRangeSqrMin) + break; - // We found the lod and the percentage. - break; - } + if (cameraSqrDistToLODCenter > lodRangeSqrMax) + { ++m; lodMask >>= 1; + continue; } - } - else if(viewType < BatchCullingViewType.SelectionOutline && (instanceFlags & InstanceFlags.SmallMeshCulling) != 0) - { - ref readonly AABB worldAABB = ref instanceData.worldAABBs.UnsafeElementAt(instanceIndex); - var cameraSqrDist = isOrtho ? sqrScreenRelativeMetric : LODGroupRenderingUtils.CalculateSqrPerspectiveDistance(worldAABB.center, cameraPosition, sqrScreenRelativeMetric); - var cameraDist = math.sqrt(cameraSqrDist); - var aabbSize = worldAABB.extents * 2.0f; - var worldSpaceSize = math.max(math.max(aabbSize.x, aabbSize.y), aabbSize.z); - var maxDist = LODGroupRenderingUtils.CalculateLODDistance(minScreenRelativeHeight, worldSpaceSize); + // Instance is in the min/max range of this lod. Proceeding. + var type = (CrossFadeType)(lodMask & 3); - var transitionHeight = minScreenRelativeHeight + k_SmallMeshTransitionWidth * minScreenRelativeHeight; - var fadeOutRange = Mathf.Max(0.0f,maxDist - LODGroupRenderingUtils.CalculateLODDistance(transitionHeight, worldSpaceSize)); + // Instance is in neither this LOD Level nor next - invisible + if (type == CrossFadeType.kDisabled) + { + return k_LODFadeZeroPacked; + } + // Instance is in both this and the next lod. No need to fade - fully visible + if (type == CrossFadeType.kVisible) + { + return k_LODFadeOff; + } + + var distanceToLodCenter = math.sqrt(cameraSqrDistToLODCenter); + var maxDist = math.sqrt(lodRangeSqrMax); + + // SpeedTree cross fade. + if (lodGroup.percentageFlags[m]) + { + // The fading-in instance is not visible but the fading-out is visible and it does the speed tree vertex deformation. + if (type == CrossFadeType.kCrossFadeIn) + { + return k_LODFadeZeroPacked + 1; + } + else if (type == CrossFadeType.kCrossFadeOut) + { + var minDist = m > 0 + ? math.sqrt(lodGroup.sqrDistances[m - 1]) + : lodGroup.worldSpaceSize; + var lodPercent = math.max(distanceToLodCenter - minDist, 0.0f) / (maxDist - minDist); + return PackFloatToUint8(lodPercent) | k_LODFadeIsSpeedTree; + } + } + // Dithering cross fade. + else + { + var transitionDist = lodGroup.transitionDistances[m]; + var dif = maxDist - distanceToLodCenter; + // If in the transition zone, both fading-in and fading-out instances are visible. Calculate the lod percent. + // If not then only the fading-out instance is fully visible, and fading-in is invisible. + if (dif < transitionDist) + { + var lodPercent = dif / transitionDist; + + if (type == CrossFadeType.kCrossFadeIn) + lodPercent = -lodPercent; + return PackFloatToUint8(lodPercent); + } + + return type == CrossFadeType.kCrossFadeOut ? k_LODFadeOff : k_LODFadeZeroPacked; + } - lodPercent = math.saturate((maxDist - cameraDist) / fadeOutRange); } - return lodPercent; + return k_LODFadeZeroPacked; } private unsafe uint CalculateVisibilityMask(int instanceIndex, int sharedInstanceIndex, InstanceFlags instanceFlags) @@ -347,6 +399,87 @@ private unsafe uint CalculateVisibilityMask(int instanceIndex, int sharedInstanc return visibilityMask; } + // Algorithm is detailed and must be kept in sync with CalculateMeshLod (C++) + private uint ComputeMeshLODLevel(int instanceIndex, int sharedInstanceIndex) + { + ref readonly GPUDrivenRendererMeshLodData meshLodData = ref instanceData.meshLodData.UnsafeElementAt(instanceIndex); + + if (meshLodData.forceLod >= 0) + return (uint)meshLodData.forceLod; + + var levelInfo = sharedInstanceData.meshLodInfos[sharedInstanceIndex]; + ref readonly AABB worldAABB = ref instanceData.worldAABBs.UnsafeElementAt(instanceIndex); + + var radiusSqr = math.max(math.lengthsq(worldAABB.extents), 1e-5f); + var diameterSqr = radiusSqr * 4; + var cameraSqrHeightAtDistance = isOrtho ? sqrMeshLodSelectionConstant : + LODRenderingUtils.CalculateSqrPerspectiveDistance(worldAABB.center, cameraPosition, sqrMeshLodSelectionConstant); + + var boundsDesiredPercentage = Math.Sqrt(cameraSqrHeightAtDistance / diameterSqr); + + var levelIndexFlt = math.log2(boundsDesiredPercentage) * levelInfo.lodSlope + levelInfo.lodBias; + + // We apply Bias after max to enforce that a positive bias of +N we would select lodN instead of Lod0 + levelIndexFlt = math.max(levelIndexFlt, 0); + levelIndexFlt += meshLodData.lodSelectionBias; + + levelIndexFlt = math.clamp(levelIndexFlt,0, levelInfo.levelCount - 1); + + return (uint)math.floor(levelIndexFlt); + } + + // A crossfading instance is assigned a [0.0(invisible) - 1.0(fully visible)] value. + // The complementary instance is assigned the negative of this value[-1.0(invisible) - -0.0(fully visible)] + // As we pack it to a 8-bit uint, we transition from [0-126] when transitioning from a Lower to a higher LOD level, + // and from [127-254] when transitioning from a higher to a lower LOD level. + // This means that we can use (k_MeshLODTransitionToLowerLODBit = 0x80) to select the correct instance to blend with during draw command generation. + private unsafe uint ComputeMeshLODCrossfade(int instanceIndex, ref uint meshLodLevel) + { + var previousLodLevel = cameraInstanceData.meshLods[instanceIndex]; + + //1st frame - previous LOD level is invalid. Just update it and return. + if(previousLodLevel == 0xff) + { + cameraInstanceData.meshLods[instanceIndex] = (byte)meshLodLevel; + return k_LODFadeOff; + } + + var currentCrossFade = cameraInstanceData.crossFades[instanceIndex]; + + // If not already crossfading, check if we changed Lod level this frame, and starts crossfading. + if (currentCrossFade == k_LODFadeOff) + { + if (previousLodLevel == meshLodLevel) + return k_LODFadeOff; + + cameraInstanceData.meshLods[instanceIndex] = (byte)meshLodLevel; + cameraInstanceData.crossFades[instanceIndex] = (byte)(meshLodLevel < previousLodLevel ? AnimateCrossFadeJob.k_MeshLODTransitionToLowerLODBit : 1); + meshLodLevel = previousLodLevel; + return k_LODFadeOff; + } + + //On the first crossfading frame, other cameras could have set the current crossfade values, but we do not want to fade until next frame. + if ((currentCrossFade - 1) % k_LODFadeZeroPacked == 0) + { + meshLodLevel = previousLodLevel; + return k_LODFadeOff; + } + + meshLodLevel = previousLodLevel | (currentCrossFade > k_LODFadeZeroPacked ? k_MeshLodCrossfadeBits : k_MeshLodCrossfadeActive); + + return currentCrossFade; + } + + private unsafe void EnforcePreviousFrameMeshLOD(int instanceIndex, ref uint meshLodLevel) + { + ref var previousLodLevel = ref cameraInstanceData.meshLods.ElementAt(instanceIndex); + + if (previousLodLevel != k_LODFadeOff) + { + meshLodLevel = previousLodLevel; + } + } + public void Execute(int instanceIndex) { InstanceHandle instance = instanceData.instances[instanceIndex]; @@ -354,48 +487,55 @@ public void Execute(int instanceIndex) var instanceFlags = sharedInstanceData.flags[sharedInstanceIndex].instanceFlags; var visibilityMask = CalculateVisibilityMask(instanceIndex, sharedInstanceIndex, instanceFlags); - var crossFadeValue = k_LODFadeZeroPacked; + if (visibilityMask == k_VisibilityMaskNotVisible) + { + rendererVisibilityMasks[instance.index] = (byte)k_VisibilityMaskNotVisible; + return; + } + + var crossFadeValue = CalculateLODVisibility(instanceIndex, sharedInstanceIndex, instanceFlags); + if (crossFadeValue == k_LODFadeZeroPacked) + { + rendererVisibilityMasks[instance.index] = (byte)k_VisibilityMaskNotVisible; + return; + } - if (visibilityMask != 0) + if (binningConfig.supportsMotionCheck) { - float lodPercent = CalculateLODVisibility(instanceIndex, sharedInstanceIndex, instanceFlags); + bool hasMotion = instanceData.movedInPreviousFrameBits.Get(instanceIndex); + visibilityMask = (visibilityMask << 1) | (hasMotion ? 1U : 0); + } - if (lodPercent != k_LODPercentInvisible) + var meshLodLevel = 0u; + // select mesh LOD level + var hasMeshLod = (instanceFlags & InstanceFlags.HasMeshLod) != 0; + if (hasMeshLod) + { + meshLodLevel = ComputeMeshLODLevel(instanceIndex, sharedInstanceIndex); + } + + if (binningConfig.supportsCrossFade) + { + if(hasMeshLod && animateCrossFades) { - if (binningConfig.supportsMotionCheck) + //Only Crossfade mesh LOD if we aren't already crossfading through LOD groups or SpeedTree + if (crossFadeValue == k_LODFadeOff) { - bool hasMotion = instanceData.movedInPreviousFrameBits.Get(instanceIndex); - visibilityMask = (visibilityMask << 1) | (hasMotion ? 1U : 0); + crossFadeValue = ComputeMeshLODCrossfade(instanceIndex, ref meshLodLevel); } - - if (binningConfig.supportsCrossFade) + else { - bool hasDitheringCrossFade = false; - - if (lodPercent != k_LODPercentFullyVisible) - { - bool isSpeedTreeCrossFade = lodPercent >= k_LODPercentSpeedTree; - - // If this is a speed tree cross fade then we provide cross fade value but we don't enable cross fade keyword. - if (isSpeedTreeCrossFade) - lodPercent -= k_LODPercentSpeedTree; - else - hasDitheringCrossFade = true; - - crossFadeValue = PackFloatToUint8(lodPercent); - } - - visibilityMask = (visibilityMask << 1) | (hasDitheringCrossFade ? 1U : 0); + // If we are cross fading through LODGroup, we reuse previous frame's LodLevel to avoid popping + EnforcePreviousFrameMeshLOD(instanceIndex, ref meshLodLevel); } } - else - { - visibilityMask = 0; - } + // if crossfade is 255 or more, either crossfade is off or it's speedTreeFade, cases for which we do not need to set the fade bit. + visibilityMask = (visibilityMask << 1) | (crossFadeValue < k_LODFadeOff ? 1U : 0); } rendererVisibilityMasks[instance.index] = (byte)visibilityMask; - rendererCrossFadeValues[instance.index] = (byte)crossFadeValue; + rendererMeshLodSettings[instance.index] = (byte)meshLodLevel; + rendererCrossFadeValues[instance.index] = (byte)(crossFadeValue & 0xFF); } } @@ -408,6 +548,7 @@ internal unsafe struct AllocateBinsPerBatch : IJobParallelFor [ReadOnly] public NativeArray drawInstanceIndices; [ReadOnly] public CPUInstanceData.ReadOnly instanceData; [ReadOnly] public NativeArray rendererVisibilityMasks; + [ReadOnly] public NativeArray rendererMeshLodSettings; [NativeDisableContainerSafetyRestriction, NoAlias] [WriteOnly] public NativeArray batchBinAllocOffsets; [NativeDisableContainerSafetyRestriction, NoAlias] [WriteOnly] public NativeArray batchBinCounts; @@ -426,7 +567,31 @@ bool IsInstanceFlipped(int rendererIndex) return instanceData.localToWorldIsFlippedBits.Get(instanceIndex); } - unsafe public void Execute(int batchIndex) + // Keep in sync with isMeshLodVisible from DrawCommandOutputPerBatch + private bool IsMeshLodVisible(int batchLodLevel, int rendererIndex, bool supportsCrossFade) + { + if (batchLodLevel < 0) + return true; + + var meshLodLevel = rendererMeshLodSettings[rendererIndex]; + var instanceLodLevel = meshLodLevel & ~CullingJob.k_MeshLodCrossfadeBits; + if (batchLodLevel == instanceLodLevel) + return true; + + if (!supportsCrossFade) + return false; + + var crossfadeBits = (meshLodLevel & CullingJob.k_MeshLodCrossfadeBits); + if (crossfadeBits == 0) + return false; + + // This sets sign to 1 if the 8th bit (e.g. k_MeshCrossfadeSignBit is set), and -1 otherwise. + var sign = (int)(crossfadeBits - CullingJob.k_MeshLodCrossfadeSignBit) >> 6; + + return batchLodLevel == instanceLodLevel + sign; + } + + public void Execute(int batchIndex) { // figure out how many combinations of views/features we need to partition by int configCount = binningConfig.visibilityConfigCount; @@ -446,13 +611,19 @@ unsafe public void Execute(int batchIndex) var drawBatch = drawBatches[batchIndex]; var instanceCount = drawBatch.instanceCount; var instanceOffset = drawBatch.instanceOffset; + var supportsCrossFade = (drawBatch.key.flags & BatchDrawCommandFlags.LODCrossFadeKeyword) != 0; for (int i = 0; i < instanceCount; ++i) { var rendererIndex = drawInstanceIndices[instanceOffset + i]; bool isFlipped = IsInstanceFlipped(rendererIndex); int visibilityMask = (int)rendererVisibilityMasks[rendererIndex]; - if (visibilityMask == 0) + + bool isVisible = (visibilityMask != 0); + if (!isVisible) + continue; + + if (!IsMeshLodVisible(drawBatch.key.activeMeshLod, rendererIndex, supportsCrossFade)) continue; int configIndex = (int)(visibilityMask << 1) | (isFlipped ? 1 : 0); @@ -716,6 +887,7 @@ internal unsafe struct DrawCommandOutputPerBatch : IJobParallelFor [ReadOnly] public CPUInstanceData.ReadOnly instanceData; [ReadOnly] public NativeArray rendererVisibilityMasks; + [ReadOnly] public NativeArray rendererMeshLodSettings; [ReadOnly] public NativeArray rendererCrossFadeValues; [ReadOnly] [DeallocateOnJobCompletion] public NativeArray batchBinAllocOffsets; @@ -735,11 +907,15 @@ internal unsafe struct DrawCommandOutputPerBatch : IJobParallelFor [NativeDisableContainerSafetyRestriction, NoAlias] public NativeArray indirectDrawInfoGlobalArray; [NativeDisableContainerSafetyRestriction, NoAlias] public NativeArray indirectInstanceInfoGlobalArray; - unsafe int EncodeGPUInstanceIndexAndCrossFade(int rendererIndex, bool negateCrossFade) + int EncodeGPUInstanceIndexAndCrossFade(int rendererIndex, bool negateCrossFade) { var gpuInstanceIndex = instanceDataBuffer.CPUInstanceToGPUInstance(InstanceHandle.FromInt(rendererIndex)); - int crossFadeValue = rendererCrossFadeValues[rendererIndex]; - crossFadeValue -= 127; + var crossFadeValue = (int)rendererCrossFadeValues[rendererIndex]; + + if (crossFadeValue == CullingJob.k_LODFadeOff) + return gpuInstanceIndex.index; + + crossFadeValue -= (int)CullingJob.k_LODFadeZeroPacked; if (negateCrossFade) crossFadeValue = -crossFadeValue; gpuInstanceIndex.index |= crossFadeValue << 24; @@ -753,6 +929,32 @@ bool IsInstanceFlipped(int rendererIndex) return instanceData.localToWorldIsFlippedBits.Get(instanceIndex); } + // This must be kept in sync with IsMeshLodVisible from binning pass + private bool IsMeshLodVisible(int batchLodLevel, int rendererIndex, bool supportsCrossFade, ref bool negateCrossfade) + { + if (batchLodLevel < 0) + return true; + + var meshLodSetting = rendererMeshLodSettings[rendererIndex]; + var instanceLodLevel = meshLodSetting & ~CullingJob.k_MeshLodCrossfadeBits; + if (batchLodLevel == instanceLodLevel) + return true; + + if (!supportsCrossFade) + return false; + + var crossfadeBits = (meshLodSetting & CullingJob.k_MeshLodCrossfadeBits); + if (crossfadeBits == 0) + return false; + + // This sets sign to 1 if the 8th bit (e.g. k_MeshLodCrossfadeSignBit is set), and -1 otherwise. + var sign = (int)(crossfadeBits - CullingJob.k_MeshLodCrossfadeSignBit) >> 6; + + negateCrossfade = true; + + return batchLodLevel == instanceLodLevel + sign; + } + unsafe public void Execute(int batchIndex) { DrawBatch drawBatch = drawBatches[batchIndex]; @@ -811,10 +1013,17 @@ unsafe public void Execute(int batchIndex) int visibilityMask = configIndex >> 1; if (binningConfig.supportsCrossFade) { - if ((visibilityMask & 1) != 0) + var crossFadeVisibilityBit = (visibilityMask & 1); + if (crossFadeVisibilityBit == 0) + drawFlags &= ~BatchDrawCommandFlags.LODCrossFadeKeyword; + else drawFlags |= BatchDrawCommandFlags.LODCrossFadeKeyword; visibilityMask >>= 1; } + else + { + drawFlags &= ~BatchDrawCommandFlags.LODCrossFadeKeyword; + } if (binningConfig.supportsMotionCheck) { if ((visibilityMask & 1) != 0 && rangeSupportsMotion) @@ -887,6 +1096,7 @@ unsafe public void Execute(int batchIndex) sortingPosition = sortingPosition, meshID = drawBatch.key.meshID, submeshIndex = (ushort)drawBatch.key.submeshIndex, + activeMeshLod = (ushort)drawBatch.key.activeMeshLod, }; } } @@ -894,6 +1104,7 @@ unsafe public void Execute(int batchIndex) // write the visible instances var instanceOffset = drawBatch.instanceOffset; var instanceCount = drawBatch.instanceCount; + var supportsCrossFade = (drawBatch.key.flags & BatchDrawCommandFlags.LODCrossFadeKeyword) != 0; var lastRendererIndex = 0; if (binCount > 1) { @@ -903,7 +1114,13 @@ unsafe public void Execute(int batchIndex) bool isFlipped = IsInstanceFlipped(rendererIndex); int visibilityMask = (int)rendererVisibilityMasks[rendererIndex]; - if (visibilityMask == 0) + + bool isVisible = (visibilityMask != 0); + if (!isVisible) + continue; + + bool negateCrossFade = false; + if (!IsMeshLodVisible(drawBatch.key.activeMeshLod, rendererIndex, supportsCrossFade, ref negateCrossFade)) continue; lastRendererIndex = rendererIndex; @@ -914,6 +1131,8 @@ unsafe public void Execute(int batchIndex) var visibleInstanceOffset = instanceOffsetPerConfig[configIndex]; instanceOffsetPerConfig[configIndex]++; + var instanceIndexAndCrossFade = EncodeGPUInstanceIndexAndCrossFade(rendererIndex, negateCrossFade); + if (isIndirect) { #if DEBUG @@ -930,7 +1149,7 @@ unsafe public void Execute(int batchIndex) indirectInstanceInfoGlobalArray[indirectAllocInfo.instanceAllocIndex + visibleInstanceOffset] = new IndirectInstanceInfo { drawOffsetAndSplitMask = (drawCommandOffsetPerConfig[configIndex] << 8) | visibilityMask, - instanceIndexAndCrossFade = EncodeGPUInstanceIndexAndCrossFade(rendererIndex, false), + instanceIndexAndCrossFade = instanceIndexAndCrossFade, }; } else @@ -939,7 +1158,7 @@ unsafe public void Execute(int batchIndex) if (visibleInstanceOffset >= output.visibleInstanceCount) throw new Exception("Exceeding visible instance count"); #endif - output.visibleInstances[visibleInstanceOffset] = EncodeGPUInstanceIndexAndCrossFade(rendererIndex, false); + output.visibleInstances[visibleInstanceOffset] = instanceIndexAndCrossFade; } } } @@ -955,7 +1174,15 @@ unsafe public void Execute(int batchIndex) if (!isVisible) continue; + bool negateCrossFade = false; + if (!IsMeshLodVisible(drawBatch.key.activeMeshLod, rendererIndex, supportsCrossFade, ref negateCrossFade)) + continue; + lastRendererIndex = rendererIndex; + + var instanceIndexAndCrossFade = EncodeGPUInstanceIndexAndCrossFade(rendererIndex, negateCrossFade); + + // only one bin for this batch if (isIndirect) { // remove extra bits so that the visibility mask is just the view mask @@ -967,12 +1194,12 @@ unsafe public void Execute(int batchIndex) indirectInstanceInfoGlobalArray[indirectAllocInfo.instanceAllocIndex + visibleInstanceOffset] = new IndirectInstanceInfo { drawOffsetAndSplitMask = (batchDrawCommandOffset << 8) | visibilityMask, - instanceIndexAndCrossFade = EncodeGPUInstanceIndexAndCrossFade(rendererIndex, false), + instanceIndexAndCrossFade = instanceIndexAndCrossFade, }; } else { - output.visibleInstances[visibleInstanceOffset] = EncodeGPUInstanceIndexAndCrossFade(rendererIndex, false); + output.visibleInstances[visibleInstanceOffset] = instanceIndexAndCrossFade; } visibleInstanceOffset++; } @@ -1041,6 +1268,7 @@ internal unsafe struct DrawCommandOutputFiltering : IJob [ReadOnly] public GPUInstanceDataBuffer.ReadOnly instanceDataBuffer; [ReadOnly] public NativeArray rendererVisibilityMasks; + [ReadOnly] public NativeArray rendererMeshLodSettings; [ReadOnly] public NativeArray rendererCrossFadeValues; [ReadOnly] public CPUInstanceData.ReadOnly instanceData; @@ -1100,6 +1328,8 @@ public void Execute() { var rendererIndex = drawInstanceIndices[instanceOffset + i]; var visibilityMask = rendererVisibilityMasks[rendererIndex]; + if (drawBatch.key.activeMeshLod >= 0 && drawBatch.key.activeMeshLod != rendererMeshLodSettings[rendererIndex]) + visibilityMask = 0; if (visibilityMask == 0) continue; @@ -1464,6 +1694,13 @@ public void MoveToDebugStatsAndClear(DebugRendererBatcherStats debugStats) internal struct InstanceCuller : IDisposable { + private struct AnimatedFadeData + { + public int cameraID; + public JobHandle jobHandle; + } + + private NativeParallelHashMap m_LODParamsToCameraID; //@ Move this in CPUInstanceData. private ParallelBitArray m_CompactedVisibilityMasks; private JobHandle m_CompactedVisibilityMasksJobsHandle; @@ -1526,24 +1763,75 @@ internal void Init(GPUResidentDrawerResources resources, DebugRendererBatcherSta m_CommandBuffer = new CommandBuffer(); m_CommandBuffer.name = "EnsureValidOcclusionTestResults"; + + m_LODParamsToCameraID = new NativeParallelHashMap(16, Allocator.Persistent); + } + + + // This relies on the fact that camera culling is scheduled ahead of shadow culling. + private JobHandle AnimateCrossFades(CPUPerCameraInstanceData perCameraInstanceData, BatchCullingContext cc, out CPUPerCameraInstanceData.PerCameraInstanceDataArrays cameraInstanceData, out bool hasAnimatedCrossfade) + { + var lodHash = cc.lodParameters.GetHashCode(); + hasAnimatedCrossfade = m_LODParamsToCameraID.TryGetValue(lodHash, out var animatedFadeData); + + if (hasAnimatedCrossfade) + { + cameraInstanceData = perCameraInstanceData.perCameraData[animatedFadeData.cameraID]; + Assert.IsTrue(cameraInstanceData.IsCreated); + return animatedFadeData.jobHandle; + } + + if (cc.viewType != BatchCullingViewType.Camera && !hasAnimatedCrossfade) + { + // For picking / filtering and outlining passes. We do not have animated crossfade data. + cameraInstanceData = new CPUPerCameraInstanceData.PerCameraInstanceDataArrays(); + return new JobHandle(); + } + + //For main camera, animate crossfades, and store the result in the hashmap to be retrieved by other cameras + var viewID = cc.viewID.GetInstanceID(); + + hasAnimatedCrossfade = perCameraInstanceData.perCameraData.TryGetValue(viewID, out var tmpCameraInstanceData); + if (hasAnimatedCrossfade == false) + { + // For picking / filtering and outlining passes. We do not have animated crossfade data. + cameraInstanceData = new CPUPerCameraInstanceData.PerCameraInstanceDataArrays(); + return new JobHandle(); + } + + cameraInstanceData = tmpCameraInstanceData; + Assert.IsTrue(cameraInstanceData.IsCreated); + + var handle = new AnimateCrossFadeJob() + { + deltaTime = Time.deltaTime, + crossFadeArray = cameraInstanceData.crossFades + }.Schedule(perCameraInstanceData.instancesLength, AnimateCrossFadeJob.k_BatchSize); + + m_LODParamsToCameraID.TryAdd(lodHash, new AnimatedFadeData(){ cameraID = viewID, jobHandle = handle}); + return handle; } [BurstCompile(DisableSafetyChecks = true, OptimizeFor = OptimizeFor.Performance)] private unsafe struct SetupCullingJobInput : IJob { public float lodBias; + public float meshLodThreshold; [NativeDisableUnsafePtrRestriction] public BatchCullingContext* context; [NativeDisableUnsafePtrRestriction] public ReceiverPlanes* receiverPlanes; [NativeDisableUnsafePtrRestriction] public ReceiverSphereCuller* receiverSphereCuller; [NativeDisableUnsafePtrRestriction] public FrustumPlaneCuller* frustumPlaneCuller; [NativeDisableUnsafePtrRestriction] public float* screenRelativeMetric; + [NativeDisableUnsafePtrRestriction] public float* meshLodConstant; public void Execute() { *receiverPlanes = ReceiverPlanes.Create(*context, Allocator.TempJob); *receiverSphereCuller = ReceiverSphereCuller.Create(*context, Allocator.TempJob); *frustumPlaneCuller = FrustumPlaneCuller.Create(*context, receiverPlanes->planes.AsArray(), *receiverSphereCuller, Allocator.TempJob); - *screenRelativeMetric = LODGroupRenderingUtils.CalculateScreenRelativeMetric(context->lodParameters, lodBias); + *screenRelativeMetric = LODRenderingUtils.CalculateScreenRelativeMetricNoBias(context->lodParameters); + *meshLodConstant = LODRenderingUtils.CalculateMeshLodConstant(context->lodParameters, *screenRelativeMetric, meshLodThreshold); + *screenRelativeMetric /= lodBias; } } @@ -1551,11 +1839,13 @@ private unsafe JobHandle CreateFrustumCullingJob( in BatchCullingContext cc, in CPUInstanceData.ReadOnly instanceData, in CPUSharedInstanceData.ReadOnly sharedInstanceData, + in CPUPerCameraInstanceData perCameraInstanceData, NativeList lodGroupCullingData, in BinningConfig binningConfig, float smallMeshScreenPercentage, OcclusionCullingCommon occlusionCullingCommon, NativeArray rendererVisibilityMasks, + NativeArray rendererMeshLodSettings, NativeArray rendererCrossFadeValues) { Assert.IsTrue(cc.cullingSplits.Length <= 6, "InstanceCullingBatcher supports up to 6 culling splits."); @@ -1564,24 +1854,28 @@ private unsafe JobHandle CreateFrustumCullingJob( ReceiverSphereCuller receiverSphereCuller; FrustumPlaneCuller frustumPlaneCuller; float screenRelativeMetric; + float meshLodConstant; fixed (BatchCullingContext* contextPtr = &cc) { new SetupCullingJobInput() { lodBias = QualitySettings.lodBias, + meshLodThreshold = QualitySettings.meshLodThreshold, context = contextPtr, frustumPlaneCuller = &frustumPlaneCuller, receiverPlanes = &receiverPlanes, receiverSphereCuller = &receiverSphereCuller, screenRelativeMetric = &screenRelativeMetric, - + meshLodConstant = &meshLodConstant, }.Run(); } if (occlusionCullingCommon != null) occlusionCullingCommon.UpdateSilhouettePlanes(cc.viewID.GetInstanceID(), receiverPlanes.SilhouettePlaneSubArray()); + var jobHandle = AnimateCrossFades(perCameraInstanceData, cc, out var cameraInstanceData, out var hasAnimatedCrossfade); + var cullingJob = new CullingJob { binningConfig = binningConfig, @@ -1593,20 +1887,23 @@ private unsafe JobHandle CreateFrustumCullingJob( worldToLightSpaceRotation = receiverSphereCuller.worldToLightSpaceRotation, cullLightmappedShadowCasters = (cc.cullingFlags & BatchCullingFlags.CullLightmappedShadowCasters) != 0, cameraPosition = cc.lodParameters.cameraPosition, + sqrMeshLodSelectionConstant = meshLodConstant * meshLodConstant, sqrScreenRelativeMetric = screenRelativeMetric * screenRelativeMetric, minScreenRelativeHeight = smallMeshScreenPercentage * 0.01f, isOrtho = cc.lodParameters.isOrthographic, + animateCrossFades = hasAnimatedCrossfade, instanceData = instanceData, sharedInstanceData = sharedInstanceData, + cameraInstanceData = cameraInstanceData, lodGroupCullingData = lodGroupCullingData, occlusionBuffer = cc.occlusionBuffer, rendererVisibilityMasks = rendererVisibilityMasks, + rendererMeshLodSettings = rendererMeshLodSettings, rendererCrossFadeValues = rendererCrossFadeValues, maxLOD = QualitySettings.maximumLODLevel, cullingLayerMask = cc.cullingLayerMask, sceneCullingMask = cc.sceneCullingMask, - - }.Schedule(instanceData.instancesLength, CullingJob.k_BatchSize); + }.Schedule(instanceData.instancesLength, CullingJob.k_BatchSize, jobHandle); receiverPlanes.Dispose(cullingJob); frustumPlaneCuller.Dispose(cullingJob); @@ -1618,14 +1915,14 @@ private unsafe JobHandle CreateFrustumCullingJob( private int ComputeWorstCaseDrawCommandCount( in BatchCullingContext cc, BinningConfig binningConfig, - CPUDrawInstanceData drawInstanceData, - int crossFadedRendererCount) + CPUDrawInstanceData drawInstanceData) { int visibleInstancesCount = drawInstanceData.drawInstances.Length; int drawCommandCount = drawInstanceData.drawBatches.Length; // add the number of batches split due to actively cross-fading - drawCommandCount += math.min(crossFadedRendererCount, drawCommandCount); + if (binningConfig.supportsCrossFade) + drawCommandCount *= 2; // batches can be split due to flip winding drawCommandCount *= 2; @@ -1653,11 +1950,11 @@ public unsafe JobHandle CreateCullJobTree( BatchCullingOutput cullingOutput, in CPUInstanceData.ReadOnly instanceData, in CPUSharedInstanceData.ReadOnly sharedInstanceData, + in CPUPerCameraInstanceData perCameraInstanceData, in GPUInstanceDataBuffer.ReadOnly instanceDataBuffer, NativeList lodGroupCullingData, CPUDrawInstanceData drawInstanceData, NativeParallelHashMap batchIDs, - int crossFadedRendererCount, float smallMeshScreenPercentage, OcclusionCullingCommon occlusionCullingCommon) { @@ -1673,16 +1970,17 @@ public unsafe JobHandle CreateCullJobTree( var binningConfig = new BinningConfig { viewCount = cc.cullingSplits.Length, - supportsCrossFade = (crossFadedRendererCount > 0), + supportsCrossFade = QualitySettings.enableLODCrossFade, supportsMotionCheck = (cc.viewType == BatchCullingViewType.Camera), // TODO: could disable here if RP never needs object motion vectors, for now always batch on it }; var visibilityLength = instanceData.handlesLength; var rendererVisibilityMasks = new NativeArray(visibilityLength, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); var rendererCrossFadeValues = new NativeArray(visibilityLength, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); + var rendererMeshLodSettings = new NativeArray(visibilityLength, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); - var cullingJobHandle = CreateFrustumCullingJob(cc, instanceData, sharedInstanceData, lodGroupCullingData, binningConfig, - smallMeshScreenPercentage, occlusionCullingCommon, rendererVisibilityMasks, rendererCrossFadeValues); + var cullingJobHandle = CreateFrustumCullingJob(cc, instanceData, sharedInstanceData, perCameraInstanceData, lodGroupCullingData, binningConfig, + smallMeshScreenPercentage, occlusionCullingCommon, rendererVisibilityMasks, rendererMeshLodSettings, rendererCrossFadeValues); #if UNITY_EDITOR // Unfortunately BatchCullingContext doesn't provide full visibility and picking context. @@ -1698,13 +1996,13 @@ public unsafe JobHandle CreateCullJobTree( { // This outputs picking draw commands for the objects that can be picked. cullingJobHandle = CreatePickingCullingOutputJob_EditorOnly(cc, cullingOutput, instanceData, sharedInstanceData, instanceDataBuffer, - drawInstanceData, batchIDs, rendererVisibilityMasks, rendererCrossFadeValues, cullingJobHandle); + drawInstanceData, batchIDs, rendererVisibilityMasks, rendererMeshLodSettings, rendererCrossFadeValues, cullingJobHandle); } else if (cc.viewType == BatchCullingViewType.Filtering) { // This outputs draw commands for the objects filtered by search input in the hierarchy on in the scene view. - cullingJobHandle = CreateFilteringCullingOutputJob_EditorOnly(cc, cullingOutput, instanceData, sharedInstanceData, instanceDataBuffer, drawInstanceData, - batchIDs, rendererVisibilityMasks, rendererCrossFadeValues, cullingJobHandle); + cullingJobHandle = CreateFilteringCullingOutputJob_EditorOnly(cc, cullingOutput, instanceData, sharedInstanceData, instanceDataBuffer, + drawInstanceData, batchIDs, rendererVisibilityMasks, rendererMeshLodSettings, rendererCrossFadeValues, cullingJobHandle); } #endif // This outputs regular draw commands. @@ -1719,7 +2017,7 @@ public unsafe JobHandle CreateCullJobTree( } var batchCount = drawInstanceData.drawBatches.Length; - int maxBinCount = ComputeWorstCaseDrawCommandCount(cc, binningConfig, drawInstanceData, crossFadedRendererCount); + int maxBinCount = ComputeWorstCaseDrawCommandCount(cc, binningConfig, drawInstanceData); var batchBinAllocOffsets = new NativeArray(batchCount, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); var batchBinCounts = new NativeArray(batchCount, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); @@ -1748,6 +2046,7 @@ public unsafe JobHandle CreateCullJobTree( drawInstanceIndices = drawInstanceData.drawInstanceIndices, instanceData = instanceData, rendererVisibilityMasks = rendererVisibilityMasks, + rendererMeshLodSettings = rendererMeshLodSettings, batchBinAllocOffsets = batchBinAllocOffsets, batchBinCounts = batchBinCounts, binAllocCounter = binAllocCounter, @@ -1787,6 +2086,7 @@ public unsafe JobHandle CreateCullJobTree( drawInstanceIndices = drawInstanceData.drawInstanceIndices, instanceData = instanceData, rendererVisibilityMasks = rendererVisibilityMasks, + rendererMeshLodSettings = rendererMeshLodSettings, rendererCrossFadeValues = rendererCrossFadeValues, batchBinAllocOffsets = batchBinAllocOffsets, batchBinCounts = batchBinCounts, @@ -1813,6 +2113,7 @@ public unsafe JobHandle CreateCullJobTree( cullingJobHandle = rendererVisibilityMasks.Dispose(cullingJobHandle); cullingJobHandle = rendererCrossFadeValues.Dispose(cullingJobHandle); + cullingJobHandle = rendererMeshLodSettings.Dispose(cullingJobHandle); return cullingJobHandle; } @@ -1886,7 +2187,7 @@ private JobHandle CreateSceneViewHiddenObjectsCullingJob_EditorOnly(in BatchCull private JobHandle CreateFilteringCullingOutputJob_EditorOnly(in BatchCullingContext cc, BatchCullingOutput cullingOutput, in CPUInstanceData.ReadOnly instanceData, in CPUSharedInstanceData.ReadOnly sharedInstanceData, in GPUInstanceDataBuffer.ReadOnly instanceDataBuffer, - in CPUDrawInstanceData drawInstanceData, NativeParallelHashMap batchIDs, NativeArray rendererVisibilityMasks, + in CPUDrawInstanceData drawInstanceData, NativeParallelHashMap batchIDs, NativeArray rendererVisibilityMasks, NativeArray rendererMeshLodSettings, NativeArray rendererCrossFadeValues, JobHandle cullingJobHandle) { NativeArray filteredRenderers = new NativeArray(sharedInstanceData.rendererGroupIDs.Length, Allocator.TempJob); @@ -1899,6 +2200,7 @@ private JobHandle CreateFilteringCullingOutputJob_EditorOnly(in BatchCullingCont batchIDs = batchIDs, instanceDataBuffer = instanceDataBuffer, rendererVisibilityMasks = rendererVisibilityMasks, + rendererMeshLodSettings = rendererMeshLodSettings, rendererCrossFadeValues = rendererCrossFadeValues, instanceData = instanceData, sharedInstanceData = sharedInstanceData, @@ -1923,6 +2225,7 @@ private JobHandle CreateFilteringCullingOutputJob_EditorOnly(in BatchCullingCont private JobHandle CreatePickingCullingOutputJob_EditorOnly(in BatchCullingContext cc, BatchCullingOutput cullingOutput, in CPUInstanceData.ReadOnly instanceData, in CPUSharedInstanceData.ReadOnly sharedInstanceData, in GPUInstanceDataBuffer.ReadOnly instanceDataBuffer, in CPUDrawInstanceData drawInstanceData, NativeParallelHashMap batchIDs, NativeArray rendererVisibilityMasks, + NativeArray rendererMeshLodSettings, NativeArray rendererCrossFadeValues, JobHandle cullingJobHandle) { // GPUResindetDrawer doesn't handle rendering of persistent game objects like prefabs. They are rendered by SRP. @@ -1940,6 +2243,7 @@ private JobHandle CreatePickingCullingOutputJob_EditorOnly(in BatchCullingContex batchIDs = batchIDs, instanceDataBuffer = instanceDataBuffer, rendererVisibilityMasks = rendererVisibilityMasks, + rendererMeshLodSettings = rendererMeshLodSettings, rendererCrossFadeValues = rendererCrossFadeValues, instanceData = instanceData, sharedInstanceData = sharedInstanceData, @@ -1965,7 +2269,6 @@ private JobHandle CreatePickingCullingOutputJob_EditorOnly(in BatchCullingContex } #endif - public void InstanceOccludersUpdated(int viewInstanceID, int subviewMask, RenderersBatchersContext batchersContext) { if (m_DebugStats?.enabled ?? false) @@ -2310,10 +2613,12 @@ private void OnEndSceneViewCameraRendering() #endif } - public void UpdateFrame() + public void UpdateFrame(int cameraCount) { - DisposeSceneViewHiddenBits(); DisposeCompactVisibilityMasks(); + if (cameraCount > m_LODParamsToCameraID.Capacity) + m_LODParamsToCameraID.Capacity = cameraCount; + m_LODParamsToCameraID.Clear(); FlushDebugCounters(); m_IndirectStorage.ClearContextsAndGrowBuffers(); } @@ -2341,6 +2646,7 @@ public void Dispose() m_ShaderVariables.Dispose(); m_ConstantBuffer.Release(); m_CommandBuffer.Dispose(); + m_LODParamsToCameraID.Dispose(); } } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCullingBatcher.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCullingBatcher.cs index ff4cd2a3bb2..a6423ab2106 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCullingBatcher.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceCullingBatcher.cs @@ -1,6 +1,7 @@ using System; using System.Threading; using UnityEngine.Assertions; +using Unity.Mathematics; using Unity.Collections; using Unity.Jobs; using Unity.Jobs.LowLevel.Unsafe; @@ -391,6 +392,7 @@ public void ProcessRenderer(int i) { var meshIndex = rendererData.meshIndex[i]; var meshID = rendererData.meshID[meshIndex]; + var meshLodInfo = rendererData.meshLodInfo[meshIndex]; var submeshCount = rendererData.subMeshCount[meshIndex]; var subMeshDescOffset = rendererData.subMeshDescOffset[meshIndex]; var batchMeshID = batchMeshHash[meshID]; @@ -522,15 +524,21 @@ public void ProcessRenderer(int i) if (packedMaterialData.isTransparent) flags |= BatchDrawCommandFlags.HasSortingPosition; + if (packedMaterialData.supportsCrossFade) + flags |= BatchDrawCommandFlags.LODCrossFadeKeyword; + + int lodLoopCount = math.max(meshLodInfo.levelCount, 1); + + for (int lodLoopIndex = 0; lodLoopIndex < lodLoopCount; ++lodLoopIndex) { var submeshIndex = startSubMesh + matIndex; - var subMeshDesc = rendererData.subMeshDesc[subMeshDescOffset + submeshIndex]; - + var subMeshDesc = rendererData.subMeshDesc[subMeshDescOffset + submeshIndex*lodLoopCount + lodLoopIndex]; var drawKey = new DrawKey { materialID = batchMaterialID, meshID = batchMeshID, submeshIndex = submeshIndex, + activeMeshLod = meshLodInfo.lodSelectionActive ? lodLoopIndex : -1, flags = flags, transparentInstanceId = packedMaterialData.isTransparent ? rendererGroupID : 0, range = rangeKey, @@ -926,11 +934,11 @@ public unsafe JobHandle OnPerformCulling( cullingOutput, m_BatchersContext.instanceData, m_BatchersContext.sharedInstanceData, + m_BatchersContext.perCameraInstanceData, m_BatchersContext.instanceDataBuffer, m_BatchersContext.lodGroupCullingData, m_DrawInstanceData, m_GlobalBatchIDs, - m_BatchersContext.crossfadedRendererCount, m_BatchersContext.smallMeshScreenPercentage, allowOcclusionCulling ? m_BatchersContext.occlusionCullingCommon : null); @@ -1115,7 +1123,7 @@ public void InstanceOccludersUpdated(int viewInstanceID, int subviewMask) public void UpdateFrame() { - m_Culler.UpdateFrame(); + m_Culler.UpdateFrame(m_BatchersContext.cameraCount); } public ParallelBitArray GetCompactedVisibilityMasks(bool syncCullingJobs) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceData.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceData.cs index f20b2891bdb..8572ba3b6a1 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceData.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceData.cs @@ -26,6 +26,7 @@ internal struct CPUInstanceData : IDisposable public ParallelBitArray movedInPreviousFrameBits; public ParallelBitArray visibleInPreviousFrameBits; public EditorInstanceDataArrays editorData; + public NativeArray meshLodData; public int instancesLength { get => m_StructData[0]; set => m_StructData[0] = value; } public int instancesCapacity { get => m_StructData[1]; set => m_StructData[1] = value; } @@ -48,6 +49,7 @@ public void Initialize(int initCapacity) movedInPreviousFrameBits = new ParallelBitArray(instancesCapacity, Allocator.Persistent); visibleInPreviousFrameBits = new ParallelBitArray(instancesCapacity, Allocator.Persistent); editorData.Initialize(initCapacity); + meshLodData = new NativeArray(instancesCapacity, Allocator.Persistent); } public void Dispose() @@ -63,6 +65,7 @@ public void Dispose() movedInPreviousFrameBits.Dispose(); visibleInPreviousFrameBits.Dispose(); editorData.Dispose(); + meshLodData.Dispose(); } private void Grow(int newCapacity) @@ -81,6 +84,7 @@ private void Grow(int newCapacity) movedInPreviousFrameBits.Resize(newCapacity); visibleInPreviousFrameBits.Resize(newCapacity); editorData.Grow(newCapacity); + meshLodData.ResizeArray(newCapacity); instancesCapacity = newCapacity; } @@ -185,6 +189,7 @@ public void Remove(InstanceHandle instance) movedInPreviousFrameBits.Set(index, movedInPreviousFrameBits.Get(lastIndex)); visibleInPreviousFrameBits.Set(index, visibleInPreviousFrameBits.Get(lastIndex)); editorData.Remove(index, lastIndex); + meshLodData[index] = meshLodData[lastIndex]; m_InstanceIndices[instances[lastIndex].index] = index; m_InstanceIndices[instance.index] = k_InvalidIndex; @@ -192,7 +197,7 @@ public void Remove(InstanceHandle instance) } public void Set(InstanceHandle instance, SharedInstanceHandle sharedInstance, bool localToWorldIsFlipped, in AABB worldAABB, int tetrahedronCacheIndex, - bool movedInCurrentFrame, bool movedInPreviousFrame, bool visibleInPreviousFrame) + bool movedInCurrentFrame, bool movedInPreviousFrame, bool visibleInPreviousFrame, in GPUDrivenRendererMeshLodData meshLod) { int index = InstanceToIndex(instance); sharedInstances[index] = sharedInstance; @@ -203,11 +208,12 @@ public void Set(InstanceHandle instance, SharedInstanceHandle sharedInstance, bo movedInPreviousFrameBits.Set(index, movedInPreviousFrame); visibleInPreviousFrameBits.Set(index, visibleInPreviousFrame); editorData.SetDefault(index); + meshLodData[index] = meshLod; } public void SetDefault(InstanceHandle instance) { - Set(instance, SharedInstanceHandle.Invalid, false, new AABB(), k_InvalidIndex, false, false, false); + Set(instance, SharedInstanceHandle.Invalid, false, new AABB(), k_InvalidIndex, false, false, false, new GPUDrivenRendererMeshLodData()); } // These accessors just for convenience and additional safety. @@ -220,6 +226,7 @@ public void SetDefault(InstanceHandle instance) public bool Get_MovedInCurrentFrame(InstanceHandle instance) { return movedInCurrentFrameBits.Get(InstanceToIndex(instance)); } public bool Get_MovedInPreviousFrame(InstanceHandle instance) { return movedInPreviousFrameBits.Get(InstanceToIndex(instance)); } public bool Get_VisibleInPreviousFrame(InstanceHandle instance) { return visibleInPreviousFrameBits.Get(InstanceToIndex(instance)); } + public GPUDrivenRendererMeshLodData Get_MeshLodData(InstanceHandle instance) { return meshLodData[InstanceToIndex(instance)]; } public void Set_SharedInstance(InstanceHandle instance, SharedInstanceHandle sharedInstance) { sharedInstances[InstanceToIndex(instance)] = sharedInstance; } public void Set_LocalToWorldIsFlipped(InstanceHandle instance, bool isFlipped) { localToWorldIsFlippedBits.Set(InstanceToIndex(instance), isFlipped); } @@ -228,6 +235,7 @@ public void SetDefault(InstanceHandle instance) public void Set_MovedInCurrentFrame(InstanceHandle instance, bool movedInCurrentFrame) { movedInCurrentFrameBits.Set(InstanceToIndex(instance), movedInCurrentFrame); } public void Set_MovedInPreviousFrame(InstanceHandle instance, bool movedInPreviousFrame) { movedInPreviousFrameBits.Set(InstanceToIndex(instance), movedInPreviousFrame); } public void Set_VisibleInPreviousFrame(InstanceHandle instance, bool visibleInPreviousFrame) { visibleInPreviousFrameBits.Set(InstanceToIndex(instance), visibleInPreviousFrame); } + public void Set_MeshLodData(InstanceHandle instance, GPUDrivenRendererMeshLodData meshLod) { meshLodData[InstanceToIndex(instance)] = meshLod; } public ReadOnly AsReadOnly() { @@ -246,6 +254,7 @@ internal readonly struct ReadOnly public readonly ParallelBitArray movedInPreviousFrameBits; public readonly ParallelBitArray visibleInPreviousFrameBits; public readonly EditorInstanceDataArrays.ReadOnly editorData; + public readonly NativeArray.ReadOnly meshLodData; public readonly int handlesLength => instanceIndices.Length; public readonly int instancesLength => instances.Length; @@ -261,6 +270,7 @@ public ReadOnly(in CPUInstanceData instanceData) movedInPreviousFrameBits = instanceData.movedInPreviousFrameBits.GetSubArray(instanceData.instancesLength);//.AsReadOnly(); // Implement later. visibleInPreviousFrameBits = instanceData.visibleInPreviousFrameBits.GetSubArray(instanceData.instancesLength);//.AsReadOnly(); // Implement later. editorData = new EditorInstanceDataArrays.ReadOnly(instanceData); + meshLodData = instanceData.meshLodData.GetSubArray(0, instanceData.instancesLength).AsReadOnly(); } public int InstanceToIndex(InstanceHandle instance) @@ -297,6 +307,142 @@ public bool IsValidIndex(int index) } } + internal struct CPUPerCameraInstanceData : IDisposable + { + public const byte k_InvalidByteData = 0xff; + + public NativeParallelHashMap perCameraData; + + private NativeArray m_StructData; + public int instancesLength { get => m_StructData[0]; set => m_StructData[0] = value; } + public int instancesCapacity { get => m_StructData[1]; set => m_StructData[1] = value; } + + public int cameraCount { get { return perCameraData.Count();}} + + internal struct PerCameraInstanceDataArrays : IDisposable + { + internal UnsafeList meshLods; + internal UnsafeList crossFades; + + public bool IsCreated => meshLods.IsCreated && crossFades.IsCreated; + + public PerCameraInstanceDataArrays(int initCapacity) + { + meshLods = new UnsafeList(initCapacity, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); + meshLods.Length = initCapacity; + crossFades = new UnsafeList(initCapacity, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); + crossFades.Length = initCapacity; + } + + public void Dispose() + { + meshLods.Dispose(); + crossFades.Dispose(); + } + + internal void Remove(int index, int lastIndex) + { + meshLods[index] = meshLods[lastIndex]; + crossFades[index] = crossFades[lastIndex]; + } + + internal void Grow(int previousCapacity, int newCapacity) + { + meshLods.Length = newCapacity; + crossFades.Length = newCapacity; + } + + internal void SetDefault(int index) + { + meshLods[index] = k_InvalidByteData; + crossFades[index] = k_InvalidByteData; + } + } + + public void Initialize(int initCapacity) + { + perCameraData = new NativeParallelHashMap(1,Allocator.Persistent); + m_StructData = new NativeArray(2, Allocator.Persistent); + instancesCapacity = initCapacity; + instancesLength = 0; + } + + public void DeallocateCameras(NativeArray cameraIDs) + { + foreach (var cameraID in cameraIDs) + { + if (!perCameraData.TryGetValue(cameraID, out var perCameraInstanceData)) + continue; + + perCameraInstanceData.Dispose(); + perCameraData.Remove(cameraID); + } + } + + public void AllocateCameras(NativeArray cameraIDs) + { + foreach (var cameraID in cameraIDs) + { + if (perCameraData.TryGetValue(cameraID, out var cameraInstanceData)) + continue; + + cameraInstanceData = new PerCameraInstanceDataArrays(instancesCapacity); + perCameraData.Add(cameraID, cameraInstanceData); + } + } + + public void Remove(int index) + { + int lastIndex = instancesLength - 1; + + foreach (var pair in perCameraData) + { + pair.Value.Remove(index, lastIndex); + } + + instancesLength -= 1; + } + + public void IncreaseInstanceCount() + { + instancesLength++; + } + + public void Dispose() + { + foreach (var pair in perCameraData) + { + pair.Value.Dispose(); + } + + m_StructData.Dispose(); + perCameraData.Dispose(); + } + + internal void Grow(int newCapacity) + { + if(newCapacity < instancesCapacity) + return; + + var previousCapacity = instancesCapacity; + instancesCapacity = newCapacity; + + foreach (var pair in perCameraData) + { + pair.Value.Grow(previousCapacity, instancesCapacity); + } + } + + public void SetDefault(int index) + { + foreach (var pair in perCameraData) + { + pair.Value.SetDefault(index); + } + } + + } + internal struct CPUSharedInstanceData : IDisposable { private const int k_InvalidIndex = -1; @@ -316,6 +462,7 @@ internal struct CPUSharedInstanceData : IDisposable public NativeArray localAABBs; public NativeArray flags; public NativeArray lodGroupAndMasks; + public NativeArray meshLodInfos; public NativeArray gameObjectLayers; public NativeArray refCounts; @@ -337,6 +484,7 @@ public void Initialize(int initCapacity) flags = new NativeArray(instancesCapacity, Allocator.Persistent); lodGroupAndMasks = new NativeArray(instancesCapacity, Allocator.Persistent); lodGroupAndMasks.FillArray(k_InvalidLODGroupAndMask); + meshLodInfos = new NativeArray(instancesCapacity, Allocator.Persistent); gameObjectLayers = new NativeArray(instancesCapacity, Allocator.Persistent); refCounts = new NativeArray(instancesCapacity, Allocator.Persistent); } @@ -358,6 +506,7 @@ public void Dispose() localAABBs.Dispose(); flags.Dispose(); lodGroupAndMasks.Dispose(); + meshLodInfos.Dispose(); gameObjectLayers.Dispose(); refCounts.Dispose(); } @@ -376,6 +525,7 @@ private void Grow(int newCapacity) flags.ResizeArray(newCapacity); lodGroupAndMasks.ResizeArray(newCapacity); lodGroupAndMasks.FillArray(k_InvalidLODGroupAndMask, instancesCapacity); + meshLodInfos.ResizeArray(newCapacity); gameObjectLayers.ResizeArray(newCapacity); refCounts.ResizeArray(newCapacity); @@ -492,6 +642,7 @@ public void Remove(SharedInstanceHandle instance) localAABBs[index] = localAABBs[lastIndex]; flags[index] = flags[lastIndex]; lodGroupAndMasks[index] = lodGroupAndMasks[lastIndex]; + meshLodInfos[index] = meshLodInfos[lastIndex]; gameObjectLayers[index] = gameObjectLayers[lastIndex]; refCounts[index] = refCounts[lastIndex]; @@ -526,7 +677,7 @@ public void Set_MaterialIDs(SharedInstanceHandle instance, in SmallIntegerArray } public void Set(SharedInstanceHandle instance, int rendererGroupID, in SmallIntegerArray materialIDs, int meshID, in AABB localAABB, TransformUpdateFlags transformUpdateFlags, - InstanceFlags instanceFlags, uint lodGroupAndMask, int gameObjectLayer, int refCount) + InstanceFlags instanceFlags, uint lodGroupAndMask, GPUDrivenMeshLodInfo meshLodInfo, int gameObjectLayer, int refCount) { int index = SharedInstanceToIndex(instance); @@ -537,13 +688,14 @@ public void Set(SharedInstanceHandle instance, int rendererGroupID, in SmallInte localAABBs[index] = localAABB; flags[index] = new CPUSharedInstanceFlags { transformUpdateFlags = transformUpdateFlags, instanceFlags = instanceFlags }; lodGroupAndMasks[index] = lodGroupAndMask; + meshLodInfos[index] = meshLodInfo; gameObjectLayers[index] = gameObjectLayer; refCounts[index] = refCount; } public void SetDefault(SharedInstanceHandle instance) { - Set(instance, 0, default, 0, new AABB(), TransformUpdateFlags.None, InstanceFlags.None, k_InvalidLODGroupAndMask, 0, 0); + Set(instance, 0, default, 0, new AABB(), TransformUpdateFlags.None, InstanceFlags.None, k_InvalidLODGroupAndMask, new GPUDrivenMeshLodInfo(), 0, 0); } public ReadOnly AsReadOnly() @@ -561,6 +713,7 @@ internal readonly struct ReadOnly public readonly NativeArray.ReadOnly localAABBs; public readonly NativeArray.ReadOnly flags; public readonly NativeArray.ReadOnly lodGroupAndMasks; + public readonly NativeArray.ReadOnly meshLodInfos; public readonly NativeArray.ReadOnly gameObjectLayers; public readonly NativeArray.ReadOnly refCounts; public readonly int handlesLength => instanceIndices.Length; @@ -576,6 +729,7 @@ public ReadOnly(in CPUSharedInstanceData instanceData) localAABBs = instanceData.localAABBs.GetSubArray(0, instanceData.instancesLength).AsReadOnly(); flags = instanceData.flags.GetSubArray(0, instanceData.instancesLength).AsReadOnly(); lodGroupAndMasks = instanceData.lodGroupAndMasks.GetSubArray(0, instanceData.instancesLength).AsReadOnly(); + meshLodInfos = instanceData.meshLodInfos.GetSubArray(0, instanceData.instancesLength).AsReadOnly(); gameObjectLayers = instanceData.gameObjectLayers.GetSubArray(0, instanceData.instancesLength).AsReadOnly(); refCounts = instanceData.refCounts.GetSubArray(0, instanceData.instancesLength).AsReadOnly(); } @@ -765,7 +919,7 @@ internal enum InstanceFlags : byte AffectsLightmaps = 1 << 0, // either lightmapped or influence-only IsShadowsOff = 1 << 1, // shadow casting mode is ShadowCastingMode.Off IsShadowsOnly = 1 << 2, // shadow casting mode is ShadowCastingMode.ShadowsOnly - HasProgressiveLod = 1 << 3, + HasMeshLod = 1 << 3, SmallMeshCulling = 1 << 4 } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceDataSystem.Jobs.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceDataSystem.Jobs.cs index 27c3fd30ed1..22f3ce514ba 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceDataSystem.Jobs.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceDataSystem.Jobs.cs @@ -493,6 +493,7 @@ private struct ReallocateInstancesJob : IJob public InstanceAllocators instanceAllocators; public CPUInstanceData instanceData; + [NativeDisableContainerSafetyRestriction] public CPUPerCameraInstanceData perCameraInstanceData; public CPUSharedInstanceData sharedInstanceData; public NativeArray instances; public NativeParallelMultiHashMap rendererGroupInstanceMultiHash; @@ -539,7 +540,9 @@ public void Execute() while (success) { + var idx = instanceData.InstanceToIndex(instance); instanceData.Remove(instance); + perCameraInstanceData.Remove(idx); instanceAllocators.FreeInstance(instance); rendererGroupInstanceMultiHash.Remove(it); @@ -575,6 +578,8 @@ public void Execute() newInstance = instanceAllocators.AllocateInstance(InstanceType.SpeedTree); instanceData.AddNoGrow(newInstance); + perCameraInstanceData.IncreaseInstanceCount(); + Assert.IsTrue(instanceData.instancesLength == perCameraInstanceData.instancesLength); int index = instanceData.InstanceToIndex(newInstance); instanceData.sharedInstances[index] = sharedInstance; instanceData.movedInCurrentFrameBits.Set(index, false); @@ -601,6 +606,8 @@ private struct FreeInstancesJob : IJob public InstanceAllocators instanceAllocators; public CPUInstanceData instanceData; + + [NativeDisableContainerSafetyRestriction] public CPUPerCameraInstanceData perCameraInstanceData; public CPUSharedInstanceData sharedInstanceData; public NativeParallelMultiHashMap rendererGroupInstanceMultiHash; @@ -628,8 +635,9 @@ public void Execute() sharedInstanceData.Remove(sharedInstance); instanceAllocators.FreeSharedInstance(sharedInstance); } - + var idx = instanceData.InstanceToIndex(instance); instanceData.Remove(instance); + perCameraInstanceData.Remove(idx); instanceAllocators.FreeInstance(instance); //@ This will have quadratic cost. Optimize later. @@ -653,6 +661,7 @@ private struct FreeRendererGroupInstancesJob : IJob public InstanceAllocators instanceAllocators; public CPUInstanceData instanceData; + [NativeDisableContainerSafetyRestriction] public CPUPerCameraInstanceData perCameraInstanceData; public CPUSharedInstanceData sharedInstanceData; public NativeParallelMultiHashMap rendererGroupInstanceMultiHash; @@ -678,7 +687,9 @@ public void Execute() instanceAllocators.FreeSharedInstance(sharedInstance); } + var idx = instanceData.InstanceToIndex(instance); instanceData.Remove(instance); + perCameraInstanceData.Remove(idx); instanceAllocators.FreeInstance(instance); success = rendererGroupInstanceMultiHash.TryGetNextValue(out instance, ref it); @@ -701,6 +712,7 @@ private unsafe struct UpdateRendererInstancesJob : IJobParallelFor [NativeDisableParallelForRestriction][NativeDisableContainerSafetyRestriction, NoAlias] public CPUInstanceData instanceData; [NativeDisableParallelForRestriction][NativeDisableContainerSafetyRestriction, NoAlias] public CPUSharedInstanceData sharedInstanceData; + [NativeDisableParallelForRestriction][NativeDisableContainerSafetyRestriction, NoAlias] public CPUPerCameraInstanceData perCameraInstanceData; public void Execute(int index) { @@ -715,6 +727,7 @@ public void Execute(int index) int materialCount = rendererData.materialsCount[index]; int meshID = rendererData.meshID[meshIndex]; + var meshLodInfo = rendererData.meshLodInfo[meshIndex]; const int k_LightmapIndexMask = 0xFFFF; const int k_LightmapIndexNotLightmapped = 0xFFFF; @@ -749,6 +762,9 @@ public void Execute(int index) break; } + if (meshLodInfo.lodSelectionActive) + instanceFlags |= InstanceFlags.HasMeshLod; + // If the object is light mapped, or has the special influence-only value, it affects lightmaps if (lmIndexMasked != k_LightmapIndexNotLightmapped) instanceFlags |= InstanceFlags.AffectsLightmaps; @@ -794,7 +810,7 @@ public void Execute(int index) materialIDs[i] = materialInstanceID; } - sharedInstanceData.Set(sharedInstance, rendererGroupID, materialIDs, meshID, localAABB, transformUpdateFlags, instanceFlags, lodGroupAndMask, gameObjectLayer, + sharedInstanceData.Set(sharedInstance, rendererGroupID, materialIDs, meshID, localAABB, transformUpdateFlags, instanceFlags, lodGroupAndMask, meshLodInfo, gameObjectLayer, sharedInstanceData.Get_RefCount(sharedInstance)); for (int i = 0; i < instancesCount; ++i) @@ -811,6 +827,7 @@ public void Execute(int index) bool isFlipped = (det < 0.0f); int instanceIndex = instanceData.InstanceToIndex(instance); + perCameraInstanceData.SetDefault(instanceIndex); instanceData.localToWorldIsFlippedBits.Set(instanceIndex, isFlipped); instanceData.worldAABBs[instanceIndex] = worldAABB; instanceData.tetrahedronCacheIndices[instanceIndex] = -1; @@ -818,6 +835,7 @@ public void Execute(int index) instanceData.editorData.sceneCullingMasks[instanceIndex] = rendererData.editorData[index].sceneCullingMask; // Store more editor instance data here if needed. #endif + instanceData.meshLodData[instanceIndex] = rendererData.meshLodData[index]; } } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceDataSystem.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceDataSystem.cs index 9ed79f922ae..64a11c20539 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceDataSystem.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/InstanceData/InstanceDataSystem.cs @@ -13,6 +13,7 @@ internal partial class InstanceDataSystem : IDisposable private InstanceAllocators m_InstanceAllocators; private CPUSharedInstanceData m_SharedInstanceData; private CPUInstanceData m_InstanceData; + private CPUPerCameraInstanceData m_PerCameraInstanceData; //@ We may want something a bit faster instead of multi hash map. Remove and search performance for multiple instances per renderer group is not great. private NativeParallelMultiHashMap m_RendererGroupInstanceMultiHash; @@ -39,6 +40,8 @@ internal partial class InstanceDataSystem : IDisposable public bool hasBoundingSpheres { get { return m_EnableBoundingSpheres; } } public CPUInstanceData.ReadOnly instanceData { get { return m_InstanceData.AsReadOnly(); } } + public CPUPerCameraInstanceData perCameraInstanceData { get { return m_PerCameraInstanceData; } } + public int cameraCount { get { return m_PerCameraInstanceData.cameraCount; }} public CPUSharedInstanceData.ReadOnly sharedInstanceData { get { return m_SharedInstanceData.AsReadOnly(); } } public NativeArray aliveInstances { get { return m_InstanceData.instances.GetSubArray(0, m_InstanceData.instancesLength); } } @@ -49,10 +52,13 @@ public InstanceDataSystem(int maxInstances, bool enableBoundingSpheres, GPUResid m_InstanceAllocators = new InstanceAllocators(); m_SharedInstanceData = new CPUSharedInstanceData(); m_InstanceData = new CPUInstanceData(); + m_PerCameraInstanceData = new CPUPerCameraInstanceData(); m_InstanceAllocators.Initialize(); m_SharedInstanceData.Initialize(maxInstances); m_InstanceData.Initialize(maxInstances); + m_PerCameraInstanceData.Initialize(maxInstances); + Assert.IsTrue(m_PerCameraInstanceData.instancesCapacity == m_InstanceData.instancesCapacity); m_RendererGroupInstanceMultiHash = new NativeParallelMultiHashMap(maxInstances, Allocator.Persistent); @@ -78,6 +84,7 @@ public void Dispose() m_InstanceAllocators.Dispose(); m_SharedInstanceData.Dispose(); m_InstanceData.Dispose(); + m_PerCameraInstanceData.Dispose(); m_RendererGroupInstanceMultiHash.Dispose(); @@ -473,10 +480,12 @@ public unsafe void ReallocateAndGetInstances(in GPUDrivenRendererGroupData rende } m_InstanceData.EnsureFreeInstances(newInstancesCount); + m_PerCameraInstanceData.Grow(m_InstanceData.instancesCapacity); + Assert.IsTrue(m_InstanceData.instancesCapacity == m_PerCameraInstanceData.instancesCapacity); m_SharedInstanceData.EnsureFreeInstances(newSharedInstancesCount); new ReallocateInstancesJob { implicitInstanceIndices = implicitInstanceIndices, rendererGroupInstanceMultiHash = m_RendererGroupInstanceMultiHash, - instanceAllocators = m_InstanceAllocators, sharedInstanceData = m_SharedInstanceData, instanceData = m_InstanceData, + instanceAllocators = m_InstanceAllocators, sharedInstanceData = m_SharedInstanceData, instanceData = m_InstanceData, perCameraInstanceData = m_PerCameraInstanceData, rendererGroupIDs = rendererData.rendererGroupID, packedRendererData = rendererData.packedRendererData, instanceOffsets = rendererData.instancesOffset, instanceCounts = rendererData.instancesCount, instances = instances }.Run(); } @@ -484,14 +493,14 @@ public unsafe void ReallocateAndGetInstances(in GPUDrivenRendererGroupData rende public void FreeRendererGroupInstances(NativeArray rendererGroupsID) { new FreeRendererGroupInstancesJob { rendererGroupInstanceMultiHash = m_RendererGroupInstanceMultiHash, - instanceAllocators = m_InstanceAllocators, sharedInstanceData = m_SharedInstanceData, instanceData = m_InstanceData, + instanceAllocators = m_InstanceAllocators, sharedInstanceData = m_SharedInstanceData, instanceData = m_InstanceData, perCameraInstanceData = m_PerCameraInstanceData, rendererGroupsID = rendererGroupsID }.Run(); } public void FreeInstances(NativeArray instances) { new FreeInstancesJob { rendererGroupInstanceMultiHash = m_RendererGroupInstanceMultiHash, - instanceAllocators = m_InstanceAllocators, sharedInstanceData = m_SharedInstanceData, instanceData = m_InstanceData, + instanceAllocators = m_InstanceAllocators, sharedInstanceData = m_SharedInstanceData, instanceData = m_InstanceData, perCameraInstanceData = m_PerCameraInstanceData, instances = instances }.Run(); } @@ -518,7 +527,8 @@ public JobHandle ScheduleUpdateInstanceDataJob(NativeArray insta rendererData = rendererData, lodGroupDataMap = lodGroupDataMap, instanceData = m_InstanceData, - sharedInstanceData = m_SharedInstanceData + sharedInstanceData = m_SharedInstanceData, + perCameraInstanceData = m_PerCameraInstanceData }.Schedule(rendererData.rendererGroupID.Length, UpdateRendererInstancesJob.k_BatchSize); } @@ -816,5 +826,15 @@ private static class InstanceWindDataUpdateIDs public static readonly int _WindParamAddressArray = Shader.PropertyToID("_WindParamAddressArray"); public static readonly int _WindHistoryParamAddressArray = Shader.PropertyToID("_WindHistoryParamAddressArray"); } + + public void DeallocatePerCameraInstanceData(NativeArray cameraIDs) + { + m_PerCameraInstanceData.DeallocateCameras(cameraIDs); + } + + public void AllocatePerCameraInstanceData(NativeArray cameraIDs) + { + m_PerCameraInstanceData.AllocateCameras(cameraIDs); + } } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODGroupDataPool.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODGroupDataPool.cs index 2b33013a199..b290404e81c 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODGroupDataPool.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODGroupDataPool.cs @@ -27,6 +27,7 @@ internal unsafe struct LODGroupCullingData public fixed float transitionDistances[LODGroupData.k_MaxLODLevelsCount]; // todo - make this a separate data struct (CPUOnly, as we do not support dithering on GPU..) public float worldSpaceSize;// SpeedTree crossfade. public fixed bool percentageFlags[LODGroupData.k_MaxLODLevelsCount];// SpeedTree crossfade. + public byte forceLODMask; } [BurstCompile(DisableSafetyChecks = true, OptimizeFor = OptimizeFor.Performance)] @@ -64,14 +65,14 @@ public unsafe void Execute(int index) { float lodHeight = lodGroup->screenRelativeTransitionHeights[i]; - var lodDist = LODGroupRenderingUtils.CalculateLODDistance(lodHeight, worldSpaceSize); + var lodDist = LODRenderingUtils.CalculateLODDistance(lodHeight, worldSpaceSize); lodGroupTransformResult->sqrDistances[i] = lodDist * lodDist; if (supportDitheringCrossFade && !lodGroupTransformResult->percentageFlags[i]) { float prevLODHeight = i != 0 ? lodGroup->screenRelativeTransitionHeights[i - 1] : 1.0f; float transitionHeight = lodHeight + lodGroup->fadeTransitionWidth[i] * (prevLODHeight - lodHeight); - var transitionDistance = lodDist - LODGroupRenderingUtils.CalculateLODDistance(transitionHeight, worldSpaceSize); + var transitionDistance = lodDist - LODRenderingUtils.CalculateLODDistance(transitionHeight, worldSpaceSize); transitionDistance = Mathf.Max(0.0f, transitionDistance); lodGroupTransformResult->transitionDistances[i] = transitionDistance; } @@ -155,6 +156,7 @@ public void Execute(int index) var worldReferencePoint = inputData.worldSpaceReferencePoint[index]; var worldSpaceSize = inputData.worldSpaceSize[index]; var lastLODIsBillboard = inputData.lastLODIsBillboard[index]; + var forceLODMask = inputData.forceLODMask[index]; var useDitheringCrossFade = fadeMode != LODFadeMode.None && supportDitheringCrossFade; var useSpeedTreeCrossFade = fadeMode == LODFadeMode.SpeedTree; @@ -166,6 +168,7 @@ public void Execute(int index) lodGroupData->rendererCount = useDitheringCrossFade ? renderersCount : 0; lodGroupCullingData->worldSpaceSize = worldSpaceSize; lodGroupCullingData->worldSpaceReferencePoint = worldReferencePoint; + lodGroupCullingData->forceLODMask = forceLODMask; lodGroupCullingData->lodCount = lodCount; rendererCount.Add(lodGroupData->rendererCount); @@ -189,7 +192,7 @@ public void Execute(int index) { var lodIndex = lodOffset + i; var lodHeight = inputData.lodScreenRelativeTransitionHeight[lodIndex]; - var lodDist = LODGroupRenderingUtils.CalculateLODDistance(lodHeight, worldSpaceSize); + var lodDist = LODRenderingUtils.CalculateLODDistance(lodHeight, worldSpaceSize); lodGroupData->screenRelativeTransitionHeights[i] = lodHeight; lodGroupData->fadeTransitionWidth[i] = 0.0f; @@ -206,7 +209,7 @@ public void Execute(int index) var fadeTransitionWidth = inputData.lodFadeTransitionWidth[lodIndex]; var prevLODHeight = i != 0 ? inputData.lodScreenRelativeTransitionHeight[lodIndex - 1] : 1.0f; var transitionHeight = lodHeight + fadeTransitionWidth * (prevLODHeight - lodHeight); - var transitionDistance = lodDist - LODGroupRenderingUtils.CalculateLODDistance(transitionHeight, worldSpaceSize); + var transitionDistance = lodDist - LODRenderingUtils.CalculateLODDistance(transitionHeight, worldSpaceSize); transitionDistance = Mathf.Max(0.0f, transitionDistance); lodGroupData->fadeTransitionWidth[i] = fadeTransitionWidth; diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODGroupRenderingUtils.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODRenderingUtils.cs similarity index 69% rename from Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODGroupRenderingUtils.cs rename to Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODRenderingUtils.cs index d68bf0bac89..8043ba9d280 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODGroupRenderingUtils.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODRenderingUtils.cs @@ -5,30 +5,30 @@ namespace UnityEngine.Rendering { - // All this is just a copy of C++ LODGroupManager code. - internal static class LODGroupRenderingUtils + // Based on C++ LODGroupManager code. + internal static class LODRenderingUtils { public static float CalculateFOVHalfAngle(float fieldOfView) { return Mathf.Tan(Mathf.Deg2Rad * fieldOfView * 0.5f); } - public static float CalculateScreenRelativeMetric(LODParameters lodParams, float lodBias) - { - float screenRelativeMetric; - if (lodParams.isOrthographic) - { - screenRelativeMetric = 2.0F * lodParams.orthoSize; - } - else - { - // Half angle at 90 degrees is 1.0 (So we skip halfAngle / 1.0 calculation) - float halfAngle = CalculateFOVHalfAngle(lodParams.fieldOfView); - screenRelativeMetric = 2.0f * halfAngle; - } + public static float CalculateScreenRelativeMetricNoBias(LODParameters lodParams) + { + if (lodParams.isOrthographic) + { + return 2.0F * lodParams.orthoSize; + } + + // Half angle at 90 degrees is 1.0 (So we skip halfAngle / 1.0 calculation) + float halfAngle = CalculateFOVHalfAngle(lodParams.fieldOfView); + return 2.0f * halfAngle; + } - return screenRelativeMetric / lodBias; - } + public static float CalculateMeshLodConstant(LODParameters lodParams, float screenRelativeMetric, float meshLodThreshold) + { + return meshLodThreshold * screenRelativeMetric / lodParams.cameraPixelHeight; + } public static float CalculatePerspectiveDistance(Vector3 objPosition, Vector3 camPosition, float sqrScreenRelativeMetric) { diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODGroupRenderingUtils.cs.meta b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODRenderingUtils.cs.meta similarity index 100% rename from Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODGroupRenderingUtils.cs.meta rename to Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/LODRenderingUtils.cs.meta diff --git a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/RenderersBatchersContext.cs b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/RenderersBatchersContext.cs index 49e387d85de..d223ce4253c 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/RenderersBatchersContext.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/GPUDriven/RenderersBatchersContext.cs @@ -38,12 +38,14 @@ internal class RenderersBatchersContext : IDisposable public NativeList lodGroupCullingData { get { return m_LODGroupDataPool.lodGroupCullingData; } } public int instanceDataBufferVersion { get { return m_InstanceDataBuffer.version; } } public int instanceDataBufferLayoutVersion { get { return m_InstanceDataBuffer.layoutVersion; } } - public int crossfadedRendererCount { get { return m_LODGroupDataPool.crossfadedRendererCount; } } public SphericalHarmonicsL2 cachedAmbientProbe { get { return m_CachedAmbientProbe; } } public bool hasBoundingSpheres { get { return m_InstanceDataSystem.hasBoundingSpheres; } } + public int cameraCount { get { return m_InstanceDataSystem.cameraCount; } } public CPUInstanceData.ReadOnly instanceData { get { return m_InstanceDataSystem.instanceData; } } public CPUSharedInstanceData.ReadOnly sharedInstanceData { get { return m_InstanceDataSystem.sharedInstanceData; } } + + public CPUPerCameraInstanceData perCameraInstanceData { get { return m_InstanceDataSystem.perCameraInstanceData; } } public GPUInstanceDataBuffer.ReadOnly instanceDataBuffer { get { return m_InstanceDataBuffer.AsReadOnly(); } } public NativeArray aliveInstances { get { return m_InstanceDataSystem.aliveInstances; } } @@ -386,6 +388,16 @@ public void UpdateFrame() m_OcclusionCullingCommon.UpdateOccluderStats(m_DebugStats); } + public void FreePerCameraInstanceData(NativeArray cameraIDs) + { + m_InstanceDataSystem.DeallocatePerCameraInstanceData(cameraIDs); + } + + public void UpdateCameras(NativeArray cameraIDs) + { + m_InstanceDataSystem.AllocatePerCameraInstanceData(cameraIDs); + } + #if UNITY_EDITOR public void UpdateSelectedInstances(NativeArray instances) { diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Inputs/.buginfo b/Packages/com.unity.render-pipelines.core/Runtime/Inputs/.buginfo index a8e3ae67ae4..272688b1879 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Inputs/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Runtime/Inputs/.buginfo @@ -1 +1 @@ -area: Graphics Tools \ No newline at end of file +area: Graphics Debugging Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/DecodeSH.hlsl b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/DecodeSH.hlsl index dfcd7d3440e..3e1ea9ff582 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/DecodeSH.hlsl +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/DecodeSH.hlsl @@ -74,7 +74,11 @@ float3 EncodeSH(float l0, float3 l1) #if !HALF_IS_FLOAT half3 EncodeSH(half l0, half3 l1) { - return l0 == 0.0 ? 0.5 : l1 * rcp(l0) / (2.0 * APV_L1_ENCODING_SCALE) + 0.5; + // UUM-92338: To prevent rcp(l0) from going to infinity, 1.0/l0 must be smaller than 65504 (HALF_MAX) + // => l0 must be greater than than 1.0/65504 = 0.00001526624(0x0100) which is a subnormal number + // To ensure robustness and avoid issues, we need a bigger threshold value. + // 0.00006103515625 (HALF_MIN) would be a decent choice but we select 0.0001 instead, which was already used in ProbeVolume.hlsl + return (l0 < 0.0001 ? 0.5 : l1 * rcp(l0) / (2.0 * APV_L1_ENCODING_SCALE) + 0.5); } #endif diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeAdjustmentVolume.cs b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeAdjustmentVolume.cs index 7bc1067740d..503baeee8ab 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeAdjustmentVolume.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeAdjustmentVolume.cs @@ -8,7 +8,7 @@ namespace UnityEngine.Rendering [CoreRPHelpURL("probevolumes-adjustment-volume-component-reference", "com.unity.render-pipelines.high-definition")] [ExecuteAlways] [AddComponentMenu("Rendering/Probe Adjustment Volume")] - public class ProbeAdjustmentVolume : MonoBehaviour, ISerializationCallbackReceiver + public partial class ProbeAdjustmentVolume : MonoBehaviour, ISerializationCallbackReceiver { /// The type of shape that an adjustment volume can take. public enum Shape @@ -234,9 +234,7 @@ void OnDrawGizmos() } #endif - // Migration related stuff - enum Version { Initial, @@ -248,31 +246,6 @@ enum Version [SerializeField] Version version = Version.Count; - /// Whether to invalidate all probes falling within this volume. - [Obsolete("Use mode")] - public bool invalidateProbes = false; - /// Whether to use a custom threshold for dilation for probes falling withing this volume. - [Obsolete("Use mode")] - public bool overrideDilationThreshold = false; - - void Awake() - { - if (version == Version.Count) - return; - - if (version == Version.Initial) - { -#pragma warning disable 618 // Type or member is obsolete - if (invalidateProbes) - mode = Mode.InvalidateProbes; - else if (overrideDilationThreshold) - mode = Mode.OverrideValidityThreshold; -#pragma warning restore 618 - - version++; - } - } - // This piece of code is needed because some objects could have been created before existence of Version enum /// OnBeforeSerialize needed to handle migration before the versioning system was in place. void ISerializationCallbackReceiver.OnBeforeSerialize() @@ -286,6 +259,18 @@ void ISerializationCallbackReceiver.OnAfterDeserialize() { if (version == Version.Count) // deserializing and object without version version = Version.Initial; // reset to run the migration + + if (version < Version.Mode) + { +#pragma warning disable 618 // Type or member is obsolete + if (invalidateProbes) + mode = Mode.InvalidateProbes; + else if (overrideDilationThreshold) + mode = Mode.OverrideValidityThreshold; +#pragma warning restore 618 + + version = Version.Mode; + } } } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeAdjustmentVolume.deprecated.cs b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeAdjustmentVolume.deprecated.cs new file mode 100644 index 00000000000..bca11c2ed5d --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeAdjustmentVolume.deprecated.cs @@ -0,0 +1,13 @@ +using System; + +namespace UnityEngine.Rendering +{ + public partial class ProbeAdjustmentVolume + { + /// Whether to invalidate all probes falling within this volume. + [Obsolete("This field is only kept for migration purpose. Use mode instead. #from(2023.1)")] public bool invalidateProbes = false; + + /// Whether to use a custom threshold for dilation for probes falling withing this volume. + [Obsolete("This field is only kept for migration purpose. Use mode instead. #from(2023.1)")] public bool overrideDilationThreshold = false; + } +} \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeAdjustmentVolume.deprecated.cs.meta b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeAdjustmentVolume.deprecated.cs.meta new file mode 100644 index 00000000000..a602b5af3d7 --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeAdjustmentVolume.deprecated.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a91edae7e71f48b9880e1bda95128cfd +timeCreated: 1739986118 \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeReferenceVolume.Debug.cs b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeReferenceVolume.Debug.cs index f0474d665bb..2e0da43ec7f 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeReferenceVolume.Debug.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeReferenceVolume.Debug.cs @@ -1084,6 +1084,187 @@ void ClearDebugData() realtimeSubdivisionInfo.Clear(); } + static void DecompressSH(ref SphericalHarmonicsL2 shv) + { + for (int rgb = 0; rgb < 3; ++rgb) + { + var l0 = shv[rgb, 0]; + + // See CompressSH + float l1scale = 2.0f; + float l2scale = 3.5777088f; + + // L_1^m + shv[rgb, 1] = (shv[rgb, 1] - 0.5f) * (l0 * l1scale * 2.0f); + shv[rgb, 2] = (shv[rgb, 2] - 0.5f) * (l0 * l1scale * 2.0f); + shv[rgb, 3] = (shv[rgb, 3] - 0.5f) * (l0 * l1scale * 2.0f); + + // L_2^-2 + shv[rgb, 4] = (shv[rgb, 4] - 0.5f) * (l0 * l2scale * 2.0f); + shv[rgb, 5] = (shv[rgb, 5] - 0.5f) * (l0 * l2scale * 2.0f); + shv[rgb, 6] = (shv[rgb, 6] - 0.5f) * (l0 * l2scale * 2.0f); + shv[rgb, 7] = (shv[rgb, 7] - 0.5f) * (l0 * l2scale * 2.0f); + shv[rgb, 8] = (shv[rgb, 8] - 0.5f) * (l0 * l2scale * 2.0f); + } + } + + internal bool GetFlattenedProbeData( + string scenario, + out Vector3[] positions, + out SphericalHarmonicsL2[] irradiance, + out float[] validity) + { + positions = null; + irradiance = null; + validity = null; + + var positionsList = new List(); + var irradianceList = new List(); + var validityList = new List(); + + foreach (var cell in cells.Values) + { + if (HasActiveStreamingRequest(cell)) + return false; + + if (!cell.data.bricks.IsCreated || cell.data.bricks.Length == 0 || + !cell.data.probePositions.IsCreated || !cell.loaded) + return false; + + if (!cell.data.scenarios.TryGetValue(scenario, out var scenarioData)) + return false; + + var chunks = cell.poolInfo.chunkList; + var chunkSizeInProbes = ProbeBrickPool.GetChunkSizeInProbeCount(); + var loc = ProbeBrickPool.ProbeCountToDataLocSize(chunkSizeInProbes); + + int brickCount = cell.desc.probeCount / ProbeBrickPool.kBrickProbeCountTotal; + + int bx = 0, by = 0, bz = 0; + for (int brickIndex = 0; brickIndex < brickCount; ++brickIndex) + { + Debug.Assert(bz < loc.z); + + int chunkIndex = brickIndex / ProbeBrickPool.GetChunkSizeInBrickCount(); + var chunk = chunks[chunkIndex]; + Vector3Int brickStart = new Vector3Int(chunk.x + bx, chunk.y + by, chunk.z + bz); + + for (int z = 0; z < ProbeBrickPool.kBrickProbeCountPerDim; ++z) + { + for (int y = 0; y < ProbeBrickPool.kBrickProbeCountPerDim; ++y) + { + for (int x = 0; x < ProbeBrickPool.kBrickProbeCountPerDim; ++x) + { + Vector3Int texelLoc = new Vector3Int(brickStart.x + x, brickStart.y + y, brickStart.z + z); + + int probeFlatIndex = chunkIndex * chunkSizeInProbes + (bx + x) + loc.x * ((by + y) + loc.y * (bz + z)); + var position = cell.data.probePositions[probeFlatIndex] - ProbeOffset(); // Offset is applied in shader + + positionsList.Add(position); + validityList.Add(cell.data.validity[probeFlatIndex]); + + Vector4 L0_L1Rx = Vector4.zero; + Vector4 L1G_L1Ry = Vector4.zero; + Vector4 L1B_L1Rz = Vector4.zero; + Vector4 L2_R = Vector4.zero; + Vector4 L2_G = Vector4.zero; + Vector4 L2_B = Vector4.zero; + Vector4 L2_C = Vector4.zero; + for (int channel = 0; channel < 4; channel++) + { + L0_L1Rx[channel] = Mathf.HalfToFloat(scenarioData.shL0L1RxData[probeFlatIndex * 4 + channel]); + L1G_L1Ry[channel] = scenarioData.shL1GL1RyData[probeFlatIndex * 4 + channel] / 255.0f; + L1B_L1Rz[channel] = scenarioData.shL1BL1RzData[probeFlatIndex * 4 + channel] / 255.0f; + + if (ProbeReferenceVolume.instance.shBands == ProbeVolumeSHBands.SphericalHarmonicsL2) + { + L2_R[channel] = scenarioData.shL2Data_0[probeFlatIndex * 4 + channel] / 255.0f; + L2_G[channel] = scenarioData.shL2Data_1[probeFlatIndex * 4 + channel] / 255.0f; + L2_B[channel] = scenarioData.shL2Data_2[probeFlatIndex * 4 + channel] / 255.0f; + L2_C[channel] = scenarioData.shL2Data_3[probeFlatIndex * 4 + channel] / 255.0f; + } + } + + Vector3 L0 = new Vector3(L0_L1Rx.x, L0_L1Rx.y, L0_L1Rx.z); + // Note: yzx swizzle happening here + Vector3 L1_R = new Vector3(L1G_L1Ry.w, L1B_L1Rz.w, L0_L1Rx.w); + Vector3 L1_G = new Vector3(L1G_L1Ry.y, L1G_L1Ry.z, L1G_L1Ry.x); + Vector3 L1_B = new Vector3(L1B_L1Rz.y, L1B_L1Rz.z, L1B_L1Rz.x); + + SphericalHarmonicsL2 sh = new SphericalHarmonicsL2(); + // L0, L1 + for (int i = 0; i < 3; i++) + { + sh[i, 0] = L0[i]; + + sh[0, i + 1] = L1_R[i]; + sh[1, i + 1] = L1_G[i]; + sh[2, i + 1] = L1_B[i]; + } + // L2 + { + sh[0, 4] = L2_R.x; + sh[0, 5] = L2_R.y; + sh[0, 6] = L2_R.z; + sh[0, 7] = L2_R.w; + sh[0, 8] = L2_C.x; + + sh[1, 4] = L2_G.x; + sh[1, 5] = L2_G.y; + sh[1, 6] = L2_G.z; + sh[1, 7] = L2_G.w; + sh[1, 8] = L2_C.y; + + sh[2, 4] = L2_B.x; + sh[2, 5] = L2_B.y; + sh[2, 6] = L2_B.z; + sh[2, 7] = L2_B.w; + sh[2, 8] = L2_C.z; + } + DecompressSH(ref sh); + // Decompressing zero'd L2 data will create bogus values on the L2 coefficients. + if (ProbeReferenceVolume.instance.shBands != ProbeVolumeSHBands.SphericalHarmonicsL2) + { + for (int i = 0; i < 5; i++) + { + sh[0, i + 4] = 0; + sh[1, i + 4] = 0; + sh[2, i + 4] = 0; + } + } + + irradianceList.Add(sh); + } + } + } + + bx += ProbeBrickPool.kBrickProbeCountPerDim; + if (bx >= loc.x) + { + bx = 0; + by += ProbeBrickPool.kBrickProbeCountPerDim; + if (by >= loc.y) + { + by = 0; + bz += ProbeBrickPool.kBrickProbeCountPerDim; + if (bz >= loc.z) + { + bx = 0; + by = 0; + bz = 0; + } + } + } + } + } + + positions = positionsList.ToArray(); + irradiance = irradianceList.ToArray(); + validity = validityList.ToArray(); + + return true; + } + CellInstancedDebugProbes CreateInstancedProbes(Cell cell) { if (cell.debugProbes != null) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeBakingSet.Editor.cs b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeBakingSet.Editor.cs index 0ff45e67338..3b52d8fa485 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeBakingSet.Editor.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeBakingSet.Editor.cs @@ -560,9 +560,9 @@ internal void EnsurePerSceneData(Scene scene, string sceneGUID) } } - internal SceneBakeData GetSceneBakeData(string sceneGUID) + internal SceneBakeData GetSceneBakeData(string sceneGUID, bool addIfMissing = true) { - if (!m_SceneBakeData.TryGetValue(sceneGUID, out var bakeData)) + if (!m_SceneBakeData.TryGetValue(sceneGUID, out var bakeData) && addIfMissing) { if (m_SceneGUIDs.Contains(sceneGUID)) m_SceneBakeData[sceneGUID] = bakeData = new SceneBakeData(); diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeBakingSet.cs b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeBakingSet.cs index 17e19c83793..d37cd5090f6 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeBakingSet.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeBakingSet.cs @@ -668,18 +668,45 @@ NativeArray RequestScratchBuffer(int size) } } + private unsafe bool FileExists(string path) + { + // Can't use System.IO.File.Exists as it doesn't work with compressed streaming assets folder (iOS, Android) + FileInfoResult infoResult; + ReadHandle h = AsyncReadManager.GetFileInfo(path, &infoResult); + h.JobHandle.Complete(); + return infoResult.FileState == FileState.Exists; + } + // Load from disk all data related to the required cells only. // This allows us to avoid loading the whole file in memory which could be a huge spike for multi scene setups. unsafe NativeArray LoadStreambleAssetData(ProbeVolumeStreamableAsset asset, List cellIndices) where T : struct { if (!m_UseStreamingAsset) { - // Only when not using Streaming Asset is this reference valid. Debug.Assert(asset.asset != null); return asset.asset.GetData().Reinterpret(1); } else { + if (!FileExists(asset.GetAssetPath())) + { + asset.RefreshAssetPath(); + if (!FileExists(asset.GetAssetPath())) + { + // If we can't load from StreamingAssets, but we have a valid asset reference, try to use the asset reference instead. + if (asset.HasValidAssetReference()) + { + return asset.asset.GetData().Reinterpret(1); + } + else + { + Debug.LogAssertion($"File {asset.GetAssetPath()} does not exist on disk. If you are trying to load Adaptive Probe Volumes from AssetBundles or Addressables, " + + "tick the \"Probe Volume Disable Streaming Assets\" project setting in the Graphics tab when building the Player."); + return default; + } + } + } + // Prepare read commands. // Reallocate read commands buffer if needed. if (!m_ReadCommandBuffer.IsCreated || m_ReadCommandBuffer.Length < cellIndices.Count) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumePerSceneData.cs b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumePerSceneData.cs index 639f3087436..4fc973f5ecb 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumePerSceneData.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumePerSceneData.cs @@ -78,7 +78,7 @@ internal void QueueSceneLoading() #if UNITY_EDITOR // Check if we are trying to load APV data for a scene which has not enabled APV (or it was removed) - var bakedData = serializedBakingSet.GetSceneBakeData(sceneGUID); + var bakedData = serializedBakingSet.GetSceneBakeData(sceneGUID, addIfMissing: false); if (bakedData != null && bakedData.hasProbeVolume == false) return; #endif @@ -97,9 +97,10 @@ void OnEnable() { #if UNITY_EDITOR // In the editor, always refresh the GUID as it may become out of date is scene is duplicated or other weird things - // This field is serialized, so it will be available in standalones, where it can't change anymore + // This field is serialized, so it will be available in standalones, where it can't change anymore. + // Only change the GUID if the new one is valid. var newGUID = gameObject.scene.GetGUID(); - if (newGUID != sceneGUID) + if (newGUID != sceneGUID && new GUID(newGUID) != default) { sceneGUID = newGUID; EditorUtility.SetDirty(this); diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeStreamableAsset.cs b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeStreamableAsset.cs index e3806ed3f96..c21c10b4f2c 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeStreamableAsset.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeStreamableAsset.cs @@ -66,9 +66,16 @@ public string GetAssetPath() return m_FinalAssetPath; } + internal bool HasValidAssetReference() + { + return m_Asset != null && m_Asset.bytes != null; + } + unsafe public bool FileExists() { #if UNITY_EDITOR + if (HasValidAssetReference()) + return true; if (File.Exists(GetAssetPath())) return true; // File may not exist if it was moved, refresh path in this case diff --git a/Packages/com.unity.render-pipelines.core/Runtime/PostProcessing/LensFlareCommonSRP.cs b/Packages/com.unity.render-pipelines.core/Runtime/PostProcessing/LensFlareCommonSRP.cs index 20ecdb6bd7a..622cc35403e 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/PostProcessing/LensFlareCommonSRP.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/PostProcessing/LensFlareCommonSRP.cs @@ -583,7 +583,7 @@ static public float ShapeAttenuationSpotPyramidLight(Vector3 forward, Vector3 wo /// } /// /// - static public float ShapeAttenuationAreaTubeLight(Vector3 lightPositionWS, Vector3 lightSide, float lightWidth, Camera cam) + public static float ShapeAttenuationAreaTubeLight(Vector3 lightPositionWS, Vector3 lightSide, float lightWidth, Camera cam) { // Ref: https://hal.archives-ouvertes.fr/hal-02155101/document // Listing 1.6. Analytic line-diffuse integration. @@ -597,15 +597,16 @@ float Fwt(float d, float l) return l * l / (d * (d * d + l * l)); } - Vector3 p1Global = lightPositionWS + lightSide * lightWidth * 0.5f; - Vector3 p2Global = lightPositionWS - lightSide * lightWidth * 0.5f; - Vector3 p1Front = lightPositionWS + cam.transform.right * lightWidth * 0.5f; - Vector3 p2Front = lightPositionWS - cam.transform.right * lightWidth * 0.5f; + var cameraTransform = cam.transform; + Vector3 p1Global = lightPositionWS + 0.5f * lightWidth * lightSide; + Vector3 p2Global = lightPositionWS - 0.5f * lightWidth * lightSide; + Vector3 p1Front = lightPositionWS + 0.5f * lightWidth * cameraTransform.right; + Vector3 p2Front = lightPositionWS - 0.5f * lightWidth * cameraTransform.right; - Vector3 p1World = cam.transform.InverseTransformPoint(p1Global); - Vector3 p2World = cam.transform.InverseTransformPoint(p2Global); - Vector3 p1WorldFront = cam.transform.InverseTransformPoint(p1Front); - Vector3 p2WorldFront = cam.transform.InverseTransformPoint(p2Front); + Vector3 p1World = cameraTransform.InverseTransformPoint(p1Global); + Vector3 p2World = cameraTransform.InverseTransformPoint(p2Global); + Vector3 p1WorldFront = cameraTransform.InverseTransformPoint(p1Front); + Vector3 p2WorldFront = cameraTransform.InverseTransformPoint(p2Front); float DiffLineIntegral(Vector3 p1, Vector3 p2) { diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/CompilerContextData.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/CompilerContextData.cs index 324109f60b7..1d3b0ba1293 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/CompilerContextData.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/CompilerContextData.cs @@ -8,7 +8,7 @@ namespace UnityEngine.Rendering.RenderGraphModule.NativeRenderPassCompiler { // Wrapper struct to allow storing strings in a DynamicArray which requires a type with a parameterless constructor - internal struct Name + internal readonly struct Name { public readonly string name; public readonly int utf8ByteCount; @@ -161,13 +161,12 @@ public bool AddToFragmentList(TextureAccess access, int listFirstIndex, int numI // not int the middle of lists Debug.Assert(listFirstIndex + numItems == fragmentData.Length); - fragmentData.Add(new PassFragmentData() - { - resource = access.textureHandle.handle, - accessFlags = access.flags, - mipLevel = access.mipLevel, - depthSlice = access.depthSlice, - }); + fragmentData.Add(new PassFragmentData( + access.textureHandle.handle, + access.flags, + access.mipLevel, + access.depthSlice + )); return true; } @@ -204,12 +203,7 @@ public bool AddToRandomAccessResourceList(ResourceHandle h, int randomWriteSlotI // not int the middle of lists Debug.Assert(listFirstIndex + numItems == randomAccessResourceData.Length); - randomAccessResourceData.Add(new PassRandomWriteData() - { - resource = h, - index = randomWriteSlotIndex, - preserveCounterValue = preserveCounterValue - }); + randomAccessResourceData.Add(new PassRandomWriteData(h, randomWriteSlotIndex, preserveCounterValue)); return true; } @@ -230,7 +224,7 @@ public void CullAllPasses(bool isCulled) } // Helper to loop over native passes - public struct NativePassIterator + public ref struct NativePassIterator { readonly CompilerContextData m_Ctx; int m_Index; diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.Debug.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.Debug.cs index c3d6ec3dd89..a563ae62a0b 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.Debug.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.Debug.cs @@ -99,6 +99,9 @@ internal static string MakePassMergeMessage(CompilerContextData ctx, in PassData case PassBreakReason.DifferentShadingRateStates: message += $"{prevPassName} uses different shading rate states than {passName}."; break; + case PassBreakReason.PassMergingDisabled: + message += "The pass merging is disabled."; + break; default: throw new ArgumentOutOfRangeException(); } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.cs index 62fa39fd787..b9ebe8aa866 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/NativePassCompiler.cs @@ -60,7 +60,8 @@ void Cleanup() } } - public bool Initialize(RenderGraphResourceRegistry resources, List renderPasses, RenderGraphDebugParams debugParams, string debugName, bool useCompilationCaching, int graphHash, int frameIndex) + public bool Initialize(RenderGraphResourceRegistry resources, List renderPasses, RenderGraphDebugParams debugParams, string debugName, bool useCompilationCaching, + int graphHash, int frameIndex) { bool cached = false; if (!useCompilationCaching) @@ -150,8 +151,8 @@ void BuildGraph() if (inputPass.type == RenderGraphPassType.Legacy) { throw new Exception("Pass '" + inputPass.name + "' is using the legacy rendergraph API." + - " You cannot use legacy passes with the native render pass compiler." + - " Please do not use AddPass on the rendergrpah but use one of the more specific pass types such as AddRasterRenderPass"); + " You cannot use legacy passes with the native render pass compiler." + + " Please do not use AddPass on the rendergraph but use one of the more specific pass types such as AddRasterRenderPass"); } #endif @@ -270,10 +271,7 @@ void BuildGraph() // Mark this pass as writing to this version of the resource ctx.resources[resource].SetWritingPass(ctx, resource, passId); - ctx.outputData.Add(new PassOutputData - { - resource = resource, - }); + ctx.outputData.Add(new PassOutputData(resource)); ctxPass.numOutputs++; } @@ -287,10 +285,7 @@ void BuildGraph() // Mark this pass as reading from this version of the resource ctx.resources[resource].RegisterReadingPass(ctx, resource, passId, ctxPass.numInputs); - ctx.inputData.Add(new PassInputData - { - resource = resource, - }); + ctx.inputData.Add(new PassInputData(resource)); ctxPass.numInputs++; } @@ -305,20 +300,14 @@ void BuildGraph() // Mark this pass as reading from this version of the resource ctx.resources[resource].RegisterReadingPass(ctx, resource, passId, ctxPass.numInputs); - ctx.inputData.Add(new PassInputData - { - resource = resource, - }); + ctx.inputData.Add(new PassInputData(resource)); ctxPass.numInputs++; // Mark this pass as writing to this version of the resource ctx.resources[resource].SetWritingPass(ctx, resource, passId); - ctx.outputData.Add(new PassOutputData - { - resource = resource, - }); + ctx.outputData.Add(new PassOutputData(resource)); ctxPass.numOutputs++; } @@ -577,8 +566,8 @@ void FindResourceUsageRanges() var last = pointTo.latestVersionNumber; if (last == inputResource.version) { - var refC = pointTo.tag - 1;//Decrease refcount this pass is done using it - if (refC == 0)// We're the last pass done using it, this pass should destroy it. + var refC = pointTo.tag - 1; //Decrease refcount this pass is done using it + if (refC == 0) // We're the last pass done using it, this pass should destroy it. { pointTo.lastUsePassID = pass.passId; pass.AddLastUse(inputResource, ctx); @@ -655,6 +644,7 @@ static bool IsGlobalTextureInPass(RenderGraphPass pass, ResourceHandle handle) return true; } } + return false; } @@ -716,8 +706,8 @@ void DetectMemoryLessResources() internal static bool IsSameNativeSubPass(ref SubPassDescriptor a, ref SubPassDescriptor b) { if (a.flags != b.flags - || a.colorOutputs.Length != b.colorOutputs.Length - || a.inputs.Length != b.inputs.Length) + || a.colorOutputs.Length != b.colorOutputs.Length + || a.inputs.Length != b.inputs.Length) { return false; } @@ -790,7 +780,6 @@ private void ExecuteCreateRessource(InternalRenderGraphContext rgContext, Render } } - void DetermineLoadStoreActions(ref NativePassData nativePass) { using (new ProfilingScope(ProfilingSampler.Get(NativeCompilerProfileId.NRPRGComp_PrepareNativePass))) @@ -801,13 +790,12 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) // Some passes don't do any rendering only state changes so just skip them // If these passes trigger any drawing the raster command buffer will warn users no render targets are set-up for their rendering if (nativePass.fragments.size <= 0) - { return; - } // Some sanity checks, these should not happen - Debug.Assert(firstGraphPass.mergeState == PassMergeState.Begin || firstGraphPass.mergeState == PassMergeState.None); - Debug.Assert(lastGraphPass.mergeState == PassMergeState.End || lastGraphPass.mergeState == PassMergeState.None); + Debug.Assert(firstGraphPass.mergeState is PassMergeState.Begin or PassMergeState.None); + Debug.Assert(lastGraphPass.mergeState is PassMergeState.End or PassMergeState.None); + ref readonly var fragmentList = ref nativePass.fragments; // determine load store actions @@ -818,28 +806,28 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) { ref readonly var fragment = ref fragmentList[fragmentId]; - int idx = nativePass.attachments.Add(new NativePassAttachment()); - ref var currAttachment = ref nativePass.attachments[idx]; + // Default values + ResourceHandle handle = fragment.resource; + bool memoryless = false; + int mipLevel = fragment.mipLevel; + int depthSlice = fragment.depthSlice; + // Don't care by default + RenderBufferLoadAction loadAction = RenderBufferLoadAction.DontCare; + RenderBufferStoreAction storeAction = RenderBufferStoreAction.DontCare; #if UNITY_EDITOR nativePass.loadAudit.Add(new LoadAudit(LoadReason.FullyRewritten)); - ref var currLoadAudit = ref nativePass.loadAudit[idx]; + ref var currLoadAudit = ref nativePass.loadAudit[nativePass.loadAudit.size - 1]; // Get the last added element nativePass.storeAudit.Add(new StoreAudit(StoreReason.DiscardUnused)); - ref var currStoreAudit = ref nativePass.storeAudit[idx]; + ref var currStoreAudit = ref nativePass.storeAudit[nativePass.storeAudit.size - 1]; // Similarly for storeAudit #endif - currAttachment.handle = fragment.resource; - currAttachment.mipLevel = fragment.mipLevel; - currAttachment.depthSlice = fragment.depthSlice; - - // Don't care by default - currAttachment.loadAction = UnityEngine.Rendering.RenderBufferLoadAction.DontCare; - currAttachment.storeAction = UnityEngine.Rendering.RenderBufferStoreAction.DontCare; // Writing by-default has to preserve the contents, think rendering only a few small triangles on top of a big framebuffer // So it means we need to load/clear contents potentially. // If a user pass knows it will write all pixels in a buffer (like a blit) it can use the WriteAll/Discard usage to indicate this to the graph - bool partialWrite = fragment.accessFlags.HasFlag(AccessFlags.Write) && !fragment.accessFlags.HasFlag(AccessFlags.Discard); + bool partialWrite = fragment.accessFlags.HasFlag(AccessFlags.Write) + && !fragment.accessFlags.HasFlag(AccessFlags.Discard); ref readonly var resourceData = ref contextData.UnversionedResourceData(fragment.resource); bool isImported = resourceData.isImported; @@ -847,27 +835,26 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) int destroyPassID = resourceData.lastUsePassID; bool usedAfterThisNativePass = (destroyPassID >= (nativePass.lastGraphPass + 1)); + // Read or partial-write logic if (fragment.accessFlags.HasFlag(AccessFlags.Read) || partialWrite) { // The resource is already allocated before this pass so we need to load it if (resourceData.firstUsePassID < nativePass.firstGraphPass) { - currAttachment.loadAction = UnityEngine.Rendering.RenderBufferLoadAction.Load; + loadAction = RenderBufferLoadAction.Load; #if UNITY_EDITOR currLoadAudit = new LoadAudit(LoadReason.LoadPreviouslyWritten, resourceData.firstUsePassID); #endif - // Once we decide to load a resource, we must default to the Store action if the resource is used after the current native pass. // If we were to use the DontCare action in this case, the driver would be effectively be allowed to discard the // contents of the resource. This is true even when we're only performing reads on it. if (usedAfterThisNativePass) { - currAttachment.storeAction = RenderBufferStoreAction.Store; + storeAction = RenderBufferStoreAction.Store; #if UNITY_EDITOR currStoreAudit = new StoreAudit(StoreReason.StoreUsedByLaterPass, destroyPassID); #endif } - } // It's first used this native pass so we need to clear it so reads/partial writes return the correct clear value // the clear colors are part of the resource description and set-up when executing the graph we don't need to care about that here. @@ -878,14 +865,14 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) // Check if the user indicated he wanted clearing of his imported resource on it's first use by the graph if (resourceData.clear) { - currAttachment.loadAction = UnityEngine.Rendering.RenderBufferLoadAction.Clear; + loadAction = RenderBufferLoadAction.Clear; #if UNITY_EDITOR currLoadAudit = new LoadAudit(LoadReason.ClearImported); #endif } else { - currAttachment.loadAction = UnityEngine.Rendering.RenderBufferLoadAction.Load; + loadAction = RenderBufferLoadAction.Load; #if UNITY_EDITOR currLoadAudit = new LoadAudit(LoadReason.LoadImported); #endif @@ -894,7 +881,7 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) else { // Created by the graph internally clear on first read - currAttachment.loadAction = UnityEngine.Rendering.RenderBufferLoadAction.Clear; + loadAction = RenderBufferLoadAction.Clear; #if UNITY_EDITOR currLoadAudit = new LoadAudit(LoadReason.ClearCreated); #endif @@ -902,6 +889,7 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) } } + // Write logic if (fragment.accessFlags.HasFlag(AccessFlags.Write)) { // Simple non-msaa case @@ -910,7 +898,7 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) if (usedAfterThisNativePass) { // The resource is still used after this native pass so we need to store it. - currAttachment.storeAction = RenderBufferStoreAction.Store; + storeAction = RenderBufferStoreAction.Store; #if UNITY_EDITOR currStoreAudit = new StoreAudit(StoreReason.StoreUsedByLaterPass, destroyPassID); #endif @@ -927,14 +915,14 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) { if (resourceData.discard) { - currAttachment.storeAction = RenderBufferStoreAction.DontCare; + storeAction = RenderBufferStoreAction.DontCare; #if UNITY_EDITOR currStoreAudit = new StoreAudit(StoreReason.DiscardImported); #endif } else { - currAttachment.storeAction = RenderBufferStoreAction.Store; + storeAction = RenderBufferStoreAction.Store; #if UNITY_EDITOR currStoreAudit = new StoreAudit(StoreReason.StoreImported); #endif @@ -942,7 +930,7 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) } else { - currAttachment.storeAction = RenderBufferStoreAction.DontCare; + storeAction = RenderBufferStoreAction.DontCare; #if UNITY_EDITOR currStoreAudit = new StoreAudit(StoreReason.DiscardUnused); #endif @@ -957,11 +945,10 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) // With MSAA we may access the resolved data for longer than the MSAA data so we track the destroyPass and lastPassThatNeedsUnresolved separately // In theory the opposite could also be true (use MSAA after resolve data is no longer needed) but we consider it sufficiently strange to not // consider it here. - - currAttachment.storeAction = RenderBufferStoreAction.DontCare; - + storeAction = RenderBufferStoreAction.DontCare; //Check if we're the last pass writing it by checking the output version of the current pass is the higherst version the resource will reach - bool lastWriter = (resourceData.latestVersionNumber == fragment.resource.version); // Cheaper but same? = resourceData.lastWritePassID >= pass.firstGraphPass && resourceData.lastWritePassID < pass.firstGraphPass + pass.numSubPasses; + bool lastWriter = (resourceData.latestVersionNumber == fragment.resource.version); + // Cheaper but same? = resourceData.lastWritePassID >= pass.firstGraphPass && resourceData.lastWritePassID < pass.firstGraphPass + pass.numSubPasses; bool isImportedLastWriter = isImported && lastWriter; // Used outside this native render pass, we need to store something @@ -969,7 +956,7 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) { // Assume nothing is needed unless we are an imported texture (which doesn't require discarding) and we're the last ones writing it bool needsMSAASamples = isImportedLastWriter && !resourceData.discard; - bool needsResolvedData = isImportedLastWriter && (resourceData.bindMS == false);//bindMS never resolves + bool needsResolvedData = isImportedLastWriter && (resourceData.bindMS == false); int userPassID = 0; int msaaUserPassID = 0; @@ -978,7 +965,7 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) foreach (ref readonly var reader in contextData.Readers(fragment.resource)) { ref var readerPass = ref contextData.passData.ElementAt(reader.passId); - bool isFragment = readerPass.IsUsedAsFragment(fragment.resource, contextData); + bool isFragmentUsed = readerPass.IsUsedAsFragment(fragment.resource, contextData); // Unsafe pass - we cannot know how it is used, so we need to both store and resolve if (readerPass.type == RenderGraphPassType.Unsafe) @@ -990,7 +977,7 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) break; } // A fragment attachment use we need the msaa samples - else if (isFragment) + if (isFragmentUsed) { needsMSAASamples = true; msaaUserPassID = reader.passId; @@ -1014,32 +1001,39 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) if (needsMSAASamples && needsResolvedData) { - currAttachment.storeAction = RenderBufferStoreAction.StoreAndResolve; + storeAction = RenderBufferStoreAction.StoreAndResolve; #if UNITY_EDITOR currStoreAudit = new StoreAudit( - (isImportedLastWriter) ? StoreReason.StoreImported : StoreReason.StoreUsedByLaterPass, userPassID, - (isImportedLastWriter) ? StoreReason.StoreImported : StoreReason.StoreUsedByLaterPass, msaaUserPassID); + (isImportedLastWriter ? StoreReason.StoreImported : StoreReason.StoreUsedByLaterPass), + userPassID, + (isImportedLastWriter ? StoreReason.StoreImported : StoreReason.StoreUsedByLaterPass), + msaaUserPassID); #endif } else if (needsResolvedData) { - currAttachment.storeAction = RenderBufferStoreAction.Resolve; + storeAction = RenderBufferStoreAction.Resolve; #if UNITY_EDITOR - currStoreAudit = new StoreAudit((isImportedLastWriter) ? StoreReason.StoreImported : StoreReason.StoreUsedByLaterPass, userPassID, StoreReason.DiscardUnused); + currStoreAudit = new StoreAudit( + (isImportedLastWriter ? StoreReason.StoreImported : StoreReason.StoreUsedByLaterPass), + userPassID, + StoreReason.DiscardUnused); #endif } else if (needsMSAASamples) { - currAttachment.storeAction = RenderBufferStoreAction.Store; + storeAction = RenderBufferStoreAction.Store; #if UNITY_EDITOR currStoreAudit = new StoreAudit( - (resourceData.bindMS) ? StoreReason.DiscardBindMs : StoreReason.DiscardUnused, -1, - (isImportedLastWriter) ? StoreReason.StoreImported : StoreReason.StoreUsedByLaterPass, msaaUserPassID); + (resourceData.bindMS ? StoreReason.DiscardBindMs : StoreReason.DiscardUnused), + -1, + (isImportedLastWriter ? StoreReason.StoreImported : StoreReason.StoreUsedByLaterPass), + msaaUserPassID); #endif } else { - Debug.Assert(false, "Resource was not destroyed but nobody seems to be using it!??"); + Debug.Assert(false, "Resource was not destroyed but nobody seems to be using it?!"); } } else if (isImportedLastWriter) @@ -1051,14 +1045,14 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) { if (resourceData.discard) { - currAttachment.storeAction = RenderBufferStoreAction.DontCare; + storeAction = RenderBufferStoreAction.DontCare; #if UNITY_EDITOR currStoreAudit = new StoreAudit(StoreReason.DiscardImported); #endif } else { - currAttachment.storeAction = RenderBufferStoreAction.Store; + storeAction = RenderBufferStoreAction.Store; #if UNITY_EDITOR currStoreAudit = new StoreAudit( StoreReason.DiscardBindMs, -1, StoreReason.StoreImported); @@ -1072,11 +1066,13 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) if (resourceData.discard) { // Depth attachment always comes first if existing - bool isDepthAttachment = (nativePass.hasDepth && idx == 0); - + bool isDepthAttachment = (nativePass.hasDepth && nativePass.attachments.size == 0); + // For color attachment, we only discard the MSAA buffers and keep the resolve texture // This is a design decision due to the restrictive ImportResourceParams API, it could be revised later - currAttachment.storeAction = isDepthAttachment ? RenderBufferStoreAction.DontCare : RenderBufferStoreAction.Resolve; + storeAction = isDepthAttachment + ? RenderBufferStoreAction.DontCare + : RenderBufferStoreAction.Resolve; #if UNITY_EDITOR currStoreAudit = new StoreAudit( StoreReason.DiscardImported, -1, StoreReason.DiscardImported); @@ -1084,7 +1080,7 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) } else { - currAttachment.storeAction = RenderBufferStoreAction.StoreAndResolve; + storeAction = RenderBufferStoreAction.StoreAndResolve; #if UNITY_EDITOR currStoreAudit = new StoreAudit( StoreReason.StoreImported, -1, StoreReason.StoreImported); @@ -1097,13 +1093,27 @@ void DetermineLoadStoreActions(ref NativePassData nativePass) if (resourceData.memoryLess) { - currAttachment.memoryless = true; + memoryless = true; + #if DEVELOPMENT_BUILD || UNITY_EDITOR // Ensure load/store actions are actually valid for memory less - if (currAttachment.loadAction == RenderBufferLoadAction.Load) throw new Exception("Resource was marked as memoryless but is trying to load."); - if (currAttachment.storeAction != RenderBufferStoreAction.DontCare) throw new Exception("Resource was marked as memoryless but is trying to store or resolve."); + if (loadAction == RenderBufferLoadAction.Load) + throw new Exception("Resource was marked as memoryless but is trying to load."); + if (storeAction != RenderBufferStoreAction.DontCare) + throw new Exception("Resource was marked as memoryless but is trying to store or resolve."); #endif } + + var newAttachment = new NativePassAttachment( + handle, + loadAction, + storeAction, + memoryless, + mipLevel, + depthSlice + ); + + nativePass.attachments.Add(newAttachment); } } } @@ -1122,9 +1132,10 @@ private void ValidateNativePass(in NativePassData nativePass, int width, int hei } [Conditional("DEVELOPMENT_BUILD"), Conditional("UNITY_EDITOR")] - private void ValidateAttachment(in RenderTargetInfo attRenderTargetInfo, RenderGraphResourceRegistry resources, int nativePassWidth, int nativePassHeight, int nativePassMSAASamples, bool isVrs) + private void ValidateAttachment(in RenderTargetInfo attRenderTargetInfo, RenderGraphResourceRegistry resources, int nativePassWidth, int nativePassHeight, int nativePassMSAASamples, + bool isVrs) { - if(RenderGraph.enableValidityChecks) + if (RenderGraph.enableValidityChecks) { if (isVrs) { @@ -1150,13 +1161,12 @@ internal unsafe void ExecuteBeginRenderPass(InternalRenderGraphContext rgContext ref var attachments = ref nativePass.attachments; var attachmentCount = attachments.size; - ref readonly var firstGraphPass = ref contextData.passData.ElementAt(nativePass.firstGraphPass); - var w = firstGraphPass.fragmentInfoWidth; - var h = firstGraphPass.fragmentInfoHeight; - var d = firstGraphPass.fragmentInfoVolumeDepth; - var s = firstGraphPass.fragmentInfoSamples; + var width = nativePass.width; + var height = nativePass.height; + var volumeDepth = nativePass.volumeDepth; + var samples = nativePass.samples; - ValidateNativePass(nativePass, w, h, d, s, attachmentCount); + ValidateNativePass(nativePass, width, height, volumeDepth, samples, attachmentCount); ref var nativeSubPasses = ref contextData.nativeSubPassData; NativeArray nativeSubPassArray = NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray(nativeSubPasses.GetUnsafeReadOnlyPtr() + nativePass.firstNativeSubPass, nativePass.numNativeSubPasses, Allocator.None); @@ -1183,15 +1193,15 @@ internal unsafe void ExecuteBeginRenderPass(InternalRenderGraphContext rgContext m_BeginRenderPassAttachments.Resize(attachmentCount, NativeArrayOptions.UninitializedMemory); for (var i = 0; i < attachmentCount; ++i) { - ref var currAttachmentHandle = ref attachments[i].handle; + ref readonly var currAttachmentHandle = ref attachments[i].handle; resources.GetRenderTargetInfo(currAttachmentHandle, out var renderTargetInfo); bool isVrs = (i == nativePass.shadingRateImageIndex); - ValidateAttachment(renderTargetInfo, resources, w, h, s, isVrs); + ValidateAttachment(renderTargetInfo, resources, width, height, samples, isVrs); ref var currBeginAttachment = ref m_BeginRenderPassAttachments.ElementAt(i); - currBeginAttachment = new AttachmentDescriptor(renderTargetInfo.format); + currBeginAttachment = new AttachmentDescriptor(renderTargetInfo.format); // Set up the RT pointers if (attachments[i].memoryless == false) @@ -1230,7 +1240,7 @@ internal unsafe void ExecuteBeginRenderPass(InternalRenderGraphContext rgContext if (i == 0 && nativePass.hasDepth) { // TODO: There seems to be no clear depth specified ?!?! - currBeginAttachment.clearDepth = 1.0f;// desc.clearDepth; + currBeginAttachment.clearDepth = 1.0f; // desc.clearDepth; } else { @@ -1245,7 +1255,7 @@ internal unsafe void ExecuteBeginRenderPass(InternalRenderGraphContext rgContext var graphPassNamesForDebugSpan = ReadOnlySpan.Empty; #if DEVELOPMENT_BUILD || UNITY_EDITOR - if(RenderGraph.enableValidityChecks) + if (RenderGraph.enableValidityChecks) { graphPassNamesForDebug.Clear(); @@ -1269,6 +1279,7 @@ internal unsafe void ExecuteBeginRenderPass(InternalRenderGraphContext rgContext // Adding '/' in UTF8 nameBytes[startStr++] = (byte)(0x2F); } + // Rewriting last '/' to be the null terminator nameBytes[utf8CStrDebugNameLength - 1] = (byte)0; } @@ -1277,7 +1288,7 @@ internal unsafe void ExecuteBeginRenderPass(InternalRenderGraphContext rgContext } #endif - rgContext.cmd.BeginRenderPass(w, h, d, s, attachmentDescArray, depthAttachmentIndex, nativePass.shadingRateImageIndex, nativeSubPassArray, graphPassNamesForDebugSpan); + rgContext.cmd.BeginRenderPass(width, height, volumeDepth, samples, attachmentDescArray, depthAttachmentIndex, nativePass.shadingRateImageIndex, nativeSubPassArray, graphPassNamesForDebugSpan); #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.Release(safetyHandle); @@ -1350,7 +1361,6 @@ internal unsafe void ExecuteSetRandomWriteTarget(in CommandBuffer cmd, RenderGra { cmd.SetRandomWriteTarget(index, buff, false); } - } else { @@ -1460,6 +1470,7 @@ public void ExecuteGraph(InternalRenderGraphContext rgContext, RenderGraphResour { throw new Exception("Compiler error: Pass is marked as beginning a native sub pass but no pass is currently active."); } + rgContext.cmd.NextSubPass(); } } @@ -1539,4 +1550,4 @@ public void ExecuteGraph(InternalRenderGraphContext rgContext, RenderGraphResour } } } -} +} \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/PassesData.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/PassesData.cs index 7b57e2fe2c0..bdebac96bd0 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/PassesData.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Compiler/PassesData.cs @@ -10,26 +10,44 @@ namespace UnityEngine.Rendering.RenderGraphModule.NativeRenderPassCompiler { // Per pass info on inputs to the pass [DebuggerDisplay("PassInputData: Res({resource.index})")] - internal struct PassInputData + internal readonly struct PassInputData { - public ResourceHandle resource; + public readonly ResourceHandle resource; + + public PassInputData(ResourceHandle resource) + { + this.resource = resource; + } } // Per pass info on outputs to the pass [DebuggerDisplay("PassOutputData: Res({resource.index})")] - internal struct PassOutputData + internal readonly struct PassOutputData { - public ResourceHandle resource; + public readonly ResourceHandle resource; + + public PassOutputData(ResourceHandle resource) + { + this.resource = resource; + } } // Per pass fragment (attachment) info [DebuggerDisplay("PassFragmentData: Res({resource.index}):{accessFlags}")] - internal struct PassFragmentData + internal readonly struct PassFragmentData { - public ResourceHandle resource; - public AccessFlags accessFlags; - public int mipLevel; - public int depthSlice; + public readonly ResourceHandle resource; + public readonly AccessFlags accessFlags; + public readonly int mipLevel; + public readonly int depthSlice; + + public PassFragmentData(ResourceHandle handle, AccessFlags flags, int mipLevel, int depthSlice) + { + resource = handle; + accessFlags = flags; + this.mipLevel = mipLevel; + this.depthSlice = depthSlice; + } [MethodImpl(MethodImplOptions.AggressiveInlining)] public override int GetHashCode() @@ -55,11 +73,18 @@ public static bool SameSubResource(in PassFragmentData x, in PassFragmentData y) // Per pass random write texture info [DebuggerDisplay("PassRandomWriteData: Res({resource.index}):{index}:{preserveCounterValue}")] - internal struct PassRandomWriteData + internal readonly struct PassRandomWriteData { - public ResourceHandle resource; - public int index; - public bool preserveCounterValue; + public readonly ResourceHandle resource; + public readonly int index; + public readonly bool preserveCounterValue; + + public PassRandomWriteData(ResourceHandle resource, int index, bool preserveCounterValue) + { + this.resource = resource; + this.index = index; + this.preserveCounterValue = preserveCounterValue; + } public override int GetHashCode() { @@ -240,7 +265,7 @@ public readonly ReadOnlySpan Fragments(CompilerContextData ctx => ctx.fragmentData.MakeReadOnlySpan(firstFragment, numFragments); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public PassFragmentData ShadingRateImage(CompilerContextData ctx) + public readonly PassFragmentData ShadingRateImage(CompilerContextData ctx) => ctx.fragmentData[shadingRateImageIndex]; [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -253,7 +278,7 @@ public readonly ReadOnlySpan FirstUsedResources(CompilerContextD // Loop over this pass's random write textures returned as PassFragmentData public ReadOnlySpan RandomWriteTextures(CompilerContextData ctx) - => ctx.randomAccessResourceData.MakeReadOnlySpan(firstRandomAccessResource, numRandomAccessResources); + => ctx.randomAccessResourceData.MakeReadOnlySpan(firstRandomAccessResource, numRandomAccessResources); [MethodImpl(MethodImplOptions.AggressiveInlining)] public readonly ReadOnlySpan LastUsedResources(CompilerContextData ctx) @@ -392,14 +417,24 @@ internal readonly bool IsUsedAsFragment(ResourceHandle h, CompilerContextData ct // Data per attachment of a native renderpass [DebuggerDisplay("Res({handle.index}) : {loadAction} : {storeAction} : {memoryless}")] - internal struct NativePassAttachment + internal readonly struct NativePassAttachment { - public ResourceHandle handle; - public UnityEngine.Rendering.RenderBufferLoadAction loadAction; - public UnityEngine.Rendering.RenderBufferStoreAction storeAction; - public bool memoryless; - public int mipLevel; - public int depthSlice; + public readonly ResourceHandle handle; + public readonly RenderBufferLoadAction loadAction; + public readonly RenderBufferStoreAction storeAction; + public readonly bool memoryless; + public readonly int mipLevel; + public readonly int depthSlice; + + public NativePassAttachment(ResourceHandle handle, RenderBufferLoadAction loadAction, RenderBufferStoreAction storeAction, bool memoryless, int mipLevel, int depthSlice) + { + this.handle = handle; + this.loadAction = loadAction; + this.storeAction = storeAction; + this.memoryless = memoryless; + this.mipLevel = mipLevel; + this.depthSlice = depthSlice; + } } internal enum LoadReason @@ -415,7 +450,7 @@ internal enum LoadReason } [DebuggerDisplay("{reason} : {passId}")] - internal struct LoadAudit + internal readonly struct LoadAudit { public static readonly string[] LoadReasonMessages = { "Invalid reason", @@ -426,8 +461,8 @@ internal struct LoadAudit "The pass indicated it will rewrite the full resource contents. Existing contents are not loaded or cleared.", }; - public LoadReason reason; - public int passId; + public readonly LoadReason reason; + public readonly int passId; public LoadAudit(LoadReason setReason, int setPassId = -1) { @@ -455,7 +490,7 @@ internal enum StoreReason } [DebuggerDisplay("{reason} : {passId} / MSAA {msaaReason} : {msaaPassId}")] - internal struct StoreAudit + internal readonly struct StoreAudit { public static readonly string[] StoreReasonMessages = { "Invalid reason", @@ -467,10 +502,10 @@ internal struct StoreAudit "The resource is a single sample resource, there is no multi-sample data to handle.", }; - public StoreReason reason; - public int passId; - public StoreReason msaaReason; - public int msaaPassId; + public readonly StoreReason reason; + public readonly int passId; + public readonly StoreReason msaaReason; + public readonly int msaaPassId; public StoreAudit(StoreReason setReason, int setPassId = -1, StoreReason setMsaaReason = StoreReason.NoMSAABuffer, int setMsaaPassId = -1) { @@ -506,10 +541,10 @@ internal enum PassBreakReason } [DebuggerDisplay("{reason} : {breakPass}")] - internal struct PassBreakAudit + internal readonly struct PassBreakAudit { - public PassBreakReason reason; - public int breakPass; + public readonly PassBreakReason reason; + public readonly int breakPass; public PassBreakAudit(PassBreakReason reason, int breakPass) { @@ -576,7 +611,7 @@ public NativePassData(ref PassData pass, CompilerContextData ctx) firstGraphPass = pass.passId; lastGraphPass = pass.passId; numGraphPasses = 1; - firstNativeSubPass = -1;// Set up during compile + firstNativeSubPass = -1; // Set up during compile numNativeSubPasses = 0; fragments = new FixedAttachmentArray(); @@ -675,7 +710,7 @@ public readonly void GetGraphPassNames(CompilerContextData ctx, DynamicArray(); @@ -807,6 +843,7 @@ public static PassBreakAudit CanMerge(CompilerContextData contextData, int activ } } } + foreach (ref readonly var fragmentInput in passToMerge.FragmentInputs(contextData)) { @@ -838,8 +875,10 @@ public static PassBreakAudit CanMerge(CompilerContextData contextData, int activ } } - bool canMergeNativeSubPass = CanMergeNativeSubPass(contextData, nativePass, passToMerge); - if (!canMergeNativeSubPass && nativePass.numGraphPasses + 1 > NativePassCompiler.k_MaxSubpass) + // We check first if we are at risk of having too many subpasses, + // only then we do the costlier subpass merging check, short circuiting it whenever possible + bool canAddAnExtraSubpass = (nativePass.numGraphPasses < NativePassCompiler.k_MaxSubpass); + if (!canAddAnExtraSubpass && !CanMergeNativeSubPass(contextData, ref nativePass, ref passToMerge)) { return new PassBreakAudit(PassBreakReason.SubPassLimitReached, passIdToMerge); } @@ -850,7 +889,8 @@ public static PassBreakAudit CanMerge(CompilerContextData contextData, int activ // This function follows the structure of TryMergeNativeSubPass but only tests if the new native subpass can be // merged with the last one, allowing for early returns. It does not modify the state - static bool CanMergeNativeSubPass(CompilerContextData contextData, NativePassData nativePass, PassData passToMerge) + // ref for nativePass is used for performance reasons. The method should not modify nativePass. + static bool CanMergeNativeSubPass(CompilerContextData contextData, ref NativePassData nativePass, ref PassData passToMerge) { // We have no output attachments, this is an "empty" raster pass doing only non-rendering command so skip it. if (passToMerge.numFragments == 0 && passToMerge.numFragmentInputs == 0) @@ -858,103 +898,101 @@ static bool CanMergeNativeSubPass(CompilerContextData contextData, NativePassDat return true; } + // Nothing to merge with if (nativePass.numNativeSubPasses == 0) { - return false; // nothing to merge with + return false; } - ref readonly var fragmentList = ref nativePass.fragments; - ref readonly var lastPass = ref contextData.nativeSubPassData.ElementAt(nativePass.firstNativeSubPass + + ref var lastPass = ref contextData.nativeSubPassData.ElementAt(nativePass.firstNativeSubPass + nativePass.numNativeSubPasses - 1); - // NOTE: Not all graph subpasses get an actual native pass: - // - There could be passes that do only non-raster ops (like setglobal) and have no attachments. They don't get a native pass - // - Renderpasses that use exactly the same rendertargets at the previous pass use the same native pass. This is because - // nextSubpass is expensive on some platforms (even if its' essentially a no-op as it's using the same attachments). + bool currRenderGraphPassHasDepth = passToMerge.fragmentInfoHasDepth; + + // If any output attachments, they must match existing ones in the subpass + // Doing an early return if the count differs + int colorOffset = currRenderGraphPassHasDepth ? -1 : 0; + int colorOutputsLength = passToMerge.numFragments + colorOffset; + if (colorOutputsLength != lastPass.colorOutputs.Length) + { + return false; + } + + // If any input attachments, they must match existing ones in the subpass + // Doing an early return if the count differs + int inputsLength = passToMerge.numFragmentInputs; + if (inputsLength != lastPass.inputs.Length) + { + return false; + } + SubPassFlags flags = SubPassFlags.None; - // If depth ends up being bound only because of merging we explicitly say that we will not write to it + // If depth ends up being bound only because of merging, we explicitly say that we will not write to it // which could have been implied by leaving the flag to None - if (!passToMerge.fragmentInfoHasDepth && nativePass.hasDepth) + if (!currRenderGraphPassHasDepth && nativePass.hasDepth) { flags = SubPassFlags.ReadOnlyDepth; } - // MRT attachments - { - int fragmentIdx = 0; - int colorOffset = (passToMerge.fragmentInfoHasDepth) ? -1 : 0; - int colorOutputsLength = passToMerge.numFragments + colorOffset; + ref readonly var fragmentList = ref nativePass.fragments; - if (colorOutputsLength != lastPass.colorOutputs.Length) + // MRT attachments + int fragmentIdx = 0; + foreach (ref readonly var graphPassFragment in passToMerge.Fragments(contextData)) + { + // Check if we're handling the depth attachment + if (currRenderGraphPassHasDepth && fragmentIdx == 0) { - return false; + flags = (graphPassFragment.accessFlags.HasFlag(AccessFlags.Write)) + ? SubPassFlags.None + : SubPassFlags.ReadOnlyDepth; } - - foreach (ref readonly var graphPassFragment in passToMerge.Fragments(contextData)) + // It's a color attachment + else { - // Check if we're handling the depth attachment - if (passToMerge.fragmentInfoHasDepth && fragmentIdx == 0) - { - flags = (graphPassFragment.accessFlags.HasFlag(AccessFlags.Write)) - ? SubPassFlags.None - : SubPassFlags.ReadOnlyDepth; - } - // It's a color attachment - else + // Find the index of this subpass attachment in the native renderpass attachment list + int colorAttachmentIdx = -1; + for (int fragmentId = 0; fragmentId < fragmentList.size; ++fragmentId) { - // Find the index of this subpass's attachment in the native renderpass attachment list - int colorAttachmentIdx = -1; - for (int fragmentId = 0; fragmentId < fragmentList.size; ++fragmentId) + if (PassFragmentData.SameSubResource(fragmentList[fragmentId], graphPassFragment)) { - if (PassFragmentData.SameSubResource(fragmentList[fragmentId], graphPassFragment)) - { - colorAttachmentIdx = fragmentId; - break; - } - } - - if (colorAttachmentIdx < 0 || colorAttachmentIdx != lastPass.colorOutputs[fragmentIdx + colorOffset]) - { - return false; + colorAttachmentIdx = fragmentId; + break; } } - fragmentIdx++; + if (colorAttachmentIdx < 0 || colorAttachmentIdx != lastPass.colorOutputs[fragmentIdx + colorOffset]) + { + return false; + } } + + fragmentIdx++; } + // FB-fetch attachments + int inputIndex = 0; + foreach (ref readonly var graphFragmentInput in passToMerge.FragmentInputs(contextData)) { - int inputIndex = 0; - int inputsLength = passToMerge.numFragmentInputs; - - if (inputsLength != lastPass.inputs.Length) - { - return false; - } - - foreach (ref readonly var graphFragmentInput in passToMerge.FragmentInputs(contextData)) + // Find the index of this subpass attachment in the native renderpass attachment list + int inputAttachmentIdx = -1; + for (int fragmentId = 0; fragmentId < fragmentList.size; ++fragmentId) { - // Find the index of this subpass's attachment in the native renderpass attachment list - int inputAttachmentIdx = -1; - for (int fragmentId = 0; fragmentId < fragmentList.size; ++fragmentId) - { - if (PassFragmentData.SameSubResource(fragmentList[fragmentId], graphFragmentInput)) - { - inputAttachmentIdx = fragmentId; - break; - } - } - - // need to keep this - same comment as above - if (inputAttachmentIdx < 0 || inputAttachmentIdx != lastPass.inputs[inputIndex]) + if (PassFragmentData.SameSubResource(fragmentList[fragmentId], graphFragmentInput)) { - return false; + inputAttachmentIdx = fragmentId; + break; } + } - inputIndex++; + if (inputAttachmentIdx < 0 || inputAttachmentIdx != lastPass.inputs[inputIndex]) + { + return false; } + + inputIndex++; } // last check for flags @@ -965,10 +1003,10 @@ static bool CanMergeNativeSubPass(CompilerContextData contextData, NativePassDat // Modifies the state public static void TryMergeNativeSubPass(CompilerContextData contextData, ref NativePassData nativePass, ref PassData passToMerge) { - ref readonly var fragmentList = ref nativePass.fragments; + ref var fragmentList = ref nativePass.fragments; // Only done once per native pass (on creation), should stay -1 if no fragments - if (nativePass is { numNativeSubPasses: 0, fragments: { size: > 0 } }) + if (nativePass.numNativeSubPasses == 0 && nativePass.fragments.size > 0) { nativePass.firstNativeSubPass = contextData.nativeSubPassData.Length; } @@ -1075,8 +1113,7 @@ public static void TryMergeNativeSubPass(CompilerContextData contextData, ref Na nativePass.numNativeSubPasses - 1))) { contextData.nativeSubPassData.Add(desc); - int idx = contextData.nativeSubPassData.LastIndex(); - Debug.Assert(idx == nativePass.firstNativeSubPass + nativePass.numNativeSubPasses); + Debug.Assert(contextData.nativeSubPassData.LastIndex() == nativePass.firstNativeSubPass + nativePass.numNativeSubPasses); nativePass.numNativeSubPasses++; passToMerge.beginNativeSubpass = true; @@ -1202,7 +1239,7 @@ public static PassBreakAudit TryMerge(CompilerContextData contextData, int activ nativePass.fragments.Add(contextData.fragmentData[passToMerge.firstFragment]); var size = nativePass.fragments.size; if (size > 1) - (nativePass.fragments[0], nativePass.fragments[size-1]) = (nativePass.fragments[size-1], nativePass.fragments[0]); + (nativePass.fragments[0], nativePass.fragments[size - 1]) = (nativePass.fragments[size - 1], nativePass.fragments[0]); // Must update indices from Native subPasses created before UpdateNativeSubPassesAttachments(contextData, ref nativePass); @@ -1217,24 +1254,25 @@ public static PassBreakAudit TryMerge(CompilerContextData contextData, int activ for (int i = 0; i < nativePass.fragments.size; ++i) { ref var existingAttach = ref nativePass.fragments[i]; - if (PassFragmentData.SameSubResource(existingAttach, newAttach)) - { - var newAttachAccessFlags = newAttach.accessFlags; - // If the existing attachment accessFlag has Discard flag, remove Read flag from newAttach flags, as the content has not to be Loaded - if (existingAttach.accessFlags.HasFlag(AccessFlags.Discard)) - newAttachAccessFlags = newAttachAccessFlags & ~AccessFlags.Read; + if (!PassFragmentData.SameSubResource(existingAttach, newAttach)) + continue; - existingAttach.accessFlags |= newAttachAccessFlags; + var newAttachAccessFlags = newAttach.accessFlags; + // If the existing attachment accessFlag has Discard flag, remove Read flag from newAttach flags, as the content has not to be Loaded + if (existingAttach.accessFlags.HasFlag(AccessFlags.Discard)) + newAttachAccessFlags &= ~AccessFlags.Read; #if DEVELOPMENT_BUILD || UNITY_EDITOR - if (existingAttach.resource.version > newAttach.resource.version) - throw new Exception("Adding an older version while a higher version is already registered with the pass."); + if (existingAttach.resource.version > newAttach.resource.version) + throw new Exception("Adding an older version while a higher version is already registered with the pass."); #endif - var prevAttachRes = existingAttach.resource; - existingAttach.resource = new ResourceHandle(prevAttachRes, newAttach.resource.version); - alreadyAttached = true; - break; - } + existingAttach = new PassFragmentData( + new ResourceHandle(existingAttach.resource, newAttach.resource.version), + existingAttach.accessFlags | newAttachAccessFlags, + existingAttach.mipLevel, + existingAttach.depthSlice); + alreadyAttached = true; + break; } if (!alreadyAttached) @@ -1250,24 +1288,26 @@ public static PassBreakAudit TryMerge(CompilerContextData contextData, int activ for (int i = 0; i < nativePass.fragments.size; ++i) { ref var existingAttach = ref nativePass.fragments[i]; - if (PassFragmentData.SameSubResource(existingAttach, newAttach)) - { - var newAttachAccessFlags = newAttach.accessFlags; - // If the existing attachment accessFlag has Discard flag, remove Read flag from newAttach flags, as the content has not to be Loaded - if (existingAttach.accessFlags.HasFlag(AccessFlags.Discard)) - newAttachAccessFlags = newAttachAccessFlags & ~AccessFlags.Read; + if (!PassFragmentData.SameSubResource(existingAttach, newAttach)) + continue; - existingAttach.accessFlags |= newAttachAccessFlags; + var newAttachAccessFlags = newAttach.accessFlags; + // If the existing attachment accessFlag has Discard flag, remove Read flag from newAttach flags, as the content has not to be Loaded + if (existingAttach.accessFlags.HasFlag(AccessFlags.Discard)) + newAttachAccessFlags &= ~AccessFlags.Read; #if DEVELOPMENT_BUILD || UNITY_EDITOR - if (existingAttach.resource.version > newAttach.resource.version) - throw new Exception("Adding an older version while a higher version is already registered with the pass."); + if (existingAttach.resource.version > newAttach.resource.version) + throw new Exception("Adding an older version while a higher version is already registered with the pass."); #endif - var prevAttachRes = existingAttach.resource; - existingAttach.resource = new ResourceHandle(prevAttachRes, newAttach.resource.version); - alreadyAttached = true; - break; - } + + existingAttach = new PassFragmentData( + new ResourceHandle(existingAttach.resource, newAttach.resource.version), + existingAttach.accessFlags | newAttachAccessFlags, + existingAttach.mipLevel, + existingAttach.depthSlice); + alreadyAttached = true; + break; } if (!alreadyAttached) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Debug/.buginfo b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Debug/.buginfo index a8e3ae67ae4..272688b1879 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Debug/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/Debug/.buginfo @@ -1 +1 @@ -area: Graphics Tools \ No newline at end of file +area: Graphics Debugging Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.ExceptionMessages.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.ExceptionMessages.cs new file mode 100644 index 00000000000..ee5273810c5 --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.ExceptionMessages.cs @@ -0,0 +1,57 @@ +using System.Collections.Generic; +using System.Diagnostics; + +namespace UnityEngine.Rendering.RenderGraphModule +{ + public partial class RenderGraph + { + internal static class RenderGraphExceptionMessages + { + internal static bool enableCaller = true; + + internal const string k_RenderGraphExecutionError = "Render Graph Execution error"; + + static readonly Dictionary m_RenderGraphStateMessages = new() + { + { RenderGraphState.RecordingPass, "This API cannot be called when Render Graph records a pass, please call it within SetRenderFunc() or outside of AddUnsafePass()/AddComputePass()/AddRasterRenderPass()." }, + { RenderGraphState.RecordingGraph, "This API cannot be called during the Render Graph high-level recording step, please call it within AddUnsafePass()/AddComputePass()/AddRasterRenderPass() or outside of RecordRenderGraph()." }, + { RenderGraphState.RecordingPass | RenderGraphState.Executing, "This API cannot be called when Render Graph records a pass or executes it, please call it outside of AddUnsafePass()/AddComputePass()/AddRasterRenderPass()." }, + { RenderGraphState.Executing, "This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc()." }, + { RenderGraphState.Active, "This API cannot be called when Render Graph is active, please call it outside of RecordRenderGraph()." } + }; + + const string k_ErrorDefaultMessage = "Invalid render graph state, impossible to log the exception."; + + internal static string GetExceptionMessage(RenderGraphState state) + { + string caller = GetHigherCaller(); + if (!m_RenderGraphStateMessages.TryGetValue(state, out var messageException)) + { + return enableCaller ? $"[{caller}] {k_ErrorDefaultMessage}" : k_ErrorDefaultMessage; + } + + return enableCaller ? $"[{caller}] {messageException}" : messageException; + } + + static string GetHigherCaller() + { + // k_CurrentStackCaller is used here to skip three levels in the call stack: + // Level 0: GetHigherCaller() itself. + // Level 1: GetExceptionMessage() or any other wrapper method that calls GetHigherCaller(). + // Level 2: The function that directly calls GetMessage() (e.g CheckNotUsedWhenExecute). + // Level 3: The actual function we are interested in, our public API. + const int k_CurrentStackCaller = 3; + + var stackTrace = new StackTrace(k_CurrentStackCaller, false); + + if (stackTrace.FrameCount > 0) + { + var frame = stackTrace.GetFrame(0); + return frame?.GetMethod()?.Name ?? "UnknownCaller"; + } + + return "UnknownCaller"; + } + } + } +} diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.ExceptionMessages.cs.meta b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.ExceptionMessages.cs.meta new file mode 100644 index 00000000000..7ba09e5b9ac --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.ExceptionMessages.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: f658c411e0892ba499e17093373f687b \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.cs index f559c2fbc7f..cb316a635ea 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.cs @@ -48,6 +48,35 @@ public enum AccessFlags ReadWrite = Read | Write } + [Flags] + internal enum RenderGraphState + { + /// + /// Render Graph is not doing anything. + /// + Idle = 0, + + /// + /// Render Graph is recording the graph. + /// + RecordingGraph = 1 << 0, + + /// + /// Render Graph is recording a low level pass. + /// + RecordingPass = 1 << 1, + + /// + /// Render Graph is executing the graph. + /// + Executing = 1 << 2, + + /// + /// Utility flag to check if the graph is active. + /// + Active = RecordingGraph | RecordingPass | Executing + } + /// /// An object representing the internal context of a rendergraph pass execution. /// This object is public for technical reasons only and should not be used. @@ -442,12 +471,12 @@ public void InitializeCompilationData(List passes, RenderGraphR int m_CurrentFrameIndex; int m_CurrentImmediatePassIndex; bool m_ExecutionExceptionWasRaised; - bool m_HasRenderGraphBegun; bool m_RendererListCulling; bool m_EnableCompilationCaching; CompiledGraph m_DefaultCompiledGraph = new(); CompiledGraph m_CurrentCompiledGraph; string m_CaptureDebugDataForExecution; // Null unless debug data has been requested + RenderGraphState m_RenderGraphState; Dictionary m_DebugData = new Dictionary(); @@ -464,6 +493,12 @@ internal void RequestCaptureDebugData(string executionName) m_CaptureDebugDataForExecution = executionName; } + internal RenderGraphState RenderGraphState + { + get { return m_RenderGraphState; } + set { m_RenderGraphState = value; } + } + /// If true, the Render Graph Viewer is active. public static bool isRenderGraphViewerActive { get; internal set; } @@ -508,13 +543,22 @@ public RenderGraph(string name = "RenderGraph") m_Resources = new RenderGraphResourceRegistry(m_DebugParameters, m_FrameInformationLogger); s_RegisteredGraphs.Add(this); onGraphRegistered?.Invoke(this); + + m_RenderGraphState = RenderGraphState.Idle; + + RenderGraph.RenderGraphExceptionMessages.enableCaller = true; } /// /// Cleanup the Render Graph. /// + /// + /// This API cannot be called when Render Graph is active, please call it outside of RecordRenderGraph(). + /// public void Cleanup() { + CheckNotUsedWhenActive(); + m_Resources.Cleanup(); m_DefaultResources.Cleanup(); m_RenderGraphPool.Cleanup(); @@ -541,17 +585,27 @@ public void Cleanup() /// /// Register the render graph to the debug window. /// + /// + /// This API cannot be called when Render Graph is active, please call it outside of RecordRenderGraph(). + /// /// Optional debug panel to which the render graph debug parameters will be registered. public void RegisterDebug(DebugUI.Panel panel = null) { + CheckNotUsedWhenActive(); + m_DebugParameters.RegisterDebug(name, panel); } /// /// Unregister render graph from the debug window. /// + /// + /// This API cannot be called when Render Graph is active, please call it outside of RecordRenderGraph(). + /// public void UnRegisterDebug() { + CheckNotUsedWhenActive(); + m_DebugParameters.UnRegisterDebug(this.name); } @@ -580,8 +634,13 @@ internal DebugData GetDebugData(string executionName) /// End frame processing. Purge resources that have been used since last frame and resets internal states. /// This need to be called once per frame. /// + /// + /// This API cannot be called when Render Graph is active, please call it outside of RecordRenderGraph(). + /// public void EndFrame() { + CheckNotUsedWhenActive(); + m_Resources.PurgeUnusedGraphicsResources(); if (m_DebugParameters.logFrameInformation) @@ -600,10 +659,15 @@ public void EndFrame() /// Import an external texture to the Render Graph. /// Any pass writing to an imported texture will be considered having side effects and can't be automatically culled. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// External RTHandle that needs to be imported. /// A new TextureHandle that represents the imported texture in the context of this rendergraph. public TextureHandle ImportTexture(RTHandle rt) { + CheckNotUsedWhenExecuting(); + return m_Resources.ImportTexture(rt); } @@ -628,15 +692,19 @@ public TextureHandle ImportShadingRateImageTexture(RTHandle rt) /// Note: RTHandles that wrap RenderTargetIdentifier will fail to import using this overload as render graph can't derive the render texture's properties. /// In that case the overload taking a RenderTargetInfo argument should be used instead. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// External RTHandle that needs to be imported. /// Info describing the clear behavior of imported textures. Clearing textures using importParams may be more efficient than manually clearing the texture using `cmd.Clear` on some hardware. /// A new TextureHandle that represents the imported texture in the context of this rendergraph. public TextureHandle ImportTexture(RTHandle rt, ImportResourceParams importParams ) { + CheckNotUsedWhenExecuting(); + return m_Resources.ImportTexture(rt, importParams); } - /// /// Import an external texture to the Render Graph. This overload should be used for RTHandles wrapping a RenderTargetIdentifier. /// If the RTHandle is wrapping a RenderTargetIdentifer, Rendergrpah can't derive the render texture's properties so the user has to provide this info to the graph through RenderTargetInfo. @@ -646,12 +714,17 @@ public TextureHandle ImportTexture(RTHandle rt, ImportResourceParams importParam /// Note: To avoid inconsistencies between the passed in RenderTargetInfo and render texture this overload can only be used when the RTHandle is wrapping a RenderTargetIdentifier. /// If this is not the case, the overload of ImportTexture without a RenderTargetInfo argument should be used instead. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// External RTHandle that needs to be imported. /// The properties of the passed in RTHandle. /// Info describing the clear behavior of imported textures. Clearing textures using importParams may be more efficient than manually clearing the texture using `cmd.Clear` on some hardware. /// A new TextureHandle that represents the imported texture in the context of this rendergraph. public TextureHandle ImportTexture(RTHandle rt, RenderTargetInfo info, ImportResourceParams importParams = new ImportResourceParams() ) { + CheckNotUsedWhenExecuting(); + return m_Resources.ImportTexture(rt, info, importParams); } @@ -659,20 +732,33 @@ public TextureHandle ImportTexture(RTHandle rt, ImportResourceParams importParam /// Import an external texture to the Render Graph and set the handle as builtin handle. This can only happen from within the graph module /// so it is internal. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// + /// External RTHandle that needs to be imported. + /// The handle is a builtin handle managed by RenderGraph internally. + /// A new TextureHandle that represents the imported texture in the context of this rendergraph. internal TextureHandle ImportTexture(RTHandle rt, bool isBuiltin) { + CheckNotUsedWhenExecuting(); + return m_Resources.ImportTexture(rt, isBuiltin); } /// /// Import the final backbuffer to render graph. The rendergraph can't derive the properties of a RenderTargetIdentifier as it is an opaque handle so the user has to pass them in through the info argument. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// Backbuffer render target identifier. /// The properties of the passed in RTHandle. /// Info describing the clear behavior of imported textures. Clearing textures using importParams may be more efficient than manually clearing the texture using `cmd.Clear` on some hardware. /// A new TextureHandle that represents the imported texture in the context of this rendergraph. public TextureHandle ImportBackbuffer(RenderTargetIdentifier rt, RenderTargetInfo info, ImportResourceParams importParams = new ImportResourceParams()) { + CheckNotUsedWhenExecuting(); + return m_Resources.ImportBackbuffer(rt, info, importParams); } @@ -680,10 +766,15 @@ internal TextureHandle ImportTexture(RTHandle rt, bool isBuiltin) /// Import the final backbuffer to render graph. /// This function can only be used when nativeRenderPassesEnabled is false. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// Backbuffer render target identifier. /// A new TextureHandle that represents the imported texture in the context of this rendergraph. public TextureHandle ImportBackbuffer(RenderTargetIdentifier rt) { + CheckNotUsedWhenExecuting(); + RenderTargetInfo dummy = new RenderTargetInfo(); dummy.width = dummy.height = dummy.volumeDepth = dummy.msaaSamples = 1; dummy.format = GraphicsFormat.R8G8B8A8_SRGB; @@ -693,10 +784,15 @@ public TextureHandle ImportBackbuffer(RenderTargetIdentifier rt) /// /// Create a new Render Graph Texture resource. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// Texture descriptor. /// A new TextureHandle. public TextureHandle CreateTexture(in TextureDesc desc) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateTexture(desc); } @@ -704,13 +800,15 @@ public TextureHandle CreateTexture(in TextureDesc desc) /// Create a new Render Graph Shared Texture resource. /// This texture will be persistent across render graph executions. /// + /// + /// This API cannot be called when Render Graph is active, please call it outside of RecordRenderGraph(). + /// /// Creation descriptor of the texture. /// Set to true if you want to manage the lifetime of the resource yourself. Otherwise the resource will be released automatically if unused for a time. /// A new TextureHandle. public TextureHandle CreateSharedTexture(in TextureDesc desc, bool explicitRelease = false) { - if (m_HasRenderGraphBegun) - throw new InvalidOperationException("A shared texture can only be created outside of render graph execution."); + CheckNotUsedWhenActive(); return m_Resources.CreateSharedTexture(desc, explicitRelease); } @@ -728,11 +826,13 @@ public void RefreshSharedTextureDesc(TextureHandle handle, in TextureDesc desc) /// /// Release a Render Graph shared texture resource. /// + /// + /// This API cannot be called when Render Graph is active, please call it outside of RecordRenderGraph(). + /// /// The handle to the texture that needs to be release. public void ReleaseSharedTexture(TextureHandle texture) { - if (m_HasRenderGraphBegun) - throw new InvalidOperationException("A shared texture can only be release outside of render graph execution."); + CheckNotUsedWhenActive(); m_Resources.ReleaseSharedTexture(texture); } @@ -740,10 +840,15 @@ public void ReleaseSharedTexture(TextureHandle texture) /// /// Create a new Render Graph Texture resource using the descriptor from another texture. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// Texture from which the descriptor should be used. /// A new TextureHandle. public TextureHandle CreateTexture(TextureHandle texture) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateTexture(m_Resources.GetTextureResourceDesc(texture.handle)); } @@ -751,10 +856,15 @@ public TextureHandle CreateTexture(TextureHandle texture) /// Create a new Render Graph Texture if the passed handle is invalid and use said handle as output. /// If the passed handle is valid, no texture is created. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// Desc used to create the texture. /// Texture from which the descriptor should be used. public void CreateTextureIfInvalid(in TextureDesc desc, ref TextureHandle texture) { + CheckNotUsedWhenExecuting(); + if (!texture.IsValid()) texture = m_Resources.CreateTexture(desc); } @@ -764,7 +874,7 @@ public void CreateTextureIfInvalid(in TextureDesc desc, ref TextureHandle textur /// /// Texture resource from which the descriptor is requested. /// The input texture descriptor. - public TextureDesc GetTextureDesc(TextureHandle texture) + public TextureDesc GetTextureDesc(in TextureHandle texture) { return m_Resources.GetTextureResourceDesc(texture.handle); } @@ -781,24 +891,33 @@ public RenderTargetInfo GetRenderTargetInfo(TextureHandle texture) return info; } - /// /// Creates a new Renderer List Render Graph resource. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// Renderer List descriptor. /// A new RendererListHandle. public RendererListHandle CreateRendererList(in CoreRendererListDesc desc) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateRendererList(desc); } /// /// Creates a new Renderer List Render Graph resource. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// Renderer List descriptor. /// A new RendererListHandle. public RendererListHandle CreateRendererList(in RendererListParams desc) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateRendererList(desc); } @@ -815,70 +934,103 @@ public RendererListHandle CreateShadowRendererList(ref ShadowDrawingSettings sha /// /// Creates a new Gizmo Renderer List Render Graph resource. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// The camera that is used for rendering the Gizmo. /// GizmoSubset that specifies whether gizmos render before or after postprocessing for a camera render. /// A new RendererListHandle. public RendererListHandle CreateGizmoRendererList(in Camera camera, in GizmoSubset gizmoSubset) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateGizmoRendererList(m_RenderGraphContext.renderContext, camera, gizmoSubset); } /// /// Creates a new UIOverlay Renderer List Render Graph resource. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// The camera that is used for rendering the full UIOverlay. /// A new RendererListHandle. public RendererListHandle CreateUIOverlayRendererList(in Camera camera) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateUIOverlayRendererList(m_RenderGraphContext.renderContext, camera, UISubset.All); } /// /// Creates a new UIOverlay Renderer List Render Graph resource. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// The camera that is used for rendering some subset of the UIOverlay. /// Enum flag that specifies which subset to render. /// A new RendererListHandle. public RendererListHandle CreateUIOverlayRendererList(in Camera camera, in UISubset uiSubset) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateUIOverlayRendererList(m_RenderGraphContext.renderContext, camera, uiSubset); } /// /// Creates a new WireOverlay Renderer List Render Graph resource. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// The camera that is used for rendering the WireOverlay. /// A new RendererListHandle. public RendererListHandle CreateWireOverlayRendererList(in Camera camera) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateWireOverlayRendererList(m_RenderGraphContext.renderContext, camera); } /// /// Creates a new Skybox Renderer List Render Graph resource. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// The camera that is used for rendering the Skybox. /// A new RendererListHandle. public RendererListHandle CreateSkyboxRendererList(in Camera camera) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateSkyboxRendererList(m_RenderGraphContext.renderContext, camera); } /// /// Creates a new Skybox Renderer List Render Graph resource. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// The camera that is used for rendering the Skybox. /// The projection matrix used during XR rendering of the skybox. /// The view matrix used during XR rendering of the skybox. /// A new RendererListHandle. public RendererListHandle CreateSkyboxRendererList(in Camera camera, Matrix4x4 projectionMatrix, Matrix4x4 viewMatrix) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateSkyboxRendererList(m_RenderGraphContext.renderContext, camera, projectionMatrix, viewMatrix); } /// /// Creates a new Skybox Renderer List Render Graph resource. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// The camera that is used for rendering the Skybox. /// The left eye projection matrix used during Legacy single pass XR rendering of the skybox. /// The left eye view matrix used during Legacy single pass XR rendering of the skybox. @@ -887,6 +1039,8 @@ public RendererListHandle CreateSkyboxRendererList(in Camera camera, Matrix4x4 p /// A new RendererListHandle. public RendererListHandle CreateSkyboxRendererList(in Camera camera, Matrix4x4 projectionMatrixL, Matrix4x4 viewMatrixL, Matrix4x4 projectionMatrixR, Matrix4x4 viewMatrixR) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateSkyboxRendererList(m_RenderGraphContext.renderContext, camera, projectionMatrixL, viewMatrixL, projectionMatrixR, viewMatrixR); } @@ -894,31 +1048,46 @@ public RendererListHandle CreateSkyboxRendererList(in Camera camera, Matrix4x4 p /// Import an external Graphics Buffer to the Render Graph. /// Any pass writing to an imported graphics buffer will be considered having side effects and can't be automatically culled. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// External Graphics Buffer that needs to be imported. /// The imported graphics buffer will be released after usage. /// A new GraphicsBufferHandle. public BufferHandle ImportBuffer(GraphicsBuffer graphicsBuffer, bool forceRelease = false) { + CheckNotUsedWhenExecuting(); + return m_Resources.ImportBuffer(graphicsBuffer, forceRelease); } /// /// Create a new Render Graph Graphics Buffer resource. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// Graphics Buffer descriptor. /// A new GraphicsBufferHandle. public BufferHandle CreateBuffer(in BufferDesc desc) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateBuffer(desc); } /// /// Create a new Render Graph Graphics Buffer resource using the descriptor from another graphics buffer. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// Graphics Buffer from which the descriptor should be used. /// A new GraphicsBufferHandle. public BufferHandle CreateBuffer(in BufferHandle graphicsBuffer) { + CheckNotUsedWhenExecuting(); + return m_Resources.CreateBuffer(m_Resources.GetBufferResourceDesc(graphicsBuffer.handle)); } @@ -936,17 +1105,60 @@ public BufferDesc GetBufferDesc(in BufferHandle graphicsBuffer) /// Import an external RayTracingAccelerationStructure to the Render Graph. /// Any pass writing to (building) an imported RayTracingAccelerationStructure will be considered having side effects and can't be automatically culled. /// + /// + /// This API cannot be called during the Render Graph execution, please call it outside of SetRenderFunc(). + /// /// External RayTracingAccelerationStructure that needs to be imported. /// Optional name for identifying the RayTracingAccelerationStructure in the Render Graph. /// A new RayTracingAccelerationStructureHandle. public RayTracingAccelerationStructureHandle ImportRayTracingAccelerationStructure(in RayTracingAccelerationStructure accelStruct, string name = null) { + CheckNotUsedWhenExecuting(); + return m_Resources.ImportRayTracingAccelerationStructure(accelStruct, name); } + [Conditional("DEVELOPMENT_BUILD"), Conditional("UNITY_EDITOR")] + void CheckNotUsedWhenExecuting() + { + if (enableValidityChecks && m_RenderGraphState == RenderGraphState.Executing) + throw new InvalidOperationException(RenderGraphExceptionMessages.GetExceptionMessage(RenderGraphState.Executing)); + } + + [Conditional("DEVELOPMENT_BUILD"), Conditional("UNITY_EDITOR")] + void CheckNotUsedWhenRecordingGraph() + { + if (enableValidityChecks && m_RenderGraphState == RenderGraphState.RecordingGraph) + throw new InvalidOperationException(RenderGraphExceptionMessages.GetExceptionMessage(RenderGraphState.RecordingGraph)); + } + + [Conditional("DEVELOPMENT_BUILD"), Conditional("UNITY_EDITOR")] + void CheckNotUsedWhenRecordPassOrExecute() + { + if (enableValidityChecks && (m_RenderGraphState == RenderGraphState.RecordingPass || m_RenderGraphState == RenderGraphState.Executing)) + throw new InvalidOperationException(RenderGraphExceptionMessages.GetExceptionMessage(RenderGraphState.RecordingPass | RenderGraphState.Executing)); + } + + [Conditional("DEVELOPMENT_BUILD"), Conditional("UNITY_EDITOR")] + void CheckNotUsedWhenRecordingPass() + { + if (enableValidityChecks && m_RenderGraphState == RenderGraphState.RecordingPass) + throw new InvalidOperationException(RenderGraphExceptionMessages.GetExceptionMessage(RenderGraphState.RecordingPass)); + } + + [Conditional("DEVELOPMENT_BUILD"), Conditional("UNITY_EDITOR")] + void CheckNotUsedWhenActive() + { + if (enableValidityChecks && (m_RenderGraphState & RenderGraphState.Active) != RenderGraphState.Idle) + throw new InvalidOperationException(RenderGraphExceptionMessages.GetExceptionMessage(RenderGraphState.Active)); + } + /// /// Add a new Raster Render Pass to the Render Graph. Raster passes can execute rasterization workloads but cannot do other GPU work like copies or compute. /// + /// + /// This API cannot be called when Render Graph records a pass, please call it within SetRenderFunc() or outside of AddUnsafePass()/AddComputePass()/AddRasterRenderPass(). + /// /// Type of the class to use to provide data to the Render Pass. /// Name of the new Render Pass (this is also be used to generate a GPU profiling marker). /// Instance of PassData that is passed to the render function and you must fill. @@ -978,6 +1190,10 @@ public IRasterRenderGraphBuilder AddRasterRenderPass(string passName, [CallerLineNumber] int line = 0) where PassData : class, new() #endif { + CheckNotUsedWhenRecordingPass(); + + m_RenderGraphState = RenderGraphState.RecordingPass; + var renderPass = m_RenderGraphPool.Get>(); renderPass.Initialize(m_RenderPasses.Count, m_RenderGraphPool.Get(), passName, RenderGraphPassType.Raster, sampler); @@ -988,12 +1204,16 @@ public IRasterRenderGraphBuilder AddRasterRenderPass(string passName, m_RenderPasses.Add(renderPass); m_builderInstance.Setup(renderPass, m_Resources, this); + return m_builderInstance; } /// /// Add a new Compute Render Pass to the Render Graph. Raster passes can execute rasterization workloads but cannot do other GPU work like copies or compute. /// + /// + /// This API cannot be called when Render Graph records a pass, please call it within SetRenderFunc() or outside of AddUnsafePass()/AddComputePass()/AddRasterRenderPass(). + /// /// Type of the class to use to provide data to the Render Pass. /// Name of the new Render Pass (this is also be used to generate a GPU profiling marker). /// Instance of PassData that is passed to the render function and you must fill. @@ -1002,8 +1222,8 @@ public IRasterRenderGraphBuilder AddRasterRenderPass(string passName, /// A new instance of a IRasterRenderGraphBuilder used to setup the new Rasterization Render Pass. public IComputeRenderGraphBuilder AddComputePass(string passName, out PassData passData #if !CORE_PACKAGE_DOCTOOLS - , [CallerFilePath] string file = "", - [CallerLineNumber] int line = 0) where PassData : class, new() + , [CallerFilePath] string file = "", + [CallerLineNumber] int line = 0) where PassData : class, new() #endif { return AddComputePass(passName, out passData, GetDefaultProfilingSampler(passName), file, line); @@ -1025,6 +1245,10 @@ public IComputeRenderGraphBuilder AddComputePass(string passName, out [CallerLineNumber] int line = 0) where PassData : class, new() #endif { + CheckNotUsedWhenRecordingPass(); + + m_RenderGraphState = RenderGraphState.RecordingPass; + var renderPass = m_RenderGraphPool.Get>(); renderPass.Initialize(m_RenderPasses.Count, m_RenderGraphPool.Get(), passName, RenderGraphPassType.Compute, sampler); @@ -1035,6 +1259,7 @@ public IComputeRenderGraphBuilder AddComputePass(string passName, out m_RenderPasses.Add(renderPass); m_builderInstance.Setup(renderPass, m_Resources, this); + return m_builderInstance; } @@ -1048,6 +1273,9 @@ public IComputeRenderGraphBuilder AddComputePass(string passName, out /// When using a unsafe pass the graph will also not automatically set up graphics state like rendertargets. The pass should do this itself /// using cmd.SetRenderTarget and related commands. /// + /// + /// This API cannot be called when Render Graph records a pass, please call it within SetRenderFunc() or outside of AddUnsafePass()/AddComputePass()/AddRasterRenderPass(). + /// /// Type of the class to use to provide data to the Render Pass. /// Name of the new Render Pass (this is also be used to generate a GPU profiling marker). /// Instance of PassData that is passed to the render function and you must fill. @@ -1086,6 +1314,10 @@ public IUnsafeRenderGraphBuilder AddUnsafePass(string passName, out Pa [CallerLineNumber] int line = 0) where PassData : class, new() #endif { + CheckNotUsedWhenRecordingPass(); + + m_RenderGraphState = RenderGraphState.RecordingPass; + var renderPass = m_RenderGraphPool.Get>(); renderPass.Initialize(m_RenderPasses.Count, m_RenderGraphPool.Get(), passName, RenderGraphPassType.Unsafe, sampler); renderPass.AllowGlobalState(true); @@ -1097,6 +1329,7 @@ public IUnsafeRenderGraphBuilder AddUnsafePass(string passName, out Pa m_RenderPasses.Add(renderPass); m_builderInstance.Setup(renderPass, m_Resources, this); + return m_builderInstance; } @@ -1116,7 +1349,11 @@ public RenderGraphBuilder AddRenderPass(string passName, out PassData [CallerLineNumber] int line = 0) where PassData : class, new() #endif { - var renderPass = m_RenderGraphPool.Get>(); + CheckNotUsedWhenRecordingPass(); + + m_RenderGraphState = RenderGraphState.RecordingPass; + + var renderPass = m_RenderGraphPool.Get>(); renderPass.Initialize(m_RenderPasses.Count, m_RenderGraphPool.Get(), passName, RenderGraphPassType.Legacy, sampler); renderPass.AllowGlobalState(true);// Old pass types allow global state by default as HDRP relies on it @@ -1132,6 +1369,9 @@ public RenderGraphBuilder AddRenderPass(string passName, out PassData /// /// Add a new Render Pass to the Render Graph. /// + /// + /// This API should not be used with URP NRP Render Graph. In addition, it cannot be called when Render Graph records a pass, please call it within SetRenderFunc() or outside of AddUnsafePass()/AddComputePass()/AddRasterRenderPass(). + /// /// Type of the class to use to provide data to the Render Pass. /// Name of the new Render Pass (this is also be used to generate a GPU profiling marker). /// Instance of PassData that is passed to the render function and you must fill. @@ -1151,6 +1391,9 @@ public RenderGraphBuilder AddRenderPass(string passName, out PassData /// Starts the recording of the render graph. /// This must be called before adding any pass to the render graph. /// + /// + /// This API cannot be called when Render Graph is active, please call it outside of RecordRenderGraph(). + /// /// Parameters necessary for the render graph execution. /// /// Begin recording the Render Graph. @@ -1162,9 +1405,13 @@ public RenderGraphBuilder AddRenderPass(string passName, out PassData /// public void BeginRecording(in RenderGraphParameters parameters) { + CheckNotUsedWhenActive(); + + m_ExecutionExceptionWasRaised = false; + m_RenderGraphState = RenderGraphState.RecordingGraph; + m_CurrentFrameIndex = parameters.currentFrameIndex; m_CurrentExecutionName = parameters.executionName != null ? parameters.executionName : "RenderGraphExecution"; - m_HasRenderGraphBegun = true; // Cannot do renderer list culling with compilation caching because it happens after compilation is done so it can lead to discrepancies. m_RendererListCulling = parameters.rendererListCulling && !m_EnableCompilationCaching; @@ -1213,15 +1460,39 @@ public void BeginRecording(in RenderGraphParameters parameters) /// public void EndRecordingAndExecute() { + CheckNotUsedWhenRecordPassOrExecute(); + Execute(); } + /// + /// Catches and logs exceptions that could happen during the graph recording or execution. + /// + /// The exception thrown by the graph. + /// True if contexless testing is enabled, false otherwise. + public bool ResetGraphAndLogException(Exception e) + { + m_RenderGraphState = RenderGraphState.Idle; + + if (!m_RenderGraphContext.contextlessTesting) + { + // If we're not testing log the exception and swallow it. + // TODO: Do we really want to swallow exceptions here? Not a very c# thing to do. + Debug.LogError(RenderGraphExceptionMessages.k_RenderGraphExecutionError); + if (!m_ExecutionExceptionWasRaised) // Already logged. TODO: There is probably a better way in C# to handle that. + Debug.LogException(e); + m_ExecutionExceptionWasRaised = true; + } + return m_RenderGraphContext.contextlessTesting; + } + /// /// Execute the Render Graph in its current state. /// internal void Execute() { m_ExecutionExceptionWasRaised = false; + m_RenderGraphState = RenderGraphState.Executing; try { @@ -1248,7 +1519,6 @@ internal void Execute() // Feeding Render Graph Viewer before resource deallocation at pass execution GenerateDebugData(); #endif - if (nativeRenderPassesEnabled) ExecuteNativeRenderGraph(); else @@ -1260,20 +1530,8 @@ internal void Execute() } catch (Exception e) { - if (m_RenderGraphContext.contextlessTesting) - { - // Throw it for the tests to handle + if (ResetGraphAndLogException(e)) throw; - } - else - { - // If we're not testing log the exception and swallow it. - // TODO: Do we really want to swallow exceptions here? Not a very c# thing to do. - Debug.LogError("Render Graph Execution error"); - if (!m_ExecutionExceptionWasRaised) // Already logged. TODO: There is probably a better way in C# to handle that. - Debug.LogException(e); - m_ExecutionExceptionWasRaised = true; - } } finally { @@ -1286,7 +1544,7 @@ internal void Execute() InvalidateContext(); - m_HasRenderGraphBegun = false; + m_RenderGraphState = RenderGraphState.Idle; } } @@ -2561,7 +2819,7 @@ void GenerateCompilerDebugData(ref DebugData debugData) newPass.syncFromPassIndex = passInfo.syncFromPassIndex; newPass.syncToPassIndex = passInfo.syncToPassIndex; - DebugData.s_PassScriptMetadata.TryGetValue(pass.name, out newPass.scriptInfo); + DebugData.s_PassScriptMetadata.TryGetValue(pass, out newPass.scriptInfo); for (int type = 0; type < (int)RenderGraphResourceType.Count; ++type) { diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilder.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilder.cs index 039af44bb7b..68106a2bab0 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilder.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilder.cs @@ -315,6 +315,7 @@ void Dispose(bool disposing) if (m_Disposed) return; + m_RenderGraph.RenderGraphState = RenderGraphState.RecordingGraph; m_RenderGraph.OnPassAdded(m_RenderPass); m_Disposed = true; } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilders.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilders.cs index 59eff1d522d..e67c40cd179 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilders.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphBuilders.cs @@ -119,9 +119,10 @@ protected virtual void Dispose(bool disposing) try { - if (disposing) { + m_RenderGraph.RenderGraphState = RenderGraphState.RecordingGraph; + // Use all globals simply means this... we do a UseTexture on all globals so the pass has the correct dependencies. // This of course goes to show how bad an idea shader-system wide globals really are dependency/lifetime tracking wise :-) if (m_RenderPass.useAllGlobalTextures) @@ -510,7 +511,7 @@ void CheckResource(in ResourceHandle res, bool checkTransientReadWrite = false) } else { - throw new ArgumentException($"Trying to use an invalid resource (pass {m_RenderPass.name})."); + throw new Exception($"Trying to use an invalid resource (pass {m_RenderPass.name})."); } } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphPass.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphPass.cs index 33736468871..bb9205455fe 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphPass.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphPass.cs @@ -255,7 +255,7 @@ public void SetColorBuffer(in TextureHandle resource, int index) { Debug.Assert(index < RenderGraph.kMaxMRTCount && index >= 0); colorBufferMaxIndex = Math.Max(colorBufferMaxIndex, index); - colorBufferAccess[index].textureHandle = resource; + colorBufferAccess[index] = new TextureAccess(colorBufferAccess[index], resource); AddResourceWrite(resource.handle); } @@ -267,10 +267,7 @@ public void SetColorBufferRaw(in TextureHandle resource, int index, AccessFlags if (colorBufferAccess[index].textureHandle.handle.Equals(resource.handle) || !colorBufferAccess[index].textureHandle.IsValid()) { colorBufferMaxIndex = Math.Max(colorBufferMaxIndex, index); - colorBufferAccess[index].textureHandle = resource; - colorBufferAccess[index].flags = accessFlags; - colorBufferAccess[index].mipLevel = mipLevel; - colorBufferAccess[index].depthSlice = depthSlice; + colorBufferAccess[index] = new TextureAccess(resource, accessFlags, mipLevel, depthSlice); } else { @@ -289,10 +286,7 @@ public void SetFragmentInputRaw(in TextureHandle resource, int index, AccessFlag if (fragmentInputAccess[index].textureHandle.handle.Equals(resource.handle) || !fragmentInputAccess[index].textureHandle.IsValid()) { fragmentInputMaxIndex = Math.Max(fragmentInputMaxIndex, index); - fragmentInputAccess[index].textureHandle = resource; - fragmentInputAccess[index].flags = accessFlags; - fragmentInputAccess[index].mipLevel = mipLevel; - fragmentInputAccess[index].depthSlice = depthSlice; + fragmentInputAccess[index] = new TextureAccess(resource, accessFlags, mipLevel, depthSlice); } else { diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceRegistry.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceRegistry.cs index d34c6212f04..e485bd5dd7b 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceRegistry.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceRegistry.cs @@ -760,7 +760,6 @@ internal void GetRenderTargetInfo(in ResourceHandle res, out RenderTargetInfo ou // screen resolution,.... we can't even hope to know or replicate the size calculation here // so we just say we don't know what this rt is and rely on the user passing in the info to us. var desc = GetTextureResourceDesc(res, true); - outInfo = new RenderTargetInfo(); #if DEVELOPMENT_BUILD || UNITY_EDITOR if (desc.width == 0 || desc.height == 0 || desc.slices == 0 || desc.msaaSamples == 0 || desc.format == GraphicsFormat.None) { diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceTexture.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceTexture.cs index f92ae931493..12f42771a53 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceTexture.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphResourceTexture.cs @@ -7,12 +7,12 @@ namespace UnityEngine.Rendering.RenderGraphModule { - internal struct TextureAccess + internal readonly struct TextureAccess { - public TextureHandle textureHandle; - public int mipLevel; - public int depthSlice; - public AccessFlags flags; + public readonly TextureHandle textureHandle; + public readonly int mipLevel; + public readonly int depthSlice; + public readonly AccessFlags flags; public TextureAccess(TextureHandle handle, AccessFlags flags, int mipLevel, int depthSlice) { @@ -21,6 +21,14 @@ public TextureAccess(TextureHandle handle, AccessFlags flags, int mipLevel, int this.mipLevel = mipLevel; this.depthSlice = depthSlice; } + + public TextureAccess(TextureAccess access, TextureHandle handle) + { + this.textureHandle = handle; + this.flags = access.flags; + this.mipLevel = access.mipLevel; + this.depthSlice = access.depthSlice; + } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphUtilsBlit.cs b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphUtilsBlit.cs index a0600bd5d27..922466b7b00 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphUtilsBlit.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphUtilsBlit.cs @@ -20,6 +20,16 @@ public static bool CanAddCopyPassMSAA() return Blitter.CanCopyMSAA(); } + /// + /// Checks if the shader features required by the MSAA version of the copy pass is supported on current platform. + /// + /// The texture description of the that will be copied from. + /// Returns true if the shader features required by the copy pass is supported for MSAA, otherwise will it return false. + public static bool CanAddCopyPassMSAA(in TextureDesc sourceDesc) + { + return Blitter.CanCopyMSAA(sourceDesc); + } + class CopyPassData { public bool isMSAA; @@ -80,7 +90,7 @@ public static void AddCopyPass( // It would have 1 if the MSAA pass is not able to be used for target and 2 otherwise. // https://docs.unity3d.com/2017.4/Documentation/Manual/SL-ShaderCompileTargets.html // https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-to-get-sample-position - if (isMSAA && !Blitter.CanCopyMSAA()) + if (isMSAA && !Blitter.CanCopyMSAA(sourceDesc)) throw new ArgumentException("Target does not support MSAA for AddCopyPass. Please use the blit alternative or use non MSAA textures."); using (var builder = graph.AddRasterRenderPass(passName, out var passData, file, line)) diff --git a/Packages/com.unity.render-pipelines.core/Runtime/RenderPipeline/.buginfo b/Packages/com.unity.render-pipelines.core/Runtime/RenderPipeline/.buginfo index ec25d9a0379..398898337ca 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/RenderPipeline/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Runtime/RenderPipeline/.buginfo @@ -1,5 +1,5 @@ rule1: - area: SRP Workflow + area: SRP Settings rule2: when: diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Settings/.buginfo b/Packages/com.unity.render-pipelines.core/Runtime/Settings/.buginfo index 7620de26b8b..355a2048610 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Settings/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Runtime/Settings/.buginfo @@ -1,8 +1,8 @@ rule1: - area: SRP Workflow + area: SRP Settings rule2: when: path: - ^.*ShaderStrippingSetting.*$ - area: SRP Architecture & API \ No newline at end of file + area: Graphics Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Stripping/.buginfo b/Packages/com.unity.render-pipelines.core/Runtime/Stripping/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Stripping/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Runtime/Stripping/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Utilities/.buginfo b/Packages/com.unity.render-pipelines.core/Runtime/Utilities/.buginfo index 88777a4d387..0f536f6e290 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Utilities/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Runtime/Utilities/.buginfo @@ -1,18 +1,15 @@ default: - area: SRP Architecture & API + area: SRP Foundation -Workflow: +settings: when: path: - - ^.*CameraCaptureBridge?.*$ - ^.*CoreRenderPipelinePreferences?.*$ - ^.*CoreUtils?.*$ - - ^.*DelegateUtility?.*$ - - ^.*MeshGizmo?.*$ - ^.*ResourceReloader?.*$ - ^.*SceneRenderPipeline?.*$ - ^.*TextureCurve?.*$ - area: SRP Workflow + area: SRP Settings xr: when: @@ -20,8 +17,14 @@ xr: - ^.*XRUtils?.*$ area: SRP XR -workflow: +camera: when: path: - - ^.*TextureCurve?.*$ - area: SRP Workflow \ No newline at end of file + - ^.*Camera?.*$ + area: Camera + +tools: + when: + path: + - ^.*MeshGizmo?.*$ + area: Graphics Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs b/Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs index dfd48165890..70d72e3b449 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blitter.cs @@ -5,6 +5,7 @@ using System.Text.RegularExpressions; using UnityEngine.Rendering.RenderGraphModule.Util; using UnityEngine.Rendering.RenderGraphModule; + #if UNITY_EDITOR using UnityEditor; #endif @@ -341,10 +342,9 @@ static internal void DrawQuad(CommandBuffer cmd, Material material, int shaderPa internal static bool CanCopyMSAA() { - //Temporary disable most msaa copies as we fix UUM-67324 which is a bit more involved due to the internal work required - GraphicsDeviceType deviceType = SystemInfo.graphicsDeviceType; - if (deviceType != GraphicsDeviceType.Metal || deviceType != GraphicsDeviceType.Vulkan) + if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.PlayStation4) { + // Will be done later, see: UUM-97281 return false; } @@ -354,10 +354,34 @@ internal static bool CanCopyMSAA() return s_Copy.passCount == 2; } + internal static bool CanCopyMSAA(in TextureDesc sourceDesc) + { + + // Real native renderpass platforms + // TODO: Expose this through systeminfo + bool hasRenderPass = + SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal + || SystemInfo.graphicsDeviceType == GraphicsDeviceType.Vulkan + || SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D12; + + if (SystemInfo.supportsMultisampleAutoResolve && + !hasRenderPass && sourceDesc.bindTextureMS == false) + { + // If we have autoresolve it means msaa rendertextures render as MSAA but magically resolve in the driver when accessed as a texture, the MSAA surface is fully hidden inside the GFX device + // this is contrary to most platforms where the resolve magic on reading happens in the engine layer (and thus allocates proper multi sampled and resolve surfaces the engine can access) + // So in the cases of auto resolving, and a renderpass framebuffer fetch emulation layer we can't correctly access the individual unresolved msaa samples and thus don't allow this case here + // Note: In practice the above check mostly triggers on GLES. + return false; + } + + return CanCopyMSAA(); + } + /// /// Copies a texture to another texture using framebuffer fetch. /// /// Command Buffer used for rendering. + /// Use the MSAA variant of the copy shader (otherwise single sample is used). /// Disable the special handling when XR is active where the source and destination are considered array /// textures with a slice for each eye. Setting this to true will consider source and destination as regular 2D textures. When XR is /// disabled, textures are always 2D so forcing them to 2D has no impact. @@ -688,6 +712,42 @@ public static void BlitTexture(RasterCommandBuffer cmd, RTHandle source, Vector4 BlitTexture(cmd.m_WrappedCommandBuffer, source, scaleBias, material, pass); } + /// + /// Adds in a a command to copy a texture identified by its into + /// the currently bound render target's color buffer, using a user material and specific shader pass. + /// + /// + /// The source texture will be bound to the "_BlitTexture" shader property. + /// The scaleBias parameter controls the rectangle of pixels in the source texture to copy by manipulating + /// the source texture coordinates. The X and Y coordinates store the scaling factor to apply to these texture + /// coordinates, while the Z and W coordinates store the texture coordinate offsets. The operation will always + /// write to the full destination render target rectangle. + /// + /// Command Buffer used for recording the action. + /// RTHandle of the source texture to copy from. + /// Scale and bias for sampling the source texture. + /// The material to use for writing to the destination target. + /// The index of the pass to use in the material's shader. + /// + /// + /// + public static void BlitTexture(UnsafeCommandBuffer cmd, RTHandle source, Vector4 scaleBias, Material material, int pass) + { + BlitTexture(cmd.m_WrappedCommandBuffer, source, scaleBias, material, pass); + } + /// /// Adds in a a command to copy a texture identified by its into /// the currently bound render target's color buffer, using a user material and specific shader pass. diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Utilities/CoreUtils.cs b/Packages/com.unity.render-pipelines.core/Runtime/Utilities/CoreUtils.cs index 0255b52e0be..c7b03896e0c 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Utilities/CoreUtils.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Utilities/CoreUtils.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.IO; using System.Linq; using System.Collections.Generic; @@ -14,6 +15,25 @@ namespace UnityEngine.Rendering /// public static class CoreUtils { +#if UNITY_EDITOR + static CoreUtils() + { + void OnBeforeAssemblyReload() + { + UnityObject.DestroyImmediate(m_BlackCubeTexture); + UnityObject.DestroyImmediate(m_BlackVolumeTexture); + UnityObject.DestroyImmediate(m_WhiteCubeTexture); + UnityObject.DestroyImmediate(m_WhiteVolumeTexture); + UnityObject.DestroyImmediate(m_MagentaCubeTexture); + UnityObject.DestroyImmediate(m_MagentaCubeTextureArray); + UnityObject.DestroyImmediate(m_EmptyUAV); + m_EmptyBuffer?.Release(); + UnityEditor.AssemblyReloadEvents.beforeAssemblyReload -= OnBeforeAssemblyReload; + } + UnityEditor.AssemblyReloadEvents.beforeAssemblyReload += OnBeforeAssemblyReload; + } +#endif + /// /// List of look at matrices for cubemap faces. /// Ref: https://msdn.microsoft.com/en-us/library/windows/desktop/bb204881(v=vs.85).aspx @@ -79,7 +99,9 @@ public static class Priorities /// Game Object Menu priority public const int gameObjectMenuPriority = 10; /// Lens Flare Priority - public const int srpLensFlareMenuPriority = 303; + public const int srpLensFlareMenuPriority = 9; + /// Scripting Priority + public const int scriptingPriority = 40; } const string obsoletePriorityMessage = "Use CoreUtils.Priorities instead"; @@ -973,7 +995,7 @@ static string GetTextureAutoName(int width, int height, string format, TextureDi temp = string.Format("{0}x{1}{2}_{3}", width, height, mips ? "_Mips" : "", format); else temp = string.Format("{0}x{1}x{2}{3}_{4}", width, height, depth, mips ? "_Mips" : "", format); - temp = String.Format("{0}_{1}_{2}", name == "" ? "Texture" : name, (dim == TextureDimension.None) ? "" : dim.ToString(), temp); + temp = String.Format("{0}_{1}_{2}", name?.Length == 0 ? "Texture" : name, (dim == TextureDimension.None) ? "" : dim.ToString(), temp); return temp; } @@ -1857,5 +1879,87 @@ public static DepthBits GetDefaultDepthBufferBits() return DepthBits.Depth32; #endif } + +#if UNITY_EDITOR + /// + /// Populates null fields or collection elements in a target object from a source object of the same type. + /// + /// + /// The type of the objects. This must be a reference type (`class`). + /// + /// + /// The source object from which to copy field values or collection elements. This cannot be null. + /// + /// + /// The target object to populate with values from the source object. This cannot be null. + /// + /// + /// This method copies non-null field values or collection elements from the source object to the target object. + /// Both objects must be of the same type, and derived or base types are not allowed. Fields are updated only if they + /// are null in the target. If a field is a collection implementing `IList`, the method attempts to copy elements that + /// are null in the target collection. + /// + /// **Type restrictions**: + /// - `T` must be a reference type. + /// - `source` and `target` must be of the exact same type, not derived or base types. + /// - Collections must implement `IList` and have the same length in both source and target for element-by-element copying. + /// + public static void PopulateNullFieldsFrom(T source, T target) + where T : class + { + if (source == null) + throw new ArgumentNullException(nameof(source)); + + if (target == null) + throw new ArgumentNullException(nameof(target)); + + if (source.GetType() != typeof(T) || target.GetType() != typeof(T)) + { + throw new ArgumentException("Source and target must be of the exact same type. Derived or base types are not allowed."); + } + + var type = typeof(T); + var fields = type.GetFields(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); + foreach (System.Reflection.FieldInfo field in fields) + { + var sourceValue = field.GetValue(source); + var targetValue = field.GetValue(target); + + // Check if the field is a collection (implements ICollection) + if (typeof(IList).IsAssignableFrom(field.FieldType)) + { + // Handle collection population + PopulateIListFields( ref sourceValue, ref targetValue); + field.SetValue(target, targetValue); + } + else + { + // Handle individual field population + if (targetValue == null) + field.SetValue(target, sourceValue); // Copy if target is null + } + } + // Generic method to populate arrays + static void PopulateIListFields(ref object source, ref object target) + { + if (source is not IList sourceCollection) + return; + + if (target is not IList targetCollection) + { + target = sourceCollection; + return; + } + + if (sourceCollection.Count != targetCollection.Count) + return; + + for (int i = 0; i < targetCollection.Count; i++) + { + sourceCollection[i] ??= targetCollection[i]; + } + } + } +#endif } } diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Volume/.buginfo b/Packages/com.unity.render-pipelines.core/Runtime/Volume/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Volume/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Runtime/Volume/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeManager.cs b/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeManager.cs index 421eadd82a3..fddf07fdaa7 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeManager.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/Volume/VolumeManager.cs @@ -552,9 +552,17 @@ internal void UpdateVolumeLayer(Volume volume, int prevLayer, int newLayer) m_VolumeCollection.ChangeLayer(volume, prevLayer, newLayer); } +#if UNITY_EDITOR || DEVELOPMENT_BUILD + internal bool renderingDebuggerAttached { get; set; } + internal event Action beginVolumeStackUpdate; + internal event Action endVolumeStackUpdate; + internal event Action overrideVolumeStackData; +#endif + // Go through all listed components and lerp overridden values in the global state - void OverrideData(VolumeStack stack, List components, float interpFactor) + void OverrideData(VolumeStack stack, Volume volume, float interpFactor) { + var components = volume.profileRef.components; var numComponents = components.Count; for (int i = 0; i < numComponents; i++) { @@ -568,6 +576,12 @@ void OverrideData(VolumeStack stack, List components, float int component.Override(state, interpFactor); } } + +#if UNITY_EDITOR || DEVELOPMENT_BUILD + if (renderingDebuggerAttached) + overrideVolumeStackData?.Invoke(stack, volume, interpFactor); +#endif + } // Faster version of OverrideData to force replace values in the global state. @@ -704,6 +718,11 @@ public void Update(VolumeStack stack, Transform trigger, LayerMask layerMask) if (!onlyGlobal) trigger.TryGetComponent(out camera); +#if UNITY_EDITOR || DEVELOPMENT_BUILD + if (renderingDebuggerAttached) + beginVolumeStackUpdate?.Invoke(stack, camera); +#endif + // Traverse all volumes int numVolumes = volumes.Count; for (int i = 0; i < numVolumes; i++) @@ -725,7 +744,7 @@ public void Update(VolumeStack stack, Transform trigger, LayerMask layerMask) // Global volumes always have influence if (volume.isGlobal) { - OverrideData(stack, volume.profileRef.components, Mathf.Clamp01(volume.weight)); + OverrideData(stack, volume, Mathf.Clamp01(volume.weight)); continue; } @@ -772,8 +791,13 @@ public void Update(VolumeStack stack, Transform trigger, LayerMask layerMask) interpFactor = 1f - (closestDistanceSqr / blendDistSqr); // No need to clamp01 the interpolation factor as it'll always be in [0;1[ range - OverrideData(stack, volume.profileRef.components, interpFactor * Mathf.Clamp01(volume.weight)); + OverrideData(stack, volume, interpFactor * Mathf.Clamp01(volume.weight)); } + +#if UNITY_EDITOR || DEVELOPMENT_BUILD + if (renderingDebuggerAttached) + endVolumeStackUpdate?.Invoke(stack, camera); +#endif } /// diff --git a/Packages/com.unity.render-pipelines.core/Runtime/XR/XRGraphicsAutomatedTests.cs b/Packages/com.unity.render-pipelines.core/Runtime/XR/XRGraphicsAutomatedTests.cs index 9cbb50ad6e3..b1c64f65bad 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/XR/XRGraphicsAutomatedTests.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/XR/XRGraphicsAutomatedTests.cs @@ -24,7 +24,7 @@ static bool activatedFromCommandLine /// /// Used by render pipelines to initialize XR tests. /// - public static bool enabled { get; } = activatedFromCommandLine; + public static bool enabled { get; set; } = activatedFromCommandLine; /// /// Set by automated test framework and read by render pipelines. diff --git a/Packages/com.unity.render-pipelines.core/Runtime/XR/XRSystem.cs b/Packages/com.unity.render-pipelines.core/Runtime/XR/XRSystem.cs index 007c9252efb..aa80bd23d70 100644 --- a/Packages/com.unity.render-pipelines.core/Runtime/XR/XRSystem.cs +++ b/Packages/com.unity.render-pipelines.core/Runtime/XR/XRSystem.cs @@ -507,6 +507,7 @@ private static RenderTextureDescriptor XrRenderTextureDescToUnityRenderTextureDe // XRTODO : fix root problem RenderTextureDescriptor rtDesc = new RenderTextureDescriptor(xrDesc.width, xrDesc.height, xrDesc.graphicsFormat, xrDesc.depthStencilFormat, xrDesc.mipCount); rtDesc.dimension = xrDesc.dimension; + rtDesc.msaaSamples = xrDesc.msaaSamples; rtDesc.volumeDepth = xrDesc.volumeDepth; rtDesc.vrUsage = xrDesc.vrUsage; rtDesc.sRGB = xrDesc.sRGB; diff --git a/Packages/com.unity.render-pipelines.core/Samples~/Common/Scripts/Editor/SamplesShowcaseEditor.cs b/Packages/com.unity.render-pipelines.core/Samples~/Common/Scripts/Editor/SamplesShowcaseEditor.cs index 316db40442b..ffa6a21b6e4 100644 --- a/Packages/com.unity.render-pipelines.core/Samples~/Common/Scripts/Editor/SamplesShowcaseEditor.cs +++ b/Packages/com.unity.render-pipelines.core/Samples~/Common/Scripts/Editor/SamplesShowcaseEditor.cs @@ -17,7 +17,7 @@ public class SamplesShowcaseEditor : Editor { private static readonly string UXMLPath = "SamplesSelectionUXML"; - public static readonly string[] supportedExtensions = {".shadergraph", ".vfx", ".cs", ".hlsl", ".shader", ".asset",".mat",".fbx",".prefab", ".png"}; + public static readonly string[] supportedExtensions = {".shadergraph", ".vfx", ".cs", ".hlsl", ".shader", ".asset",".mat",".fbx",".prefab", ".png", ".compute"}; SerializedProperty currentIndex; Color headlineColor; diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/.buginfo b/Packages/com.unity.render-pipelines.core/Tests/Editor/.buginfo index c923130ebb4..6d440cb259e 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Editor/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/.buginfo @@ -1 +1 @@ -area: SRP Architecture & API \ No newline at end of file +area: SRP Foundation \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/Debugging/.buginfo b/Packages/com.unity.render-pipelines.core/Tests/Editor/Debugging/.buginfo index a8e3ae67ae4..272688b1879 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Editor/Debugging/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/Debugging/.buginfo @@ -1 +1 @@ -area: Graphics Tools \ No newline at end of file +area: Graphics Debugging Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/Debugging/VolumePanelTests.cs b/Packages/com.unity.render-pipelines.core/Tests/Editor/Debugging/VolumePanelTests.cs new file mode 100644 index 00000000000..090899246dc --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/Debugging/VolumePanelTests.cs @@ -0,0 +1,51 @@ +using NUnit.Framework; +using UnityEngine; +using UnityEngine.Rendering; + +namespace UnityEditor.Rendering.Tests +{ + partial class RenderingDebuggerTests + { + class Volumes + { + static TestCaseData[] s_TestCaseDatasVolumeParameters = + { + new TestCaseData(null).Returns("N/A"), new TestCaseData(new FloatParameter(101.01f)).Returns("101.01"), + new TestCaseData(new BoolParameter(true)).Returns("True"), + new TestCaseData(new BoolParameter(false)).Returns("False"), + new TestCaseData(new IntParameter(1000)).Returns("1000"), + new TestCaseData(new ColorParameter(Color.red)).Returns("RGBA(1.000, 0.000, 0.000, 1.000)"), + new TestCaseData(new IntParameter(1000, overrideState: false)).Returns("1000"), // Extract value should give the proper value + }; + + [Test, TestCaseSource(nameof(s_TestCaseDatasVolumeParameters))] + public string ExtractResult(VolumeParameter parameter) + { + return DebugDisplaySettingsVolume.ExtractResult(parameter); + } + + static TestCaseData[] s_TestCaseDatasCreateParameterWidget = + { + new TestCaseData(null).Returns("N/A"), + new TestCaseData(new FloatParameter(101.01f, overrideState: true)).Returns("101.01"), + new TestCaseData(new BoolParameter(true, overrideState: true)).Returns("True"), + new TestCaseData(new BoolParameter(false, overrideState: true)).Returns("False"), + new TestCaseData(new IntParameter(1000, overrideState: true)).Returns("1000"), + new TestCaseData(new ColorParameter(Color.red, overrideState: true)).Returns("RGBA(1.000, 0.000, 0.000, 1.000)"), + new TestCaseData(new IntParameter(1000, overrideState: false)).Returns("1000"), + }; + + [Test, TestCaseSource(nameof(s_TestCaseDatasCreateParameterWidget))] + public string CreateParameterWidget(VolumeParameter parameter) + { + var widget = DebugDisplaySettingsVolume.WidgetFactory.CreateVolumeParameterWidget(string.Empty, false, parameter); + if (widget is DebugUI.Value value) + return value.getter() as string; + if (widget is DebugUI.ColorField colorField) + return colorField.getter().ToString(); + + return "Not Implemented"; + } + } + } +} diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/Debugging/VolumePanelTests.cs.meta b/Packages/com.unity.render-pipelines.core/Tests/Editor/Debugging/VolumePanelTests.cs.meta new file mode 100644 index 00000000000..205def6960e --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/Debugging/VolumePanelTests.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 27ad958e620b5d34bb958b66d9f58046 \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/GPUDriven/GPUDrivenRenderingTests.cs b/Packages/com.unity.render-pipelines.core/Tests/Editor/GPUDriven/GPUDrivenRenderingTests.cs index 15002f73570..a95651daf01 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Editor/GPUDriven/GPUDrivenRenderingTests.cs +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/GPUDriven/GPUDrivenRenderingTests.cs @@ -38,6 +38,7 @@ class GPUDrivenRenderingTests private RenderPipelineAsset m_OldPipelineAsset; private GPUResidentDrawerResources m_Resources; private RenderPassGlobalSettings m_GlobalSettings; + private bool m_oldEnableLodCrossFade; class BoxedCounter { @@ -85,6 +86,8 @@ public void OnSetup() m_OldPipelineAsset = GraphicsSettings.defaultRenderPipeline; GraphicsSettings.defaultRenderPipeline = m_RenderPipe; m_Resources = GraphicsSettings.GetRenderPipelineSettings(); + m_oldEnableLodCrossFade = QualitySettings.enableLODCrossFade; + QualitySettings.enableLODCrossFade = true; } [TearDown] @@ -93,6 +96,7 @@ public void OnTearDown() m_RenderPipe = null; m_MeshTestData.Dispose(); GraphicsSettings.defaultRenderPipeline = m_OldPipelineAsset; + QualitySettings.enableLODCrossFade = m_oldEnableLodCrossFade; } [Test, ConditionalIgnore("IgnoreGfxAPI", "Graphics API Not Supported.")] @@ -626,7 +630,7 @@ public void TestCPULODCrossfade() { BatchDrawCommand cmd = drawCommands.drawCommands[range.drawCommandsBegin + i]; Assert.AreEqual(expectedMeshIDs[i], cmd.meshID.value, "Incorrect mesh rendered"); - Assert.AreEqual(cmd.flags & BatchDrawCommandFlags.LODCrossFade, expectedFlags[i], "Incorrect flag for the current draw command"); + Assert.AreEqual(expectedFlags[i], cmd.flags & BatchDrawCommandFlags.LODCrossFade, "Incorrect flag for the current draw command"); } } }; @@ -734,6 +738,9 @@ public void TestGpuDrivenSmallMeshCulling() rbcDesc.supportDitheringCrossFade = true; rbcDesc.smallMeshScreenPercentage = 10.0f; + var lastLodBias = QualitySettings.lodBias; + QualitySettings.lodBias = 1.0f; + var gpuDrivenProcessor = new GPUDrivenProcessor(); using (var brgContext = new RenderersBatchersContext(rbcDesc, gpuDrivenProcessor, m_Resources)) @@ -759,7 +766,7 @@ public void TestGpuDrivenSmallMeshCulling() { BatchDrawCommand cmd = drawCommands.drawCommands[range.drawCommandsBegin + i]; Assert.AreEqual(expectedMeshIDs[i], cmd.meshID.value, "Incorrect mesh rendered"); - Assert.AreEqual(cmd.flags & BatchDrawCommandFlags.LODCrossFade, expectedFlags[i], "Incorrect flag for the current draw command"); + Assert.AreEqual(expectedFlags[i], cmd.flags & BatchDrawCommandFlags.LODCrossFade, "Incorrect flag for the current draw command"); } } }; @@ -788,7 +795,7 @@ public void TestGpuDrivenSmallMeshCulling() expectedFlags.Clear(); expectedFlags.Add(BatchDrawCommandFlags.LODCrossFadeValuePacked); expectedFlags.Add(BatchDrawCommandFlags.LODCrossFade); - expectedDrawCommandCount = 1; + expectedDrawCommandCount = 2; cameraObject.transform.position = new Vector3(0.0f, 0.0f, -8.5f); SubmitCameraRenderRequest(mainCamera); @@ -809,6 +816,8 @@ public void TestGpuDrivenSmallMeshCulling() } } + QualitySettings.lodBias = lastLodBias; + gpuDrivenProcessor.Dispose(); objIDs.Dispose(); diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/RemoveRange.Extensions.Tests.cs b/Packages/com.unity.render-pipelines.core/Tests/Editor/RemoveRange.Extensions.Tests.cs index f82c8803eb2..824763fa6e6 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Editor/RemoveRange.Extensions.Tests.cs +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/RemoveRange.Extensions.Tests.cs @@ -23,9 +23,8 @@ bool ItemInRangeAreRemovedAfterRemoveRange(TList list, int startIndex, in where TList : IList { using (ListPool.Get(out var copy)) - { - foreach (int integer in list) - copy.Add(integer); + { + copy.AddRange(list); if (list.TryRemoveElementsInRange(startIndex, count, out var exception)) { diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderGraphTests.cs b/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderGraphTests.cs index 12dda5d96b6..3f5c384c0ff 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderGraphTests.cs +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderGraphTests.cs @@ -5,6 +5,7 @@ using UnityEngine.Rendering.RenderGraphModule; using UnityEngine.TestTools; using Unity.Collections; +using UnityEngine.Rendering.RendererUtils; #if UNITY_EDITOR using UnityEditor; @@ -31,6 +32,8 @@ static RenderGraphTestsOnLoad() partial class RenderGraphTests { + const string k_InvalidOperationMessage = "InvalidOperationException: "; + // For RG Record/Hash/Compile testing, use m_RenderGraph RenderGraph m_RenderGraph; @@ -41,6 +44,8 @@ partial class RenderGraphTests RenderGraphTestPipelineAsset m_RenderGraphTestPipeline; RenderGraphTestGlobalSettings m_RenderGraphTestGlobalSettings; + Dictionary> m_GraphStateActions = new Dictionary>(); + // We need a camera to execute the render graph and a game object to attach a camera GameObject m_GameObject; Camera m_Camera; @@ -83,7 +88,7 @@ protected override void Render(ScriptableRenderContext renderContext, List { - using (var builder = m_RenderGraph.AddRenderPass("TestPassWithNoRenderFunc", out var passData)) + using (var builder = m_RenderGraph.AddRasterRenderPass("TestPassWithNoRenderFunc", out var passData)) { builder.AllowPassCulling(false); @@ -1234,6 +1259,200 @@ public void GetTempMaterialPropertyBlockAreReleasedAfterRenderGraphNodeExecution }); } }; + } + + [Test] + public void RenderGraphThrowsException_ErrorsWhenRecordingPass() + { + PopulateRecordingPassAPIActions(); + + ExecuteRenderGraphAPIActions(RenderGraphState.RecordingPass); + } + + [Test] + public void RenderGraphThrowsException_ErrorsWhenRecordingGraph() + { + PopulateRecordingGraphAPIActions(); + + ExecuteRenderGraphAPIActions(RenderGraphState.RecordingGraph); + } + + [Test] + public void RenderGraphThrowsException_ErrorsWhenExecutingGraph() + { + PopulateExecutingAPIActions(); + + ExecuteRenderGraphAPIActions(RenderGraphState.Executing); + } + + [Test] + public void RenderGraphThrowsException_ErrorsWhenRecordingPassAndExecutingGraph() + { + PopulateRecordingPassAndExecutingGraphAPIActions(); + + ExecuteRenderGraphAPIActions(RenderGraphState.RecordingPass | RenderGraphState.Executing); + } + + [Test] + public void RenderGraphThrowsException_ErrorsWhenRecordingPassAndGraphAndExecutingGraph() + { + PopulateActiveGraphAPIActions(); + + ExecuteRenderGraphAPIActions(RenderGraphState.Active); + } + + // It's forbidden to use these APIs in RecordingPass mode. + void PopulateRecordingPassAPIActions() + { + var errorAPIPassName = "TestPassMustThrowException"; + var recordingPassActions = new List + { + () => m_RenderGraph.AddRasterRenderPass(errorAPIPassName, out var passData2), + () => m_RenderGraph.AddUnsafePass(errorAPIPassName, out var passData2), + () => m_RenderGraph.AddComputePass(errorAPIPassName, out var passData2), + () => m_RenderGraph.AddRenderPass(errorAPIPassName, out var passData2) + }; + + m_GraphStateActions.Add(RenderGraphState.RecordingPass, recordingPassActions); + } + + // It's forbidden to use these APIs in RecordingGraph mode. + void PopulateRecordingGraphAPIActions() + { + var recordingGraphActions = new List(); + + // Empty for the moment + + m_GraphStateActions.Add(RenderGraphState.RecordingGraph, recordingGraphActions); + } + + // It's forbidden to use these APIs in Executing mode. + void PopulateExecutingAPIActions() + { + var textureHandle = new TextureHandle(); + var flagActions = RenderGraphState.Executing; + var executingActions = new List + { + // Texture APIs + () => m_RenderGraph.CreateTexture(textureHandle), + () => m_RenderGraph.CreateTextureIfInvalid(new TextureDesc(), ref textureHandle), + () => m_RenderGraph.CreateTexture(new TextureDesc()), + () => m_RenderGraph.ImportTexture(null), + () => m_RenderGraph.ImportTexture(null, new ImportResourceParams()), + () => m_RenderGraph.ImportTexture(null, new RenderTargetInfo(), new ImportResourceParams()), + () => m_RenderGraph.ImportTexture(null, isBuiltin: false), + + // Buffer APIs + () => m_RenderGraph.CreateBuffer(new BufferDesc()), + () => m_RenderGraph.CreateBuffer(new BufferHandle()), + () => m_RenderGraph.ImportBuffer(null), + () => m_RenderGraph.ImportBackbuffer(new RenderTargetIdentifier(), new RenderTargetInfo()), + () => m_RenderGraph.ImportBackbuffer(new RenderTargetIdentifier()), + + // RendererList APIs + () => m_RenderGraph.CreateRendererList(new RendererListDesc()), + () => m_RenderGraph.CreateRendererList(new RendererListParams()), + () => m_RenderGraph.CreateGizmoRendererList(m_Camera, GizmoSubset.PreImageEffects), + () => m_RenderGraph.CreateUIOverlayRendererList(m_Camera), + () => m_RenderGraph.CreateUIOverlayRendererList(m_Camera, UISubset.All), + () => m_RenderGraph.CreateWireOverlayRendererList(m_Camera), + () => m_RenderGraph.CreateSkyboxRendererList(m_Camera), + () => m_RenderGraph.CreateSkyboxRendererList(m_Camera, Matrix4x4.identity, Matrix4x4.identity), + () => m_RenderGraph.CreateSkyboxRendererList(m_Camera, Matrix4x4.identity, Matrix4x4.identity, Matrix4x4.identity, Matrix4x4.identity), + + // Other APIs + () => m_RenderGraph.ImportRayTracingAccelerationStructure(null) + }; + + m_GraphStateActions.Add(flagActions, executingActions); + } + + // It's forbidden to use these APIs in RecordingPass and Executing mode. + void PopulateRecordingPassAndExecutingGraphAPIActions() + { + var flagActions = RenderGraphState.RecordingPass | RenderGraphState.Executing; + var recordingPassAndExecutingActions = new List + { + () => m_RenderGraph.EndRecordingAndExecute() + }; + + m_GraphStateActions.Add(flagActions, recordingPassAndExecutingActions); + } + + // It's forbidden to use these APIs in RecordingGraph, RecordingPass and Executing mode. + void PopulateActiveGraphAPIActions() + { + var flagActions = RenderGraphState.Active; + var textureHandle = new TextureHandle(); + var activeGraphActions = new List + { + () => m_RenderGraph.Cleanup(), + () => m_RenderGraph.RegisterDebug(), + () => m_RenderGraph.UnRegisterDebug(), + () => m_RenderGraph.EndFrame(), + () => m_RenderGraph.BeginRecording(new RenderGraphParameters()), + () => m_RenderGraph.CreateSharedTexture(new TextureDesc()), + () => m_RenderGraph.ReleaseSharedTexture(textureHandle) + }; + + m_GraphStateActions.Add(flagActions, activeGraphActions); + } + + void ExecuteRenderGraphAPIActions(RenderGraphState state) + { + if (!m_GraphStateActions.ContainsKey(state)) + return; + + var listAPIs = m_GraphStateActions[state]; + var graphStateException = RenderGraph.RenderGraphExceptionMessages.GetExceptionMessage(state); + + foreach (var action in listAPIs) + { + // Clear the graph to avoid any previous state (invalid pass because we threw an exception during the setup of the pass). + m_RenderGraph.ClearCurrentCompiledGraph(); + + // Manually check the flag to avoid testing Idle and Active states. + if ((state & RenderGraphState.Executing) == RenderGraphState.Executing) + { + RecordGraphAPIError(RenderGraphState.Executing, graphStateException, action); + } + + if ((state & RenderGraphState.RecordingGraph) == RenderGraphState.RecordingGraph) + { + RecordGraphAPIError(RenderGraphState.RecordingGraph, graphStateException, action); + } + + if ((state & RenderGraphState.RecordingPass) == RenderGraphState.RecordingPass) + { + RecordGraphAPIError(RenderGraphState.RecordingPass, graphStateException, action); + } + } + } + + void RecordGraphAPIError(RenderGraphState graphState, string exceptionExpected, Action action) + { + m_RenderGraphTestPipeline.recordRenderGraphBody = (context, camera, cmd) => + { + if (graphState == RenderGraphState.RecordingGraph) + action.Invoke(); + + using (var builder = m_RenderGraph.AddRasterRenderPass("TestPass_APIRecordingError", out var passData)) + { + builder.AllowPassCulling(false); + + if (graphState == RenderGraphState.RecordingPass) + action.Invoke(); + + builder.SetRenderFunc((RenderGraphTestPassData data, RasterGraphContext context) => + { + if (graphState == RenderGraphState.Executing) + action.Invoke(); + }); + } + }; + + LogAssert.Expect(LogType.Error, RenderGraph.RenderGraphExceptionMessages.k_RenderGraphExecutionError); + LogAssert.Expect(LogType.Exception, k_InvalidOperationMessage + exceptionExpected); m_Camera.Render(); } diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderPipeline/.buginfo b/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderPipeline/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderPipeline/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/RenderPipeline/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/ScriptTemplateTests.cs b/Packages/com.unity.render-pipelines.core/Tests/Editor/ScriptTemplateTests.cs new file mode 100644 index 00000000000..0afb70b6c75 --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/ScriptTemplateTests.cs @@ -0,0 +1,25 @@ +using UnityEditor; +using NUnit.Framework; +using UnityEditor.Rendering; + +namespace UnityEngine.Rendering.Tests +{ + class ScriptTemplatesTests + { + string[] paths = new string[] + { + $"{ScriptTemplates.ScriptTemplatePath}BlitSRP.txt" + }; + + [Test] + public void ScriptTemplatesExist() + { + for (int i = 0; i < paths.Length; i++) + { + var asset = AssetDatabase.LoadAssetAtPath(paths[i]); + + Assert.NotNull(asset); + } + } + } +} diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/ScriptTemplateTests.cs.meta b/Packages/com.unity.render-pipelines.core/Tests/Editor/ScriptTemplateTests.cs.meta new file mode 100644 index 00000000000..64b3abaff1c --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/ScriptTemplateTests.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c3c34b238c5994e4aa5f4c044f75d850 diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/ShaderStripping/.buginfo b/Packages/com.unity.render-pipelines.core/Tests/Editor/ShaderStripping/.buginfo new file mode 100644 index 00000000000..a8e3ae67ae4 --- /dev/null +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/ShaderStripping/.buginfo @@ -0,0 +1 @@ +area: Graphics Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Tests/Editor/Volumes/.buginfo b/Packages/com.unity.render-pipelines.core/Tests/Editor/Volumes/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Editor/Volumes/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Tests/Editor/Volumes/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.core/Tests/Runtime/.buginfo b/Packages/com.unity.render-pipelines.core/Tests/Runtime/.buginfo index 77553c92767..c0979152f33 100644 --- a/Packages/com.unity.render-pipelines.core/Tests/Runtime/.buginfo +++ b/Packages/com.unity.render-pipelines.core/Tests/Runtime/.buginfo @@ -1,17 +1,17 @@ default: - area: SRP Architecture & API + area: SRP Foundation -workflow: +settings: when: path: - ^.*Volume.*$ - area: SRP Workflow + area: SRP Settings -tools: +debugging-tools: when: path: - ^.*DebugManager.*$ - area: Graphics Tools + area: Graphics Debugging Tools xr: when: diff --git a/Packages/com.unity.render-pipelines.high-definition-config/.buginfo b/Packages/com.unity.render-pipelines.high-definition-config/.buginfo index aa7f21cd9cd..0eaaafec29d 100644 --- a/Packages/com.unity.render-pipelines.high-definition-config/.buginfo +++ b/Packages/com.unity.render-pipelines.high-definition-config/.buginfo @@ -1 +1 @@ -area: SRP Architecture & API +area: SRP Foundation diff --git a/Packages/com.unity.render-pipelines.high-definition/.buginfo b/Packages/com.unity.render-pipelines.high-definition/.buginfo index 6b6b1d34448..c52ac01a708 100644 --- a/Packages/com.unity.render-pipelines.high-definition/.buginfo +++ b/Packages/com.unity.render-pipelines.high-definition/.buginfo @@ -1,17 +1,22 @@ old: - area: SRP Architecture & API + area: SRP Foundation -Workflow: +settings: when: path: - ^.*Volume?.*$ - ^.*GlobalSettings?.*$ - - ^.*Camera?.*$ - ^.*AdditionalLight?.*$ - ^.*AdditionalReflectionProbe?.*$ - ^.*ContextualMenuDispatcher?.*$ - area: SRP Workflow - + area: SRP Settings + +camera: + when: + path: + - ^.*Camera?.*$ + area: Camera + Tools: when: path: diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Alpha-Output.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Alpha-Output.md index 3f871f1c7f0..61f76536d3a 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Alpha-Output.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Alpha-Output.md @@ -27,22 +27,22 @@ Rendering Buffer Format | Post-processing Buffer Format | Alpha Output ## DoF and Alpha Output Another case which might require post-processing of the alpha channel is for scenes that use Depth Of Field. In this case, if the alpha isn't processed, compositing results in a sharp cut-off of an object that appears blurred. This is better illustrated in the images below: -![](Images/DoFAlpha.png) +![An out-of-focus sphere composited over a solid blue background using a R16G16B16A16 buffer format for both rendering and post-processing. In this case, DoF is applied in the alpha channel, resulting in a proper composition.](Images/DoFAlpha.png) An out-of-focus sphere composited over a solid blue background using a R16G16B16A16 buffer format for both rendering and post-processing. In this case, DoF is applied in the alpha channel, resulting in a proper composition (the output alpha used in the composition is shown in the image inset). -![](Images/DoFAlphaCopy.png) +![An out-of-focus sphere composited over a solid blue background using AlphaCopy. In this case, DoF isn't applied in the alpha channel, resulting in a sharp outline around the composited sphere.](Images/DoFAlphaCopy.png) An out-of-focus sphere composited over a solid blue background using AlphaCopy. In this case, DoF isn't applied in the alpha channel, resulting in a sharp outline around the composited sphere (the output alpha used in the composition is shown in the image inset). ## Temporal Anti-Aliasing and Alpha Output When you enable Temporal Anti-Aliasing (TAA), it's highly recommended to enable post-processing for the alpha channel (R16G16B16A16 format for both rendering and post-processing). If the alpha channel isn't post-processed, then the alpha mask is jittered, as shown in the images below: -![](Images/TAA_AlphaCopy.gif) +![A sphere rendered with TAA using AlphaCopy, composited over a solid blue background using the alpha channel. The alpha channel isn't temporally stabilized by TAA, resulting in jittering on the final image.](Images/TAA_AlphaCopy.gif) A sphere rendered with TAA using AlphaCopy, composited over a solid blue background using the alpha channel. The alpha channel isn't temporally stabilized by TAA, resulting in jittering on the final image. -![](Images/TAA_Alpha.gif) +![A sphere rendered with TAA, composited over a solid blue background using the alpha channel. TAA is also applied in the alpha channel, resulting in a stable composition.](Images/TAA_Alpha.gif) A sphere rendered with TAA (R16G16B16A16 for both rendering and post-processing), composited over a solid blue background using the alpha channel. TAA is also applied in the alpha channel, resulting in a stable composition. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Compute-Thickness.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Compute-Thickness.md index e3b5f073659..5680b131d35 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Compute-Thickness.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Compute-Thickness.md @@ -1,6 +1,6 @@ # Compute Thickness -![](Images/ComputeThickness.png) +![A detailed dragon statuette made of a translucent green material.](Images/ComputeThickness.png) HDRP can use the optical path to make transparent or opaque materials appear more dense in larger internal areas of a mesh. This is called compute thickness. @@ -90,9 +90,7 @@ HDRP creates a texture that contains the thickness of all the GameObjects in eac HDRP calculates compute thickness for opaque materials before transparent materials. This means opaque materials affect the thickness of transparent materials, but opaque materials do not affect each other’s thickness. -For example, the image below displays two spheres that use a compute thickness material and intersect an opaque checkerboard plane. The transparent sphere (A) has a dark edge where the plane intersects it, but the opaque plane does not affect the opaque sphere (B). - -![](Images/computethickness_transparency.png) +![Two spheres that use a compute thickness material and intersect an opaque checkerboard plane. The transparent sphere (A) has a dark edge where the plane intersects it, but the opaque plane doesn't affect the opaque sphere (B).](Images/computethickness_transparency.png)
A: A sphere with a transparent compute thickness material intersecting an opaque plane. B: A sphere with an opaque compute thickness material intersecting an opaque plane. @@ -140,17 +138,17 @@ To visualize the compute thickness debug mode, perform the following actions: This view displays the thickness or overlap count of the objects in the layer you select in the **Layer Mask** property. -![](Images/ComputeThickness_Debug.png) +![A model shown in the default compute thickness debug view, and the debug view when you enable **Show Overlap Count**. In the second view, yellow areas indicate a high number of overlapping triangles.](Images/ComputeThickness_Debug.png) A: The default appearance of the compute thickness debug view. -B: The compute thickness debug view when you enable **Show Overlap Count** . +B: The compute thickness debug view when you enable **Show Overlap Count**. | **Debug view color** | **Description** | | ------------------------------------------------------------ | ------------------------------------------------------------ | -| ![img](Images/computethickness_debug_vidris.png)Vidris color scale | A gradient scale that represents thickness. Purple represents the minimum thickness and yellow represents the maximum thickness.
When you enable **Show Overlap Count,** yellow areas indicate a high number of overlapping triangles. | -| ![img](Images/computethickness_debug_red.png)Red | Negative thickness caused by an open mesh, flipped triangles, or an odd number of triangles in the optical path. | -| ![img](Images/computethickness_debug_gray.png)Gray | The default background color.
Gray areas inside a mesh indicate pixels that are in a similar position (z-fight) or have no thickness. | -| ![img](Images/computethickness_debug_orange.png)Orange | Compute Thickness is not active in HDRP graphics settings. To fix this, [enable compute thickness](#computethickness-enable). | -| ![img](Images/computethickness_debug_pink.png)Pink | This layer is not assigned to the HDRP Asset’s Layer Mask property. To fix this, [enable compute thickness](#computethickness-enable). | +| ![Vidris color scale](Images/computethickness_debug_vidris.png)Vidris color scale | A gradient scale that represents thickness. Purple represents the minimum thickness and yellow represents the maximum thickness.
When you enable **Show Overlap Count,** yellow areas indicate a high number of overlapping triangles. | +| ![Red](Images/computethickness_debug_red.png)Red | Negative thickness caused by an open mesh, flipped triangles, or an odd number of triangles in the optical path. | +| ![Gray](Images/computethickness_debug_gray.png)Gray | The default background color.
Gray areas inside a mesh indicate pixels that are in a similar position (z-fight) or have no thickness. | +| ![Orange](Images/computethickness_debug_orange.png)Orange | Compute Thickness is not active in HDRP graphics settings. To fix this, [enable compute thickness](#computethickness-enable). | +| ![Pink](Images/computethickness_debug_pink.png)Pink | This layer is not assigned to the HDRP Asset’s Layer Mask property. To fix this, [enable compute thickness](#computethickness-enable). | ## Limitations diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass-Frame-Debugger.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass-Frame-Debugger.md deleted file mode 100644 index 1ee40904548..00000000000 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass-Frame-Debugger.md +++ /dev/null @@ -1,11 +0,0 @@ -# Viewing a Custom Pass in the Frame Debugger - -You can use the [Frame Debugger](https://docs.unity3d.com/Manual/FrameDebugger.html) to examine every draw call you issued in the Custom Pass. To find your pass, look for the name you gave your Custom Pass in the Custom Pass Volume component. - -In this example, the Custom Pass is called **My Outline Pass**. The **Frame Debug** window (menu: - -**Window > Analysis > Frame Debugger**) displays the steps that **My Outline Pass** executes in the left window, highlighted in the image below: - -![](images/Custom_Pass_Frame_Debug.png) - -To learn more about the Frame Debugger, see the [Frame Debugger](https://docs.unity3d.com/Manual/FrameDebugger.html) documentation. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass-Injection-Points.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass-Injection-Points.md index 89bddeb728f..5f56f44eae3 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass-Injection-Points.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass-Injection-Points.md @@ -14,15 +14,12 @@ To learn when injection points happen in the render pipeline refer to [Execution Unity triggers the following injection points in a frame, in order from top to bottom: -| **Injection point** | **Available buffers** | **Description** | -|---------------------------| ------------------------------------------------------------ | ----------------------------------------------------------- | -| BeforeRendering | Depth (Write) | Unity clears the depth buffer immediately before this injection point.

In this injection point you can write to the depth buffer so that Unity doesn’t render depth-tested, opaque objects.

You can also clear the buffer you allocated or the `Custom Buffer`.

When you select this Injection point for a [FullscreenCustom Pass](custom-pass-create-gameobject.md#full-screen-custom-pass), Unity assigns the camera color buffer as the target by default. | -| AfterOpaqueDepthAndNormal | Depth (Read \| Write), Normal and roughness (Read \| Write), Motion Vectors (Write) | The available buffers for this injection point contain all opaque objects.

In this injection point you can modify the normal, roughness, depth, and motion vectors buffers. HDRP takes this into account in the lighting and the depth pyramid.

Normals and roughness are in the same buffer. You can use `DecodeFromNormalBuffer` and `EncodeIntoNormalBuffer` methods to read/write normal and roughness data.

The Motion Vectors buffer only includes object motion vector data when you use [forward rendering](Forward-And-Deferred-Rendering.md). To include object motion vector data in the Motion Vectors buffer when using deferred rendering, go to [Frame Settings](Frame-Settings.md) and enable **Depth Prepass within Deferred**. | -| AfterOpaqueAndSky | Color (no pyramid \| Read \| Write), Depth (Read \| Write), Normal and roughness (Read), Motion Vectors (Read \| Write) | The available buffers for this injection point contain all opaque objects and the sky. Note that the Fog is rendered just after this pass, so if you modify the color buffer, fog will be added on top of your effect. | -| BeforePreRefraction | Color (no pyramid \| Read \| Write), Depth (Read \| Write), Normal and roughness (Read), Motion Vectors (Read \| Write) | The available buffers for this injection point contain all opaque objects, the camera and object motion vectors, and the sky.

From this point, the motion vectors buffer is complete.

In this injection point you can render any transparent objects that require refraction. These objects are then included in the color pyramid that Unity uses for refraction when it renders transparent objects. | -| BeforeTransparent | Color (Pyramid \| Read \| Write), Depth (Read \| Write), Normal and roughness (Read), Motion Vectors (Read) | The available buffers for this injection point contain:
- All opaque objects.
- Transparent PreRefraction objects.
- Transparent objects with depth-prepass and screen space reflections (SSR) enabled.

In this Injection Point you can sample the color pyramid that Unity uses for transparent refraction. You can use this to create a blur effect. All objects Unity renders in this injection point will not be in the color pyramid.

You can also use this injection point to draw some transparent objects that refract the whole scene, like water. | -| BeforePostProcess | Color (Pyramid \| Read \| Write), Depth (Read \| Write), Normal and roughness (Read), Motion Vectors (Read) | The available buffers for this injection point contain all geometry in the frame that uses High Dynamic Range (HDR). | -| AfterPostProcess | Color (Read \| Write), Depth (Read) | The available buffers for this injection point contain the final render of the scene, including post-process effects.

This injection point executes the available buffers after Unity applies any post-processing effects.

If you select this injection point, objects that use the depth buffer display jittering artifacts.

When you select this injection point for a [FullscreenCustom Pass](custom-pass-create-gameobject.md#full-screen-custom-pass), Unity assigns the camera color buffer as the target by default. | - -The purple boxes correspond to the injection points above in this diagram representing the pass layout in HDRP: -![](Images/HDRP-frame-graph-diagram.png) \ No newline at end of file +| **Injection point** | **Available buffers** | **Description** | +|---------------------------| ------------------------------------------------------------ |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| BeforeRendering | Depth (Write) | Unity clears the depth buffer immediately before this injection point.

In this injection point you can write to the depth buffer so that Unity doesn’t render depth-tested, opaque objects.

You can also clear the buffer you allocated or the `Custom Buffer`.

When you select this Injection point for a [FullscreenCustom Pass](custom-pass-create-gameobject.md#full-screen-custom-pass), Unity assigns the camera color buffer as the target by default. | +| AfterOpaqueDepthAndNormal | Depth (Read \| Write), Normal and roughness (Read \| Write), Motion Vectors (Write) | The available buffers for this injection point contain all opaque objects.

In this injection point you can modify the normal, roughness, depth, and motion vectors buffers. HDRP takes this into account in the lighting and the depth pyramid.

Normals and roughness are in the same buffer. You can use `DecodeFromNormalBuffer` and `EncodeIntoNormalBuffer` methods to read/write normal and roughness data.

The Motion Vectors buffer only includes object motion vector data when you use [forward rendering](Forward-And-Deferred-Rendering.md). To include object motion vector data in the Motion Vectors buffer when using deferred rendering, go to [Frame Settings](Frame-Settings.md) and enable **Depth Prepass within Deferred**. | +| AfterOpaqueAndSky | Color (no pyramid \| Read \| Write), Depth (Read \| Write), Normal and roughness (Read), Motion Vectors (Read \| Write) | The available buffers for this injection point contain all opaque objects and the sky. Note that the Fog is rendered just after this pass, so if you modify the color buffer, fog will be added on top of your effect. | +| BeforePreRefraction | Color (no pyramid \| Read \| Write), Depth (Read \| Write), Normal and roughness (Read), Motion Vectors (Read \| Write) | The available buffers for this injection point contain all opaque objects, the camera and object motion vectors, and the sky.

From this point, the motion vectors buffer is complete.

In this injection point you can render any transparent objects that require refraction. These objects are then included in the color pyramid that Unity uses for refraction when it renders transparent objects. | +| BeforeTransparent | Color (Pyramid \| Read \| Write), Depth (Read \| Write), Normal and roughness (Read), Motion Vectors (Read) | The available buffers for this injection point contain:
- All opaque objects.
- Transparent PreRefraction objects.
- Transparent objects with depth-prepass and screen space reflections (SSR) enabled.

In this Injection Point you can sample the color pyramid that Unity uses for transparent refraction. You can use this to create a blur effect. All objects Unity renders in this injection point will not be in the color pyramid.

You can also use this injection point to draw some transparent objects that refract the whole scene, like water. | +| BeforePostProcess | Color (Pyramid \| Read \| Write), Depth (Read \| Write), Normal and roughness (Read), Motion Vectors (Read) | The available buffers for this injection point contain all geometry in the frame that uses High Dynamic Range (HDR). | +| AfterPostProcess | Color (Read \| Write), Depth (Read) | The available buffers for this injection point contain the final render of the scene, including post-process effects.

This injection point executes the available buffers after Unity applies any post-processing effects.

If you select this injection point, objects that use the depth buffer display jittering artifacts.

When you select this injection point for a [FullscreenCustom Pass](custom-pass-create-gameobject.md#full-screen-custom-pass), Unity assigns the camera color buffer as the target by default.

**Note:** When sampling scene color using HDSceneColor node in a FullScreenShaderGraph at this injection point, consider using a temporary buffer to handle concurrent read/write operations. See [Scene Color Sampling in AfterPostProcess](Custom-Pass-Scene-Color-Read.md) for implementation details. | diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass-Scene-Color-Read.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass-Scene-Color-Read.md new file mode 100644 index 00000000000..474594bf641 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass-Scene-Color-Read.md @@ -0,0 +1,58 @@ +# Scene Color Sampling in AfterPostProcess Custom Pass + +## Overview +When using AfterPostProcess injection point with FullScreenShaderGraph that samples scene color, you might need to handle concurrent read/write operations on the color buffer. This page explains the recommended implementation for proper scene color sampling. + +## Technical Details +At the AfterPostProcess injection point, the color buffer serves as both the render target and the source for scene color sampling. To ensure correct sampling, you can implement a solution using a temporary buffer. + +## Implementation Example + +Here's an example of how to properly sample scene color in an AfterPostProcess Custom Pass: + +```c# +class SceneColorSamplingPass : CustomPass +{ + RTHandle m_TempColorBuffer; + + protected override void Setup(ScriptableRenderContext renderContext, CommandBuffer cmd) + { + // Create temporary buffer with the same properties as camera color buffer + m_TempColorBuffer = RTHandles.Alloc( + Vector2.one, TextureXR.slices, dimension: TextureXR.dimension, + colorFormat: GetColorBufferFormat(), + name: "SceneColorSamplingBuffer" + ); + } + + protected override void Execute(CustomPassContext ctx) + { + // Copy the scene color to temporary buffer + ctx.cmd.CopyTexture(ctx.cameraColorBuffer, m_TempColorBuffer); + + // Bind temporary buffer for sampling + ctx.cmd.SetGlobalTexture("_AfterPostProcessColorBuffer", m_TempColorBuffer); + + // Your custom pass rendering code here + // ... + } + + protected override void Cleanup() + { + // Release the temporary buffer + RTHandles.Release(m_TempColorBuffer); + } +} +``` +## Performance Considerations + +When implementing this solution, keep in mind: +- This approach allocates an additional full-resolution color buffer +- Only implement this solution when you need to sample the scene color +- Consider using a different injection point if your use case allows it + +## See Also +- [Custom Pass Injection Points](Custom-Pass-Injection-Points.md) +- [Custom Pass Volume Workflow](Custom-Pass-Volume-Workflow.md) +- [Full Screen Custom Pass](custom-pass-create-gameobject.md) + diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Double-Sided.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Double-Sided.md index 40edb4a4311..c188e48d858 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Double-Sided.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Double-Sided.md @@ -2,7 +2,7 @@ This setting controls whether The High Definition Render Pipeline (HDRP) renders both faces of the geometry of GameObjects using this Material, or just the front face. - ![](Images/DoubleSided1.png) + ![Half a cube. Two arrows represent the normals of the front faces, which point along the x-axis and y-axis. The opposite side of those faces are labelled as the back faces.](Images/DoubleSided1.png) This setting is disabled by default. Enable it if you want HDRP to render both faces of your geometry. When disabled, HDRP [culls](https://docs.unity3d.com/Manual/SL-CullAndDepth.html) the back-facing polygons of your geometry and only renders front-facing polygons. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Glossary.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Glossary.md index c2510eb6521..0a83106cb6c 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Glossary.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Glossary.md @@ -113,8 +113,6 @@ An anti-aliasing technique that uses frames from a history buffer to smooth edge A measure of the amount of light ([luminous flux](#LuminousFlux)) falling onto a given area. Differs from luminance because illuminance is a specific measurement of light whereas luminance describes visual perceptions of light. -![](Images/GlossaryLighting3.png) - #### luminous flux: diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md index 5f02b45770f..6ba9dc953c6 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md @@ -76,19 +76,19 @@ HDRP Shaders allow you to use the following features: ### Lit Shader -![](Images/HDRPFeatures-LitShader.png) +![A large group of spheres, each of which uses a different material.](Images/HDRPFeatures-LitShader.png) The Lit Shader is the default Shader in HDRP. Use the Lit Shader to create realistic Materials. The Lit Shader also includes options for effects including subsurface scattering, iridescence, and translucency. For more information, including the full list of Shader properties, see the [Lit Shader documentation](lit-material.md) and [Lit master stack](lit-master-stack-reference.md). ### Layered Lit Shader -![](Images/HDRPFeatures-LayeredLitShader.png) +![A close-up of a rocky, grassy landscape.](Images/HDRPFeatures-LayeredLitShader.png) The Layered Lit Shader combines a main Material with other tileable Materials to produce visuals with a similar quality to a single high-resolution texture, but in a way that's less resource intensive than a [Lit Shader](lit-material.md) using the single high-resolution Texture. For more information, including a full list of Shader properties, see the [Layered Lit Shader documentation](layered-lit-material-inspector-reference.md). ### Unlit Shader -![](Images/HDRPFeatures-UnlitShader.png) +![Glowing strip lights.](Images/HDRPFeatures-UnlitShader.png) The Unlit Shader allows you to create Materials that aren't affected by lighting. Unlit Shaders are perfect for visual effects. For more information, including a full list of Shader properties, see the [Unlit Shader documentation](unlit-shader.md) and [Unlit master stack](unlit-master-stack-reference.md). @@ -96,13 +96,13 @@ With the **Shadow Matte** option, you can have the surface receive shadow withou ### StackLit Shader -![](Images/HDRPFeatures-StackLitShader.png) +![A row of red sphere-like plastic shapes with reflective and opaque surfaces.](Images/HDRPFeatures-StackLitShader.png) The StackLit Shader is a higher quality than the Lit Shader, but more resource intensive. This Shader coats surfaces more accurately than the Lit Shader, and, unlike the Lit Shader, allows you to use multiple Material features like anisotropy, subsurface scattering iridescence, and hazy parametrization at the same time. For more information, including a full list of Shader properties, see the [Stacklit master stack](stacklit-master-stack-reference.md) ### Hair Shader -![](Images/HDRPFeatures-HairShader.png) +![Two views of a woman with realistic flowing hair.](Images/HDRPFeatures-HairShader.png) The Hair Shader is purpose-built to accurately render realistic and stylized hair in your Unity Project. You can use the following modes: - Physically based: Uses the Marschner lighting model with multiple scattering to improve the realism of light-colored hair. @@ -112,13 +112,13 @@ For more information, including a full list of Shader properties, see the [Hair ### Fabric Shader -![](Images/HDRPFeatures-FabricShader.png) +![A close-up of a sphere with a detailed fabric texture.](Images/HDRPFeatures-FabricShader.png) The Fabric Shader allows you to render realistic fabric Materials in HDRP. You can use the cotton wool or silk lighting model to create a wide variety of fabrics. For more information, including a full list of Shader properties, see [Create a fabric material](create-a-fabric-material.md). ### Eye Shader -![](Images/HDRPFeatures-EyeShader.png) +![Six floating eyeballs.](Images/HDRPFeatures-EyeShader.png) The Eye Shader allows you to render realistic eye Materials in HDRP. The Eye shader can use the following material types: - Eye: Uses a low resource-intensity method to calculate caustics. @@ -130,13 +130,13 @@ For more information, including a full list of Shader properties, see the [Eye S ### AxF Shader -![](Images/HDRPFeatures-AxFShader.png) +![Seven spheres floating against a forest backdrop, each with a different realistic surface texture.](Images/HDRPFeatures-AxFShader.png) The AxF Shader supports the [X-Rite AxF](https://www.xrite.com/axf) measured Material format. The AxF importer, available in [Unity Enterprise for Product Lifecylce](https://unity.com/products/unity-enterprise-product-lifecycle), automatically populates an AxF Material when it imports AxF Assets. For more information, including a full list of Shader properties, see the [AxF Shader documentation](AxF-material-inspector-reference.md). ### Decals -![](Images/HDRPFeatures-DecalShader.png) +![Rocky ground with two iridescent oil patches.](Images/HDRPFeatures-DecalShader.png) Use Decals to apply a separate texture to surfaces in your Scene. To apply a decal to a surface, you can either use the [Decal Projector component](decal-projector-reference.md) to project the decal onto the surface, or assign the decal shader directly to a Mesh and then place the Mesh on the surface. @@ -146,17 +146,17 @@ For more information, see [Decals](decals.md). ### Terrain Shader -![](Images/HDRPFeatures-TerrainShader.png) +![A mountain range.](Images/HDRPFeatures-TerrainShader.png) The Terrain Lit Shader is compatible with the built-in terrain system and supports up to eight layers in a single draw call. This Shader uses the same lighting model as the Lit Shader. For more information, including the full list of Shader properties, see the [Terrain Lit Shader documentation](terrain-lit-material.md). ### Compute Thickness -![](Images/HDRPFeatures-ComputeThickness.png) +![A detailed dragon statuette rendered using various techniques.](Images/HDRPFeatures-ComputeThickness.png) Compute Thickness is a screen-space pass that calculates the accumulated [thickness](Compute-Thickness.md) of objects in a specific Layer. HDRP calculates the optical path and overlap count, which you can use with [Subsurface Scattering](skin-and-diffusive-surfaces-subsurface-scattering.md) and [Refraction](Override-Screen-Space-Refraction.md). You can also use the overlap count to calculate compute thickness on non-closed or flat geometry like vegetation. Use the [HD Sample Buffer](https://docs.unity3d.com/Packages/com.unity.shadergraph@latest/index.html?preview=1&subfolder=/manual/HD-Sample-Buffer-Node.html) node to sample the thickness in a Shader Graph. ### Volumetric Materials -![VolumetricMaterials](Images/VolumetricMaterials.png) +![A plane with a layer of fog floating above it.](Images/VolumetricMaterials.png) In HDRP, you can control the density of fog in an area to create a Volumetric fog effect. Use a [local volumetric fog](create-a-local-fog-effect.md) volume override to set a 3D Mask texture or a shader graph that controls the fog color and the density. @@ -168,7 +168,7 @@ The Visual Effect Graph supports volumetric outputs, like the [Volume (Cone)](ht ### Light types -![](Images/HDRPFeatures-LightTypes.png) +![Three glowing strip lights in a dark, foggy industrial environment.](Images/HDRPFeatures-LightTypes.png) The HDRP light types use [physical light units](#PLU) to help you light your Scene in the most realistic way possible. To assist you in creating physically accurate lights, the [Light component](Light-Component.md) Inspector includes icons alongside the **Intensity** and **Temperature** properties. Each icon displays the real-world light source that the value of each property currently represents. Each icon is also a button which you can click to access a list of preset values that match real-world light sources. For lights to behave properly when using PLU, you need to respect HDRP unit convention (1 Unity unit equals 1 meter). The HDRP light types are: @@ -205,7 +205,7 @@ For more information, including the full list of light properties, see the [Ligh ### Rendering Layers -![](Images/HDRPFeatures-LightLayers.png) +![Three spheres, labelled to show that each receives light from different lights.](Images/HDRPFeatures-LightLayers.png) Rendering Layers are Layer Masks that you specify for Lights, Decals and Meshes. Lights only illuminate Meshes that are on the same Rendering Layer. You can also use Rendering Layers in the shadow map settings to decouple shadows from lighting. For more information on Rendering Layers, see the [Rendering Layers documentation](Rendering-Layers.md). @@ -213,20 +213,16 @@ You can use Rendering layers in the shadow map dropdown to control which GameObj ### IES Profiles and light cookies -![](Images/HDRPFeatures-IESProfiles.png) +![Four detailed dragon statuettes, each lit using a different type or color of spotlight.](Images/HDRPFeatures-IESProfiles.png) HDRP supports the Illuminating Engineering Society's (IES) file format for describing the distribution of light from a light source. HDRP supports the IES profile for Point, Spot (Cone, Pyramid, and Box), and rectangular Area [Lights](Light-Component.md). You can also mix the IES profile with [cookies](https://docs.unity3d.com/Manual/Cookies.html) and even use the profile and cookie mix for [light map baking](https://docs.unity3d.com/Manual/LightMode-Baked.html). ### Light Anchor -![](Images/LightAnchor0.png) - HDRP's [Light Anchor component](light-anchor.md) allows you to manipulate a light from the Main Camera view. ### Light Explorer -![](Images/LightExplorer.png) - HDRP adds options to the [Light Explorer](https://docs.unity3d.com/Manual/LightingExplorer.html) that you can use to select and edit the following light sources: - Directional lights - Point lights @@ -238,32 +234,32 @@ HDRP adds options to the [Light Explorer](https://docs.unity3d.com/Manual/Lighti ### Lens Flare, data-driven -![](Images/LensFlareSamples2.png) +![A lens flare from a bright sun viewed from space.](Images/LensFlareSamples2.png) Use HDRP's data-driven Lens Flare system provides a [lens flare asset](shared/lens-flare/lens-flare-asset.md) and a [lens flare component](shared/lens-flare/lens-flare-component.md) that you can attach to any GameObject. You can control each element of a Lens Flare individually. ### Lens Flare, Screen Space -![](Images/ScreenSpaceLensFlare-feature.png) +![A sports car in a town square at sunset, with lens flares from its metal bumper.](Images/ScreenSpaceLensFlare-feature.png) HDRP generates the Screen Space Lens Flare effect from screen information to create multiple types of flares based on the [Bloom](Post-Processing-Bloom.md) texture. This is useful for view-dependent bright spots (like specular reflection and overexposed areas) that don't have a defined position in world space. ### Reflection probes -![](Images/HDRPFeatures-ReflectionProbes.png) +![An office scene with highly realistic lighting.](Images/HDRPFeatures-ReflectionProbes.png) HDRP supports cubemap reflections that take surface smoothness into account. HDRP cubemap reflection optionally supports a fake distance based roughness. This helps you produce realistic reflections in your Scene in real time. You can control the reflection probe resolution for each probe. For more information, see [introduction to Reflection Probes](Reflection-Probes-Intro.md) ### Planar reflection probe -![](Images/PlanarReflectionFiltering-Feature.png) +![A floor with realistic wet patches.](Images/PlanarReflectionFiltering-Feature.png) HDRP supports Planar reflection probes that take surface smoothness into account. This allows you to create effects that mimic a shiny mirror or a wet floor. HDRP includes accurate filtering for planar reflection that's close to being physically based. For more information, see [Planar Reflection Probe](Planar-Reflection-Probe.md). ### Screen-space reflection and refraction -![](Images/HDRPFeatures-ScreenSpaceReflectionRefraction.png) +![A town square scene with a large puddle that reflects the buildings above, and the same scene with a close-up of a Reflection Probe.](Images/HDRPFeatures-ScreenSpaceReflectionRefraction.png) HDRP provides a screen-space solution for reflection and refraction. It uses the depth and color buffer of the screen to help simulate the path that light travels to the Camera and uses this to calculate accurate reflection and refraction. You can use this feature for transparent materials too, such as windows or water. For more information, see [screen-space reflection](Override-Screen-Space-Reflection.md) and [screen-space refraction](Override-Screen-Space-Refraction.md). To see how to setup refractive materials and understand the limitations of Screen Space Refraction, download the [Material Sample](HDRP-Sample-Content.md#material-samples) from the Package Manager window and open the **Transparency** scenes. @@ -280,7 +276,7 @@ HDRP includes a [screen space ambient occlusion](Override-Ambient-Occlusion.md) Screen space ambient occlusion in HDRP can apply a direction to indirect specular lighting. To improve the specular occlusion approximation, you can use a texture that contains bent normal information that corresponds to the light direction. ### Adaptive Probe Volumes -![](Images/HDRPFeatures-APV.png) +![A scene from the [Enemies](https://unity.com/demos/enemies) demo, with a woman sitting playing chess in a large ornate room.](Images/HDRPFeatures-APV.png) Adaptive Probe Volumes (APV) is a probe-based global illumination system that automatically places light probes based on the geometry density in your scene. APV features include: - Per-pixel probe selection and lighting. @@ -294,7 +290,7 @@ For more information, see [APV](probevolumes.md). ### Screen-space global illumination -![](Images/HDRPFeatures-SSGI.png) +![A stylized scene of a desk with plants and clay figures, lit warmly.](Images/HDRPFeatures-SSGI.png) HDRP supports screen-space global illumination (SSGI). SSGI is an algorithm that accesses the indirect diffuse lighting that the environment generates. It works in the same way as the [Screen Space Reflection](Override-Screen-Space-Reflection.md) in that it uses ray marching to calculate the result. @@ -311,8 +307,6 @@ HDRP allows you to calculate exposure using several methods. This includes: ##### Histogram exposure -![](Images/Exposure_Histogram.png) - HDRP's exposure implementation computes a histogram of the image which allows you to select high and low percentile values to discard. Discarding outlying values in the shadows or highlights helps to calculate a more stable exposure. For more information, see [Exposure](Override-Exposure.md). ##### Metering mode @@ -321,13 +315,13 @@ HDRP's exposure implementation includes a metering mask. This includes a texture ### Emission -![](Images/HDRPFeatures-Emission.png) +![A neon-lit street scene at night, with glowing signs.](Images/HDRPFeatures-Emission.png) HDRP Materials support light [emission](lit-material-inspector-reference.md#EmissionInputs), which allows you to make a Material into a self-illuminated visible source of light. Global illumination takes emission into account and you can use [physical light units](#PLU) to set the intensity based on real-world lights. ### Shadows -![](Images/HDRPFeatures-Shadows.png) +![The shadow of a tree cast on a forest floor.](Images/HDRPFeatures-Shadows.png) HDRP uses multiple methods to calculate shadows: @@ -355,7 +349,7 @@ To apply a tint to the shadow or the penumbra of the shadow: ### Ray tracing -![](Images/HDRPFeatures-RayTracing.png) +![A ray-traced scene of a sparsely-furnished modern room.](Images/HDRPFeatures-RayTracing.png) You can use ray tracing as an alternative to some screen space effects, shadowing techniques, and Mesh rendering techniques: @@ -379,7 +373,7 @@ You can use ray tracing as an alternative to some screen space effects, shadowin ### Sky -![](Images/HDRPFeatures-Sky.png) +![Clouds.](Images/HDRPFeatures-Sky.png) In HDRP, you set up the sky inside a [Volume](understand-volumes.md), so you can change sky settings, or even the type of sky itself, depending on the position of the Camera in the Scene. HDRP allows you to separate the visual sky from the sky that you use for environment lighting. HDRP includes the following built-in sky types for you to use in your Unity Project: @@ -391,7 +385,7 @@ HDRP is able to handle multiple skies seen by different Cameras. #### Backplate -![](Images/HDRPFeatures-HDRISky.png) +![A stylized car floating on a dirt road in a vast plain.](Images/HDRPFeatures-HDRISky.png) A backplate projects the bottom part of a [HDRI Sky](create-an-hdri-sky.md) onto a plane in one of the following shapes: - **Rectangle** @@ -403,7 +397,7 @@ To match the scale of the GameObjects in your Scene, change the Backplate's **Sc ### Cloud Layer -![](Images/HDRPFeatures-CloudLayer.png) +![A scene of a town square with a cloudy sky.](Images/HDRPFeatures-CloudLayer.png) In HDRP, you set up cloud layers inside a [Volume](Volumes.md), so you can change clouds settings, or even the type of clouds itself, depending on the position of the Camera in the Scene. HDRP allows you to separate the clouds in the visual sky from the clouds that you use for environment lighting. HDRP includes the following built-in cloud type for you to use in your Unity Project: @@ -411,13 +405,13 @@ In HDRP, you set up cloud layers inside a [Volume](Volumes.md), so you can chang ### Volumetric Clouds -![](Images/HDRPFeatures-VolumetricClouds.png) +![A snowy mountain range and lake with a cloudy sky at sunset.](Images/HDRPFeatures-VolumetricClouds.png) You can use a [Volume](understand-volumes.md) component to create volumetric clouds. Volumetric clouds physically exist inside a scene, HDRP does not project them on the HDRI sky. A camera can fly through volumetric clouds and volumetric clouds have accurate interactions with the sky, sun and fog. Volumetric clouds cast shadows on themselves and the ground using a Beer shadow map. For more information, refer to [Volumetric Clouds](create-realistic-clouds-volumetric-clouds.md). ### Fog -![](Images/HDRPFeatures-Fog.png) +![A futuristic cityscape with fog obscuring the distant buildings.](Images/HDRPFeatures-Fog.png) In HDRP, you set up fog inside a [Volume](understand-volumes.md) which means you can change fog settings or the fog type depending on the position of the Camera in the Scene. You can set the color of the fog yourself or use the color of the sky. HDRP fog affects Materials with both opaque and transparent surfaces. HDRP implements an exponential [fog](fog.md) with optional volumetric effects. @@ -425,7 +419,7 @@ In HDRP, you set up fog inside a [Volume](understand-volumes.md) which means you ### Water Surface -![](Images/Water2023-1.png) +![An ocean at sunset.](Images/Water2023-1.png) Use HDRP's water system to create and control realistic water surfaces. HDRP's water system includes the following features: - Multiple presets. @@ -446,13 +440,13 @@ For more information, refer to [Water system](water.md). ### Post-processing -![](Images/HDRPFeatures-PostProcessing.png) +![A scene of a fiery supernova, shown with post-processing effects both enabled and disabled.](Images/HDRPFeatures-PostProcessing.png) HDRP includes its own purpose-built implementation for post-processing to produce exceptionally high-quality graphics. You can use post-processing to apply full-screen filters and effects to the Camera to drastically improve the visuals of your Unity Project with little set-up time. For an overview on HDRP post-processing, see the [post-processing documentation](Post-Processing-Main.md). ### HDR Display Output -![](Images/HDRPFeatures-HDR.png) +![A sunset over a plane, with a color gamut displaying the range of colors used.](Images/HDRPFeatures-HDR.png) You can output a HDRP scene to high dynamic range (HDR) displays and customize the output in the following ways: @@ -464,13 +458,13 @@ For more information see the [High Dynamic Range Output documentation](HDR-Outpu ### Accumulation motion blur -![](Images/path_tracing_recording-Feature.png) +![A piece of wood falling, with motion blur.](Images/path_tracing_recording-Feature.png) HDRP includes a recording API that you can use to render effects like high-quality accumulation motion blur. This technique combines information from multiple intermediate sub-frames to create a converged frame. Use this API to extract the converged frame and perform further processing or save it to disk. For information about this feature, and some example scripts, see [Multiframe rendering and accumulation](Accumulation.md). ### Anti-Aliasing -![](Images/HDRPFeatures-AntiAliasing.png) +![A futuristic interior, shown with anti-aliasing both enabled and disabled.](Images/HDRPFeatures-AntiAliasing.png) HDRP includes the following [antialiasing](Anti-Aliasing.md) methods to help you remove aliasing effects with performance and quality in mind: @@ -485,28 +479,24 @@ HDRP uses a physically based Camera system that works seamlessly with the other ### Custom Post-processing -![Posterize](Images/HDRPFeatures-CustomPostProcess.png) +![A man in a forest with a posterize effect applied.](Images/HDRPFeatures-CustomPostProcess.png) HDRP allows you to add your own custom post processes integrated with the volume framework. You can inject them after opaque and sky object, before the [temporal antialiasing](Anti-Aliasing.md#TAA) pass, before built-in post processes or after built-in post processes. For more information, see the [Custom Post-processing documentation](Custom-Post-Process.md). ### Custom Passes -![HDRPFeatures-CustomPass](Images/HDRPFeatures-CustomPass.gif) - Use a Custom Pass to inject shaders and C# scripts at certain points inside the render pipeline. You can use a Custom Pass to draw objects, override the rendering properties of objects in your scene, perform fullscreen passes and read some camera buffers like depth, color, normal or motion vectors. You can also use this Camera override to render some GameObjects with a different field of view, like arms in a first-person application. For more information, see [Custom Pass](Custom-Pass.md). Use the [Custom Pass API](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/api/UnityEngine.Rendering.HighDefinition.CustomPassUtils.html) to render GameObjects from another point of view, like a disabled camera, within the rendering of your main Camera. You can use this API to render `Depth`, `Normal`, and `Tangent` into an `RTHandle`. ### High Quality Line Rendering -![img](Images/HQLines-Hero.png) +![A lion cub with realistic fur, climbing on another lion.](Images/HQLines-Hero.png) High Quality Line Rendering allows you to render hair, wires, and other line-based geometry with high quality anti-aliasing and transparency. For more information, refer to [High Quality Line Rendering](Override-High-Quality-Lines.md). ### Custom Pass AOV Export -![img](Images/aov_example.png) - This feature allows you to export arbitrary data from custom pass injection points using an extension of the Arbitrary Output Variables (AOV) API in HDRP. An example use-case is for exporting “Object IDs” that are rendered with a custom pass. For information about the feature and example scripts, see the [AOV documentation](AOVs.md). ### Fullscreen Shader Graph @@ -515,7 +505,7 @@ Use the Fullscreen Shader Graph to create custom post process and fullscreen cus ### Custom Render Texture in Shader Graph -![CustomRenderTextureRipples](Images/CustomRenderTextureRipples.png) +![Light ripples in water.](Images/CustomRenderTextureRipples.png) In HDRP, you can use [Custom Render Textures](https://docs.unity3d.com/Manual/class-CustomRenderTexture.html) as a Shader Graph target to create static or dynamic textures. Custom Render Textures support multiple texture dimensions. For example, you can use 3D textures with Local Volumetric Fog, and Cubemaps in the HDRI sky. @@ -526,7 +516,7 @@ You can also create complex effects like dynamic ripples and snow deformation wn Use the [Canvas ShaderGraph](canvas-material.md) to create custom [UGUI user interface elements](https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/UICanvas.html). ### Graphics Compositor -![](Images/Compositor-HDRPTemplateWithLogo_Feature.png) +![A sample scene of a workshop, with the Unity logo composited on top.](Images/Compositor-HDRPTemplateWithLogo_Feature.png) Use the Graphics Compositor to compose images and videos with 3D content into a final frame in real-time, without an external compositing tool. @@ -544,7 +534,7 @@ For information, see [HDRP Compositor](graphics-compositor.md). ### Path-traced depth of field -![](Images/Path-traced-DoF-Feature.png) +![Two paint pots with a depth of field effect that makes surfaces increasingly blurry towards and away from the camera.](Images/Path-traced-DoF-Feature.png) HDRP includes a depth of field mode for producing path-traced images with high-quality defocus blur. This mode can use multiple layers of transparency and doesn't produce any artifacts. However, path tracing can cause some noise. To fix noise artefacts, increase the sample count or using an external denoising tool. For more information about, see [Depth-of-field](Post-Processing-Depth-of-Field.md). @@ -554,13 +544,13 @@ HDRP includes a recording API which you can use to render converged path-traced ### Path-traced sub-surface scattering -![](Images/Path-traced-SSS-Feature.png) +![A close-up of a detailed dragon statuette made of a translucent green material.](Images/Path-traced-SSS-Feature.png) Path tracing supports subsurface scattering (SSS), using a random walk approach. To use it, enable path tracing and set up SSS in the same way as you would for HDRP materials. For information on SSS in HDRP, see [subsurface scattering](skin-and-diffusive-surfaces-subsurface-scattering.md). ### Path-traced fog -![](Images/Path-traced-fog-Feature.png) +![A close-up of a detailed dragon statuette in fog.](Images/Path-traced-fog-Feature.png) Path tracing in HDRP supports anisotropic fog absorption. To use this feature enable path tracing and set up fog in HDRP. For information, refer to [fog](fog.md). @@ -570,8 +560,6 @@ Path tracing works with [decals](decals.md). For more information, refer to [Und ### Materials support -![](Images/Path-traced-materials-Feature.png) - Path tracing can render the following rasterization engine [Materials](#Material): - Lit @@ -585,7 +573,7 @@ When you enable path tracing, objects that use non-HDRP Materials won't appear i ### Denoising support -![](Images/Path-Tracing-Denoise-banner.png) +![Vegetation in a display case in a room, shown with denoising both enabled and disabled.](Images/Path-Tracing-Denoise-banner.png) HDRP supports denoising for frames that use path tracing. You can choose from the following denoising libraries: - Optix Denoiser. @@ -597,19 +585,17 @@ HDRP supports denoising for frames that use path tracing. You can choose from th ### Color checker -![](Images/colorchecker.png) +![A scene showing the different modes of the Color Checker Tool. Each mode displays a different palette as spheres or squares.](Images/colorchecker.png) Use the Color Checker tool to check the calibration of lighting and post processing. To open the color checker tool, go to **GameObject** > **Rendering** > **Color Checker Tool**. HDRP doesn't save any changes you make in the color checker. ### Light placement tool -![](Images/LightPlacementTool.png) - Use the Light Placement Tool to look through a light and use the camera movement controls to move the light around the scene. To enter this mode select a light GameObject and select the Light Placement Tool button in the Tools Panel. For more information, refer to [Light placement tool](lights-placement-tool.md) ### LookDev -![](Images/HDRPFeatures-LookDev.png) +![The Look Dev tool in split-screen view, with the scene on the left side, and the selection of environments on the right side.](Images/HDRPFeatures-LookDev.png) The LookDev is a viewer that allows you to import and display Assets in a consistent lighting environment. Use the LookDev window to validate outsourced Assets or to showcase your own created Asset with HDRP. For more information on the LookDev, including a description of how to use it, see the [LookDev documentation](test-and-debug-materials-in-different-lighting-conditions-look-dev.md). ### Render Pipeline Wizard diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Sample-Content.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Sample-Content.md index 75b9064d04d..849ff659f35 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Sample-Content.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Sample-Content.md @@ -6,7 +6,7 @@ A Sample is a set of Assets that you can import into your Project and use as a b To find these Samples: -1. Go to **Window** > **Package Manager**, and select **High Definition RP** from the package list. +1. Go to **Window** > **Package Management** > **Package Manager**, and select **High Definition RP** from the package list. 2. In the main window that shows the package's details, find the **Samples** section. 3. To import a Sample into your Project, click the **Import into Project** button. This creates a **Samples** folder in your Project and imports the Sample you selected into it. This is also where Unity imports any future Samples into. @@ -28,7 +28,7 @@ This Sample includes various examples of lit and unlit particle effects. ## Material samples -![Material Samples](Images/MaterialSamples.png) +![The Materials sample scene. A display of various materials, each with a description panel.](Images/MaterialSamples.png) This Sample includes various examples of Materials. It includes Materials that use the [Lit Shader](lit-material.md), [Fabric Master Stack](fabric-master-stack-reference.md), [Hair Master Stack](hair-master-stack-reference.md), [Eye Shader](eye-master-stack-reference.md) and [Decal Master Stack](decal-master-stack-reference.md). The included Materials use effects such as subsurface scattering, displacement, and anisotropy. The **MaterialSamples** Scene requires Text Mesh Pro to display the text explanations. @@ -38,14 +38,14 @@ In the **Eye** Scene, the eye examples use a carefully designed mesh with a part ## Transparent samples -![Transparent Samples](Images/TransparentSamples.png) +![The Transparent samples scene. A display of various transparent materials, each with a description panel.](Images/TransparentSamples.png) In the Transparency scene, the examples contain information on how to setup properly transparents in your projects using different rendering methods (Rasterization, Ray Tracing, Path Tracing). To take advantage of all the content of this section, a GPU that supports [Ray Tracing](Ray-Tracing-Getting-Started.md) is needed. ## Lens Flare samples -![Lens Flare Samples](Images/LensFlareSamples.png) +![A lens flare.](Images/LensFlareSamples.png) The [Lens Flare](shared/lens-flare/lens-flare-component.md) samples include the following examples that you can use in your project: - Lens Flare Assets. @@ -56,7 +56,6 @@ The [Lens Flare](shared/lens-flare/lens-flare-component.md) samples include the ## Volumetric samples -![Volumetric Samples](Images/VolumetricSamples.png) The volumetric samples include a scene that contains multiple examples of [volumetric fog](create-a-local-fog-effect.md). This scene includes the following: - 3D textures. @@ -64,7 +63,7 @@ The volumetric samples include a scene that contains multiple examples of [volum - Fog Volume Shader Graph examples. ## Fullscreen samples -![Fullscreen Samples](Images/FullscreenSamples.png) +![A scene with a group of simple geometric shapes, rendered with white edges, a Sobel filter, and using a different color for each object.](Images/FullscreenSamples.png) This sample includes examples on how to create a [Fullscreen Shader](create-a-fullscreen-material.md) and use it with a Custom Pass, Custom Post Process and Custom Render Target. The sample scene includes prefabs for the following effects: @@ -74,7 +73,7 @@ This sample includes examples on how to create a [Fullscreen Shader](create-a-fu ## Water samples -![](Images/Water_samples.png) +![Water sample scenes. A swimming pool, a glacier with a waterfall, and a small island.](Images/Water_samples.png) The Water samples contain the following scenes you can use to learn about HDRP's [Water](water.md) features: @@ -83,10 +82,12 @@ The Water samples contain the following scenes you can use to learn about HDRP's - Island: Demonstrates waves, foam, and the water excluder. - Rain: Demonstrates how to add pertubations to the normals using shader graph. - Waterline: Demonstrates how to override rendering of the waterline using a [Custom Pass](Custom-Pass.md). +- Cave: Demonstrates how to use the caustics texture in a sphere projection shader using a [Custom Pass](Custom-Pass.md). +- CurrentWithSplines: Demonstrates how to use the Spline package to control current and deformation in realtime. ## Environment samples -![](Images/environment-samples.png) +![A mountaintop viewed at night with a starry sky, and during the day with white clouds.](Images/environment-samples.png) This sample puts multiple environment effects together in the same scene with different lighting conditions. The scene includes examples focusing on the following effects: diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/IES-Importer.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/IES-Importer.md index f0240ece106..ad0b332f612 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/IES-Importer.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/IES-Importer.md @@ -2,8 +2,6 @@ The High Definition Render Pipeline (HDRP) includes an importer to handle the .ies file format. When you add an [IES profile](IES-Profile.md) to your project, the IES importer Inspector provides information and customization options for the internally used textures. -![](Images/IESImporter1.png) - When you apply the import settings, the importer generates a [Light](Light-Component.md) Prefab as a sub-asset of the IED profile. You can drag the Prefab into the Scene view or Hierarchy to create an instance of a Light that uses the IES profile. ### Properties diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/IES-Profile.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/IES-Profile.md index 52b9d088342..04079a82426 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/IES-Profile.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/IES-Profile.md @@ -2,7 +2,7 @@ IES profiles describe how light spreads for a given direction. They are similar to [light cookies](https://docs.unity3d.com/Manual/Cookies.html) in that they use a multiplier mask to achieve this goal. The Unity IES profile supports Point, Spot (Cone, Pyramid, Box), and Area (Rectangular) [Lights](Light-Component.md). -![](Images/HDRPFeatures-IESProfile.png) +![Different types of lights in Unity.](Images/HDRPFeatures-IESProfile.png) The main benefit of using IES profiles over cookies is that light manufacturers provide the profiles. This means that they are physically accurate to the real-world light they represent and also artists do not need to dedicate time authoring them. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/3d-texture-mask-sample.webp b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/3d-texture-mask-sample.webp deleted file mode 100644 index 8f14ce4f4de..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/3d-texture-mask-sample.webp and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Area_Materials.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Area_Materials.png deleted file mode 100644 index edb4211daa0..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Area_Materials.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/ContactShadowLightComponent.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/ContactShadowLightComponent.png deleted file mode 100644 index fc510c9fe3f..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/ContactShadowLightComponent.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Exposure_Histogram.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Exposure_Histogram.png deleted file mode 100644 index 5e79f6802aa..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Exposure_Histogram.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/FS_SampleTex2DArray.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/FS_SampleTex2DArray.png deleted file mode 100644 index 3fff9be2bf7..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/FS_SampleTex2DArray.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/FidelityFX-Menu.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/FidelityFX-Menu.png deleted file mode 100644 index 38938f77323..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/FidelityFX-Menu.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/HDRPFeatures-CustomPass.gif b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/HDRPFeatures-CustomPass.gif deleted file mode 100644 index 62e72392886..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/HDRPFeatures-CustomPass.gif and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/HDSampleBuffer.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/HDSampleBuffer.png deleted file mode 100644 index 42f7f619f25..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/HDSampleBuffer.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/IESImporter1.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/IESImporter1.png deleted file mode 100644 index 6e90fee7e6d..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/IESImporter1.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/LightExplorer.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/LightExplorer.png deleted file mode 100644 index 1051157ae64..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/LightExplorer.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/LightPlacementTool.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/LightPlacementTool.png deleted file mode 100644 index f9cdebde618..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/LightPlacementTool.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingFilmGrain1.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingFilmGrain1.png deleted file mode 100644 index 91c3be7c84d..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingFilmGrain1.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingPaniniProjection1.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingPaniniProjection1.png deleted file mode 100644 index 8b846505d85..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingPaniniProjection1.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingPropagatingNaNsRenderDoc.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingPropagatingNaNsRenderDoc.png deleted file mode 100644 index 5bc2e0501b0..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingPropagatingNaNsRenderDoc.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingShadowsMidtonesHighlights1.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingShadowsMidtonesHighlights1.png deleted file mode 100644 index 2fc2ac87a64..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingShadowsMidtonesHighlights1.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingSplitToning1.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingSplitToning1.png deleted file mode 100644 index 606a3505e58..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingSplitToning1.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingWhiteBalance1.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingWhiteBalance1.png deleted file mode 100644 index ee776368763..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Post-processingWhiteBalance1.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Shadows1.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Shadows1.png deleted file mode 100644 index a5c98a79aef..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/Shadows1.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/SpecularOcclusion.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/SpecularOcclusion.png deleted file mode 100644 index 09292819719..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/SpecularOcclusion.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/UseMipBias.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/UseMipBias.png deleted file mode 100644 index a4b18e2e3de..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/UseMipBias.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/about-blending-modes.webp b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/about-blending-modes.webp deleted file mode 100644 index 5cff49c8633..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/about-blending-modes.webp and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/cloudy-sample.webp b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/cloudy-sample.webp deleted file mode 100644 index 105627ccf23..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/cloudy-sample.webp and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/environment-plane-settings.jpg b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/environment-plane-settings.jpg deleted file mode 100644 index 618b2938bab..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/environment-plane-settings.jpg and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/foggy-orb-and-light-sample.webp b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/foggy-orb-and-light-sample.webp deleted file mode 100644 index 376ac79afeb..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/foggy-orb-and-light-sample.webp and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/fumes-sample.webp b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/fumes-sample.webp deleted file mode 100644 index c393039b8f1..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/fumes-sample.webp and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/ghost-beast.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/ghost-beast.png deleted file mode 100644 index 7df7f6f2371..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/ghost-beast.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/gpu-occlusion-culling-ux.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/gpu-occlusion-culling-ux.png deleted file mode 100644 index 5e8961322c1..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/gpu-occlusion-culling-ux.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/ground-smoke-prefab-sample.webp b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/ground-smoke-prefab-sample.webp deleted file mode 100644 index 6fdf63202fa..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/ground-smoke-prefab-sample.webp and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/procedural-noise-fog-sample.webp b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/procedural-noise-fog-sample.webp deleted file mode 100644 index 61ddf66e268..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/procedural-noise-fog-sample.webp and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/samples-materials.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/samples-materials.png deleted file mode 100644 index 845b9093e53..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/samples-materials.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lensflare-ring.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lensflare-ring.png deleted file mode 100644 index a0d7757d38f..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lensflare-ring.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/stp-comparison.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/stp-comparison.png deleted file mode 100644 index 92fbd5ac96c..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/stp-comparison.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/stp-upscaler-ux.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/stp-upscaler-ux.png deleted file mode 100644 index 840084b3de8..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/stp-upscaler-ux.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/visualenvironment-renderingspace.png b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/visualenvironment-renderingspace.png deleted file mode 100644 index 5c1abfd746b..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/visualenvironment-renderingspace.png and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/volumetric-fog-samples.webp b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/volumetric-fog-samples.webp deleted file mode 100644 index c17f1324be3..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/volumetric-fog-samples.webp and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/volumetric-heart-sample.webp b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/volumetric-heart-sample.webp deleted file mode 100644 index a3b0c2ed5db..00000000000 Binary files a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Images/volumetric-heart-sample.webp and /dev/null differ diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/LUT-Authoring-Photoshop.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/LUT-Authoring-Photoshop.md index 22eb8c6ff26..e4150c5cf68 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/LUT-Authoring-Photoshop.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/LUT-Authoring-Photoshop.md @@ -23,7 +23,7 @@ Export the current [Camera](hdrp-camera-component-reference.md)'s view to a log- After you export the EXR file, transform the data from the format that Unity uses (Alexa LogC El.1000) to Linear RGB space, so that external software can use it. To do this, HDRP provides a set of ready-to-use transform LUTs. To get them: -1. Open the Package Manager window (menu: **Window** > **Package Manager**). +1. Open the Package Manager window (menu: **Window** > **Package Management** > **Package Manager**). 2. Select **High Definition RP** from the list of packages on the left. 3. In the **Samples** section, select **Import into Project** next to **Additional Post-processing Data**. 4. This imports the LUTs into Assets/HDRP Sample Content/Post-processing/Cube LUTs/. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/LUT-Authoring-Resolve.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/LUT-Authoring-Resolve.md index 5a2c67d720d..c8615a98eec 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/LUT-Authoring-Resolve.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/LUT-Authoring-Resolve.md @@ -23,7 +23,7 @@ Export the current [Camera](hdrp-camera-component-reference.md)'s view to a log- After you export the EXR file, transform the data from the format that Unity uses (Alexa LogC El.1000) to Linear RGB space, so that external software can use it. To do this, HDRP provides a set of ready-to-use transform LUTs. To get them: -1. Open the Package Manager window (menu: **Window > Package Manager**). +1. Open the Package Manager window (menu: **Window** > **Package Management** > **Package Manager**). 2. Select **High Definition RP** from the list of packages on the left. 3. In the **Samples** section, select **Import into Project** next to **Additional Post-processing Data**. 4. This imports the LUTs into Assets/HDRP Sample Content/Post-processing/Cube LUTs/. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md index 1f9c4d3077e..6ed657b6865 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Light-Component.md @@ -2,7 +2,7 @@ Use the Light component to create light sources in your [Scene](https://docs.unity3d.com/Manual/CreatingScenes.html). The Light component controls the shape, color, and intensity of the light. It also controls whether or not the Light casts shadows in your Scene, and more advanced settings. -![](Images/HDRPFeatures-LightTypes.png) +![Lights in a scene.](Images/HDRPFeatures-LightTypes.png) ## Create Lights diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Mask-Map-and-Detail-Map.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Mask-Map-and-Detail-Map.md index 87261c9b382..01a7714da8b 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Mask-Map-and-Detail-Map.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Mask-Map-and-Detail-Map.md @@ -26,7 +26,7 @@ To create a mask map, create a linear composited map in a photo editor, using th The following example image demonstrates the individual components of a full mask map. -![](Images/MaskMapAndDetailMap2.png) +![A full mask map, with the metallic texture in the R channel, the ambient occlusion texture in the G channel, the detail mask in the B channel, and the smoothness in the A channel.](Images/MaskMapAndDetailMap2.png) @@ -45,7 +45,7 @@ To create a detail map, create a linear composited map in a photo editor, using The following example image demonstrates the individual components of a full detail map. -![](Images/MaskMapAndDetailMap3.png) +![A full detail map, with the desaturated albedo texture in the R channel, the red channel of the normal map in the G channel, the green channel of the normal map in the A channel, and smoothness in the B channel.](Images/MaskMapAndDetailMap3.png) ### Desaturated albedo (red channel) @@ -53,7 +53,7 @@ The red channel represents the albedo variation. It makes the underlying materia The image below shows the impact of the detail albedo on the final color. HDRP calculates color interpolation in sRGB space. -![](Images/DetailMap-red.png) +![A red material with a gradient detail map. When Detail Albedo Scale is 1, the two textures create a smooth red gradient. When Detail Albedo Scale is 2, the gradient is banded.](Images/DetailMap-red.png) ### Smoothness (blue channel) @@ -61,8 +61,8 @@ The blue channel represents the smoothness variation and HDRP calculates it the The image below shows the impact of the detail smoothness on the final color. -![](Images/DetailMap-blue.png) +![A material of smoothness 0.5 with a gradient detail map. When Detail Smoothness Scale is 1, the two textures create a smoothness gradient. When Detail Smoothness Scale is 2, the gradient transitions faster.](Images/DetailMap-blue.png) The following example shows the same gradient detail map as above, used by three Lit materials with different smoothness values. -![](Images/DetailMap-smoothness.png) +![Three squares with smoothness values of 0, 0.5, and 1.0. As the smoothness value increases, more of the right side of the square reflects the scene.](Images/DetailMap-smoothness.png) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Material-Type.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Material-Type.md index e67490f389f..5d64aec6bc8 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Material-Type.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Material-Type.md @@ -11,7 +11,7 @@ The **Material Type** property allows you to give your Material a type, which al | **Specular Color** | Applies the Specular Color workflow to the Material. Use this **Material Type** to create Materials with a coloured specular highlight. This is similar to the [built-in Specular Shader](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterSpecular.html). | | **Translucent** | Applies the Translucent workflow to the Material. Use this **Material Type**, and a thickness map, to simulate a translucent object, such as a plant leaf. In contrast to **Subsurface Scattering** Materials, **Translucent** Materials do not blur light that transmits through the Material. | -![](Images/MaterialType1.png) +![A detailed dragon statuette, rendered three times. The first dragon is iridescent, the second is a translucent green material, and the third has subsurface scattering.](Images/MaterialType1.png) ## Properties diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Diffusion-Profile.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Diffusion-Profile.md index 0887d6e17e4..a298604ce70 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Diffusion-Profile.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Diffusion-Profile.md @@ -13,8 +13,6 @@ To add a **Diffusion Profile List** to a Volume: ## Properties -![](Images\Override-DiffusionProfile1.png) - [!include[](snippets/Volume-Override-Enable-Properties.md)] | **Property** | **Description** | diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Micro-Shadows.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Micro-Shadows.md index 08f2193adc2..83b9a762734 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Micro-Shadows.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Micro-Shadows.md @@ -6,7 +6,7 @@ HDRP uses the details from the normal map, the ambient occlusion map, and specul In this image, the different layers of details in the Material shadow each other. -![](Images/OverrideMicroShadows1.png) +![A ground texture with micro shadows enabled and disabled. With micro shadows enabled, the twigs and moss cast more realistic-looking shadows.](Images/OverrideMicroShadows1.png) Micro shadows at 0.85 opacity on a mossy ground material viewed from the top. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-Refraction.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-Refraction.md index efc30f774dd..0c58e032397 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-Refraction.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-Refraction.md @@ -15,7 +15,7 @@ To use this setting, you must enable it on a [Volume](understand-volumes.md), as 1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component. 2. In the Inspector for this object, select **Add Override** > **Lighting** > **Screen Space Refraction**. -![](Images/screen-weight-distance.png)
+![Comparison image of two outdoor scenes. In the first image, a refraction effect is visible. In the second image, the colours appear normal.](Images/screen-weight-distance.png)
In the refractive cube on the left of the screen, **Screen Weight Distance** affects the edges of the screen where HDRP fades from using the color buffer to using Reflection Probes. ## Properties diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Physical-Light-Units.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Physical-Light-Units.md index 015b5a03685..4bfc60aabac 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Physical-Light-Units.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Physical-Light-Units.md @@ -2,7 +2,7 @@ HDRP uses Physical Light Units (PLU) for its lighting. These units are based on real-life light measurements, like those you see on light bulb packaging or a photographic light meter. Note that for lights to behave properly when using PLU, you need to respect HDRP unit convention (1 Unity unit equals 1 meter). -![](Images/HDRPTemplate-Banner1.png) +![A room with lights.](Images/HDRPTemplate-Banner1.png) ## Units diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Bloom.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Bloom.md index 883fbf51554..bef26203b0b 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Bloom.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Bloom.md @@ -48,7 +48,7 @@ Bloom includes [advanced properties](https://docs.unity3d.com/Packages/com.unity From 2019.3, HDRP provides [lookup textures](Authoring-LUTs.md) that you can use to customize this effect. These lookup textures are for the **Texture** property in the **Lens Dirt** section. To add these Textures to your Unity Project, you must use the Package Manager: -1. Go to **Window** > **Package Manager**. +1. Go to **Window** > **Package Management** > **Package Manager**. 2. In the **Packages** window, select **High Definition RP**. 3. In the **High Definition RP** section, go to **Additional Post-processing Data** and select **Import into Project**. 4. The Textures that are relevant to Bloom are in the **Lens Dirt** folder, so if you only want the lookup Textures for Bloom, only import the contents of the **Lens Dirt** folder. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Chromatic-Aberration.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Chromatic-Aberration.md index d6fd32134f9..6a450a4c94f 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Chromatic-Aberration.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Chromatic-Aberration.md @@ -26,7 +26,7 @@ For more information on the Chromatic Aberration effect, see the [Chromatic Aber From 2019.3, HDRP provides lookup Textures that you can use to customize this effect. These lookup Textures are for the **Spectral Lut** property. To add these Textures to your Unity Project, you must use the Package Manager: -1. Select **Window** > **Package Manager**. +1. Select **Window** > **Package Management** > **Package Manager**. 2. In the **Packages** window, select **High Definition RP**. 3. In the **High Definition RP** section, go to **Additional Post-processing Data** and select **Import into Project**. 4. The Textures that are relevant to Chromatic Aberration are in the **Spectral LUTs** folder, so if you only want the lookup Textures for Chromatic Aberration, only import the contents of the **Spectral LUTs** folder. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Depth-of-Field.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Depth-of-Field.md index de6ba424ce8..cb3ce675995 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Depth-of-Field.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Depth-of-Field.md @@ -17,9 +17,9 @@ Depth Of Field includes [advanced properties](https://docs.unity3d.com/Packages/ ## Properties | **Property** | **Description** | -| ------------------ | ------------------------------------------------------------ | -| **Focus Mode** | Use the drop-down to select the mode that HDRP uses to set the focus for the depth of field effect.
• **Off**: Select this option to disable depth of field.
• **Physical Camera**: Select this option to use the physical [Camera](hdrp-camera-component-reference.md) to set focusing properties for the depth of field effect. For information on what Camera properties affect depth of field, see [Physical Camera settings](#PhysicalCameraSettings).
• **Manual Ranges**: Select this option to use custom values to set the near and far range of the depth of field effect. | -| **Focus Distance Mode** | Use the drop-down to select where the focus distance is specified.
• **Volume**: Reads the focus distance from the Volume.
• **Camera**: Reads the focus distance from the physical camera.
This property only appears when you select **Physical Camera** from the **Focus Mode** drop-down. | +|-|-| +| **Focus Mode** | Use the drop-down to select the mode that HDRP uses to set the focus for the depth of field effect. The options are:
  • **Off**: Select this option to disable depth of field.
  • **Physical Camera**: Select this option to use the physical [Camera](hdrp-camera-component-reference.md) to set focusing properties for the depth of field effect. For more information about what Camera properties affect depth of field, refer to [Physical Camera settings](#PhysicalCameraSettings).
  • **Manual Ranges**: Select this option to use custom values to set the near and far range of the depth of field effect.
| +| **Focus Distance Mode** | Use the drop-down to select where the focus distance is specified. The options are:
  • **Volume**: Reads the focus distance from the Volume.
  • **Camera**: Reads the focus distance from the physical camera.
This property only appears when you select **Physical Camera** from the **Focus Mode** drop-down. | | **Focus Distance** | Set the distance to the focus plane from the Camera.
This property only appears when you select **Volume** from the **Distance Mode** drop-down. | ### Near Blur @@ -52,12 +52,12 @@ Here is a list of the physical [Camera](hdrp-camera-component-reference.md) prop | **Blades Count** | This determines the shape of the bokeh. For more information on the effect this property has, see the example below. | | **Curvature** | Determines how much of the blades are visible. Use this to change the roundness of bokeh in the blur. For more information on the effect this property has, see the example below. | -This example shows how the **Blade Count** and **Curvature** properties affect the shape of the bokeh: +![This example shows how the **Blade Count** and **Curvature** properties affect the shape of the bokeh. On the left side, there's a five blade iris that's slightly open, producing a pentagonal bokeh. On the right side, there's a five blade iris that's wide open, producing a circular bokeh.](Images/Post-ProcessingDepthofField2.png) -* On the left side, there is a five blade iris that's slightly open; producing a pentagonal bokeh. -* On the right side, there is a five blade iris that's wide open; producing a circular bokeh. +This example shows how the **Blade Count** and **Curvature** properties affect the shape of the bokeh: -![](Images/Post-ProcessingDepthofField2.png) +* On the left side, there is a five blade iris that's slightly open, producing a pentagonal bokeh. +* On the right side, there is a five blade iris that's wide open, producing a circular bokeh. ## Path-traced depth of field @@ -67,4 +67,4 @@ Path-traced depth of field produces images without any artifacts, apart from noi HDRP computes path-traced depth of field at full resolution and ignores any quality settings from the Volume. -![](Images/Path-traced-DoF.png) +![Two paint pots with a depth of field effect that makes surfaces increasingly blurry towards and away from the camera.](Images/Path-traced-DoF.png) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Film-Grain.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Film-Grain.md index 031c2f97e4c..55bd102f059 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Film-Grain.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Film-Grain.md @@ -13,8 +13,6 @@ The Film Grain effect simulates the random optical texture of photographic film, ## Properties -![](Images/Post-processingFilmGrain1.png) - | **Property** | **Description** | | ------------- | ------------------------------------------------------------ | | **Type** | Use the drop-down to select the type of grain to use. You can select from a list of presets that HDRP includes, or select **Custom** to provide your own grain Texture. | diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Main.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Main.md index d993c49c8ad..ed64fc4af5b 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Main.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Main.md @@ -8,8 +8,8 @@ Post-processing effects in HDRP use the [Volume](understand-volumes.md) framewor The images below display a Scene with and without HDRP post-processing. -![](Images/PostProcessingMain1.png) +![A scene of a human without post-processing effects.](Images/PostProcessingMain1.png) Without post-processing. -![](Images/PostProcessingMain2.png) +![A scene of a human with post-processing effects.](Images/PostProcessingMain2.png) With post-processing. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Panini-Projection.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Panini-Projection.md index f6d31c9823e..a78340e5f73 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Panini-Projection.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Panini-Projection.md @@ -15,8 +15,6 @@ For more information about panini projection, see PanoTools’ wiki documentatio ## Properties -![](Images/Post-processingPaniniProjection1.png) - | **Property** | **Description** | | --------------- | ------------------------------------------------------------ | | **Distance** | Use the slider to set the strength of the distortion. | diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Propagating-NaNs.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Propagating-NaNs.md index 0b3f1cc5055..b13ea80a0ee 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Propagating-NaNs.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Propagating-NaNs.md @@ -18,13 +18,13 @@ A commonly reported issue in HDRP is that [bloom](Post-Processing-Bloom.md) gene For example, see a NaN caused by a material issue that spreads to the whole scene when HDRP calculates bloom: -![](Images/Post-processingPropagatingNaNsExample1.png) +![A small black dot is visible on a sphere.](Images/Post-processingPropagatingNaNsExample1.png) -![](Images/Post-processingPropagatingNaNsExample2.png) +![A black square is visible on a sphere.](Images/Post-processingPropagatingNaNsExample2.png) -![](Images/Post-processingPropagatingNaNsExample3.png) +![A large black square is visible on a sphere.](Images/Post-processingPropagatingNaNsExample3.png) -![](Images/Post-processingPropagatingNaNsExample4.png) +![The entire screen is black and the sphere is no longer visible.](Images/Post-processingPropagatingNaNsExample4.png) A similar issue occurs when HDRP generates color pyramids for use by features such as [screen-space reflection](Override-Screen-Space-Reflection.md), [screen-space refraction](Override-Screen-Space-Refraction.md), and distortion. @@ -57,9 +57,6 @@ After you capture a frame, RenderDoc can display pixels with a Nan or Inf value 1. In the Texture Viewer, open the **Overlay** drop-down. 2. Select **Nan or Inf/-ve Display**. -![](Images/Post-processingPropagatingNaNsRenderDoc.png) - - If the Nan or Inf values are still difficult to find: 1. Look at the bloom dispatches to see where bloom propagates the Nan or Inf pixels from. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Shadows-Midtones-Highlights.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Shadows-Midtones-Highlights.md index f29971137bc..8df8f634438 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Shadows-Midtones-Highlights.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Shadows-Midtones-Highlights.md @@ -13,8 +13,6 @@ The **Shadows Midtones Highlights** effect separately controls the shadows, midt ## Properties -![](Images/Post-processingShadowsMidtonesHighlights1.png) - | **Property** | **Description** | | -------------- | ------------------------------------------------------------ | | **Shadows** | Use this to control the shadows. Use the trackball to select the color HDRP should shift the hue of the shadows to. Use the slider to offset the color lightness of the trackball color. | diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Split-Toning.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Split-Toning.md index efd0ad51a63..e2814023d5d 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Split-Toning.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-Split-Toning.md @@ -15,8 +15,6 @@ This effect tints different areas of the image based on luminance values, to hel When you adjust the color in the color picker for each property, you should only adjust the **Hue** and **Saturation**. **Value** also changes the overall image brightness. -![](Images/Post-processingSplitToning1.png) - | **Property** | **Description** | | -------------- | ------------------------------------------------------------ | | **Shadows** | Use the color picker to select the color that HDRP uses for tinting shadows. | diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-White-Balance.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-White-Balance.md index 68a99d0a738..bc3de908af3 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-White-Balance.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Post-Processing-White-Balance.md @@ -13,8 +13,6 @@ The White Balance component applies a white balance effect that removes unrealis ## Properties -![](Images/Post-processingWhiteBalance1.png) - | **Property** | **Description** | | --------------- | ------------------------------------------------------------ | | **Temperature** | Use the slider to set the white balance to a custom color temperature. Higher values result in a warmer color temperature and lower values result in a colder color temperature. See [Wikipedia: Color balance](https://en.wikipedia.org/wiki/Color_balance) for more information about color temperature. | diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Contact-Shadows.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Contact-Shadows.md index e15d5faf8a8..8a4d3965c84 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Contact-Shadows.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Contact-Shadows.md @@ -2,17 +2,14 @@ Ray-Traced Contact Shadows is a ray tracing feature in the High Definition Render Pipeline (HDRP). It's an alternative to HDRP's [Contact Shadow](Override-Contact-Shadows.md) technique that uses a more accurate ray-traced solution that can use off-screen data. -![](Images/RayTracedContactShadow1.png) +![A stone temple scene without contact shadows. Foliage and dark corners have few shadows.](Images/RayTracedContactShadow1.png)
+A stone temple scene without contact shadows. Foliage and dark corners have few shadows. -**Without Contact shadows** +![A stone temple scene with contact shadows. Foliage and dark corners have more shadows.](Images/RayTracedContactShadow2.png)
+A stone temple scene with contact shadows. Foliage and dark corners have more shadows. -![](Images/RayTracedContactShadow2.png) - -**Contact shadows** - -![](Images/RayTracedContactShadow3.png) - -**Ray-traced contact shadows** +![A stone temple scene with ray-traced contact shadows. Foliage and dark corners have even more shadows.](Images/RayTracedContactShadow3.png)
+A stone temple scene with ray-traced contact shadows. Foliage and dark corners have even more shadows. For information about ray tracing in HDRP, and how to set up your HDRP Project to support ray tracing, see [Getting started with ray tracing](Ray-Tracing-Getting-Started.md). @@ -27,5 +24,3 @@ This feature is an alternative to the [Contact Shadows](Override-Contact-Shadows 3. HDRP calculates ray-traced contact shadows on a per-light basis. This means you need to enable it for each light. 4. Select a [Light](Light-Component.md) and, in the Inspector, go to **Shadows > Contact Shadows** and tick the **Enable** checkbox. This exposes the **Ray Tracing** property. 5. Enable the **Ray Tracing** checkbox. - -![](Images/ContactShadowLightComponent.png) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Shadows.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Shadows.md index 844eaa469be..ae7bc9b52a9 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Shadows.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Shadows.md @@ -41,29 +41,29 @@ If a light is has **Shadowmask Mode** set to **Shadowmask**, then ray traced sha Ray-traced shadows offer an alternative to the cascade shadow map that Directional Lights use for opaque GameObjects. -![](Images/RayTracedShadows1.png) +![A scene with a Directional Light cascade shadow map.](Images/RayTracedShadows1.png) -**Directional Light cascade shadow map** +Directional Light cascade shadow map -![](Images/RayTracedShadows2.png) +![A scene with a Directional Light cascade shadow map, where the Sun Angle is 0. The shadow details are sharp and visible.](Images/RayTracedShadows2.png) -**Ray-traced Directional Light shadows (Sun Angle = 0)** +Ray-traced Directional Light shadows (Sun Angle = 0) -![](Images/RayTracedShadows3.png) +![A scene with a Directional Light cascade shadow map, where the Sun Angle is 0.53 which is the angle of the Sun as seen from Earth. The shadows are visible and the details are faint.](Images/RayTracedShadows3.png) -**Ray-traced Directional Light shadows (Sun Angle = 0.53, the angle of the Sun as seen from Earth)** +Ray-traced Directional Light shadows (Sun Angle = 0.53, the angle of the Sun as seen from Earth) Ray-traced shadows allow for transparent and transmissive GameObjects, lit by Directional Lights, to cast colored shadows. **Note**: When you use a Directional Light with a transmissive GameObject, HDRP displays rasterized shadows on the reverse side of the GameObject. -![](Images/RayTracedShadows9.png) +![Three different colored GameObjects with ray traced Directional Light colored shadows of the corresponding colors.](Images/RayTracedShadows9.png) -**Ray-traced Directional Light shadows with colored shadows** +Ray-traced Directional Light shadows with colored shadows -![](Images/RayTracedShadows10.png) +![Three different colored GameObjects with ray traced Directional Light shadows. All the shadows are the same color.](Images/RayTracedShadows10.png) -**Ray-traced Directional Light shadows without colored shadows** +Ray-traced Directional Light shadows without colored shadows ### Properties @@ -81,27 +81,27 @@ Ray-traced shadows allow for transparent and transmissive GameObjects, lit by Di Ray-traced shadows offer an alternative to the shadow map that Point and Spot Lights use for opaque GameObjects. HDRP still evaluates the lighting of a Point Light as coming from a single point in space (the light is [punctual](Glossary.md#punctual-lights)), but it evaluates the shadowing as if the light was coming from the surface of a sphere. On the other side, HDRP evaluates the lighting of a Spot Light as coming from a single point in space, but it evaluates the shadowing as if the light was coming from the surface of a cone. -![](Images/RayTracedShadows4.png) +![An outdoor scene of a wall and trees, with a Point Light shadow map.](Images/RayTracedShadows4.png) -**Point Light shadow map** +Point Light shadow map -![](Images/RayTracedShadows5.png) +![An outdoor scene of a wall and trees, with ray traced Point Light shadows of a radius of 0.001m. The shadows of the trees are sharp and visible on the wall.](Images/RayTracedShadows5.png) -**Ray-traced Point Light shadows (Radius = 0.001m)** +Ray-traced Point Light shadows (Radius = 0.001m) -![](Images/RayTracedShadows6.png) +![An outdoor scene of a wall and trees, with ray traced Point Light shadows of a radius of 0.05m. The shadows of the trees are no longer visible on the wall.](Images/RayTracedShadows6.png) -**Ray-traced Point Light shadows (radius = 0.5m)** +Ray-traced Point Light shadows (radius = 0.5m) Ray-traced shadows offer the possibility of semi-transparent shadows for Point Lights cast by transparent and transmissive GameObjects. -![](Images/RayTracedShadows11.png) +![Three different colored GameObjects with ray traced Point Light semi-transparent shadows.](Images/RayTracedShadows11.png) -**Ray-traced Point Light shadows with semi-transparent shadows** +Ray-traced Point Light shadows with semi-transparent shadows -![](Images/RayTracedShadows12.png) +![Three different colored GameObjects with ray traced Point Light shadows that aren't semi-transparent.](Images/RayTracedShadows12.png) -**Ray-traced Point Light shadows without semi-transparent shadows** +Ray-traced Point Light shadows without semi-transparent shadows ### Properties @@ -120,11 +120,11 @@ Ray-traced shadows offer the possibility of semi-transparent shadows for Point L Ray-traced shadows offer an alternative to the [exponential variance shadow map](Glossary.md#ExponentialVarianceShadowMap) that Rectangle Lights use for opaque GameObjects. -![](Images/RayTracedShadows7.png) -**Rectangle Light shadow map** +![An outdoor scene with a Rectangle Light shadow map.](Images/RayTracedShadows7.png) +Rectangle Light shadow map -![](Images/RayTracedShadows8.png) -**Ray-traced Rectangle Light shadows** +![An outdoor scene with ray-traced Rectangle Light shadows.](Images/RayTracedShadows8.png) +Ray-traced Rectangle Light shadows **Note**: When rendering in [deferred mode](Forward-And-Deferred-Rendering.md), HDRP provides accurate ray-traced area light shadows for the [Lit](lit-material.md) shader. When HDRP renders for any other shader, or for the Lit shader in forward mode, it uses an approximation to calculate ray-traced shadows for area lights. This approximation is not perfectly accurate, but does produce plausible results. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Subsurface-Scattering.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Subsurface-Scattering.md index ec3161f2a3e..8ceda085788 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Subsurface-Scattering.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Traced-Subsurface-Scattering.md @@ -2,9 +2,9 @@ Ray-Traced Subsurface Scattering is a ray tracing feature in the High Definition Render Pipeline (HDRP). It is an alternative, more accurate, ray-traced solution to [Subsurface-Scattering](skin-and-diffusive-surfaces-subsurface-scattering.md) that can make use of off screen data. -![](Images/RayTracedSubsurfaceScattering.png) +![A head rendered with ray traced subsurface scattering.](Images/RayTracedSubsurfaceScattering.png) -**Perry head rendered with ray traced subsurface scattering** +A head rendered with ray traced subsurface scattering. ## Using ray traced subsurface scattering diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Debug.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Debug.md index d737beb33ba..19905b29040 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Debug.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Debug.md @@ -6,67 +6,25 @@ The High Definition Render Pipeline (HDRP) includes the [Rendering Debugger wind 2. Select the **Lighting** panel. 3. Use the **Fullscreen Debug Mode** drop-down menu to select which ray tracing effect to debug. -![](Images/RayTracingLightCluster1.png) +![Light Cluster Debug Mode: The color shows the number of lights in each cell of the cluster.](Images/RayTracingLightCluster1.png) -**Light Cluster [Debug Mode](Ray-Tracing-Debug.md#debug-modes)**: The color shows the number of lights in each cell of the cluster. +**Light Cluster Debug Mode**: The color shows the number of lights in each cell of the cluster. -![](Images/RayTracingDebugRTAS.png) +![Ray Tracing Acceleration Structure Debug Mode: This debug mode displays the GameObjects HDRP uses to compute specific ray traced effects.](Images/RayTracingDebugRTAS.png) -**Ray Tracing Acceleration Structure [Debug Mode](Ray-Tracing-Debug.md#debug-modes)**: This debug mode displays the GameObjects HDRP uses to compute specific ray traced effects. +**Ray Tracing Acceleration Structure Debug Mode**: This debug mode displays the GameObjects HDRP uses to compute specific ray traced effects. ## Debug modes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Fullscreen Debug ModeDescription
Screen Space Ambient OcclusionWhen Ray-Traced Ambient Occlusion is active, this displays the screen space buffer that holds the ambient occlusion.
Screen Space ReflectionWhen Ray-Traced Reflections are active, this displays the ray-traced reflections.
Transparent Screen Space ReflectionWhen Ray-Traced Reflections are active, this displays the ray-traced reflections on transparent objects.
Contact ShadowsWhen Ray-Traced Contact Shadows are active, this displays the ray-traced contact shadows.
Screen Space ShadowsWhen screen space shadows are active, this displays the set of screen space shadows. If you select this option, Unity exposes the Screen Space Shadow Index slider that allows you to change the currently active shadows. Area lights shadows take two channels.
Screen Space Global IlluminationWhen Ray-Traced Global Illumination is active, this displays a screen space buffer that holds the indirect diffuse lighting.
Recursive Ray-TracingWhen Recursive Ray Tracing is active, this displays the pixels that have been evaluated using the effect.
Ray-Traced Subsurface ScatteringWhen Ray-Traced Subsurface Scattering is active, this displays the subsurface lighting value for the pixels that have been evaluated using the technique.
Light ClusterThis displays the light cluster with the color that varies by the number of the lights in each cell. The red color indicates that the number of lights is over 12 or equal to the maximum number of lights per cell.
Light CategoryUse the drop-down to visualize the number of the lights in the selected light catetgory.
Ray Tracing Acceleration StructureThis mode displays the GameObjects included in the ray tracing acceleration structure for the following effects:
  • Shadows
  • Ambient Occlusion
  • Global Illumination
  • Reflections
  • Recursive Rendering
  • Path Tracer
HDRP only builds the acceleration structure when you activate the effect you select in this mode, otherwise the debug view is black.
This mode has the following visualization options:
  • InstanceID: Assigns a color randomly based on the GameObject's InstanceID.
  • PrimitiveID: Assigns a color randomly based on the GameObject's PrimitiveID.
+| **Fullscreen Debug Mode** | **Description** | +|---|---| +| **Screen Space Ambient Occlusion** | When Ray-Traced Ambient Occlusion is active, this displays the screen space buffer that holds the ambient occlusion. | +| **Screen Space Reflection** | When Ray-Traced Reflections are active, this displays the ray-traced reflections. | +| **Transparent Screen Space Reflection** | When Ray-Traced Reflections are active, this displays the ray-traced reflections on transparent objects. | +| **Contact Shadows** | When Ray-Traced Contact Shadows are active, this displays the ray-traced contact shadows. | +| **Screen Space Shadows** | When screen space shadows are active, this displays the set of screen space shadows. If you select this option, Unity exposes the Screen Space Shadow Index slider that allows you to change the currently active shadows. Area lights shadows take two channels. | +| **Screen Space Global Illumination** | When Ray-Traced Global Illumination is active, this displays a screen space buffer that holds the indirect diffuse lighting. | +| **Recursive Ray-Tracing** | When Recursive Ray Tracing is active, this displays the pixels that have been evaluated using the effect. | +| **Ray-Traced Subsurface Scattering** | When Ray-Traced Subsurface Scattering is active, this displays the subsurface lighting value for the pixels that have been evaluated using the technique. | +| **Light Cluster** | This displays the light cluster with the color that varies by the number of the lights in each cell. The red color indicates that the number of lights is over 12 or equal to the maximum number of lights per cell.
  • **Light Category**: Use the drop-down to visualize the number of the lights in the selected light category.
| +| **Ray Tracing Acceleration Structure** | This mode displays the GameObjects included in the ray tracing acceleration structure for the following effects:
  • Shadows
  • Ambient Occlusion
  • Global Illumination
  • Reflections
  • Recursive Rendering
  • Path Tracer
HDRP only builds the acceleration structure when you activate the effect you select in this mode, otherwise the debug view is black. This mode has the following visualization options:
  • InstanceID: Assigns a color randomly based on the GameObject's InstanceID.
  • PrimitiveID: Assigns a color randomly based on the GameObject's PrimitiveID.
| diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md index ce88fca281c..95df44b565b 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md @@ -200,7 +200,6 @@ HDRP ray tracing in Unity isn't compatible with the following features: - Vertex animation, for example wind deformation of vegetation. - [Decals](decals.md). - Ray tracing is not compatible with the detail meshes and trees in the [Terrain system](https://docs.unity3d.com/Manual/script-Terrain.html). It is compatible with terrain geometry. To include detailed meshes and trees in ray traced reflections, use [mixed tracing](Override-Screen-Space-Reflection.md#mixed-tracing). -- Box-shaped spot lights. - Volumetric [fog](create-a-local-fog-effect.md). - [Tessellation](Tessellation.md). - Per-pixel displacement techniques such as parallax occlusion mapping, depth offset, and non-terrain height maps. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe.md index b5bda4e0cb7..65198ce07fe 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probe.md @@ -86,7 +86,7 @@ You can use Scene view gizmos to visually customize specific properties. | **Gizmo** | **Property** | **Description** | | ------------------------------------------------------------ | ----------------------------------- | ------------------------------------------------------------ | -| ![](Images/ReflectionProbeGizmo1.png) | **Influence Volume boundary**. | Provides Scene view handles that allow you to resize the boundaries of the [Influence Volume](#InfluenceVolume), which defines the area this Reflection Probe affects reflective Materials. Edits the **Box Size** or **Radius** value, depending on the **Shape** you select. | -| ![](Images/ReflectionProbeGizmo2.png) | **Blend Distance boundary**. | Provides Scene view handles that allows you to alter the inward distance from the **Box Size** or **Radius** at which this Reflection Probe blends with other Reflection Probes. Its behavior depends on the [workflow mode](#Workflows) you are using. It scales all sides equally in **Normal** mode, scales just the side with the handle you control in **Advanced** mode. | -| ![](Images/ReflectionProbeGizmo3.png) | **Blend Normal Distance boundary**. | Provides Scene view handles that allow you to resize the boundary where pixels with a normal pointing away from the **Capture Position** don’t receive any influence from this Probe. | -| ![](Images/ReflectionProbeGizmo4.png) | **Capture Position**. | Changes the behavior of the Move Tool so that it alters the **Capture Position** property, rather than the **Position** of the **Transform**. | +| ![Influence Volume boundary](Images/ReflectionProbeGizmo1.png) | **Influence Volume boundary**. | Provides Scene view handles that allow you to resize the boundaries of the [Influence Volume](#InfluenceVolume), which defines the area this Reflection Probe affects reflective Materials. Edits the **Box Size** or **Radius** value, depending on the **Shape** you select. | +| ![Blend Distance boundary](Images/ReflectionProbeGizmo2.png) | **Blend Distance boundary**. | Provides Scene view handles that allows you to alter the inward distance from the **Box Size** or **Radius** at which this Reflection Probe blends with other Reflection Probes. Its behavior depends on the [workflow mode](#Workflows) you are using. It scales all sides equally in **Normal** mode, scales just the side with the handle you control in **Advanced** mode. | +| ![Blend Normal Distance boundary](Images/ReflectionProbeGizmo3.png) | **Blend Normal Distance boundary**. | Provides Scene view handles that allow you to resize the boundary where pixels with a normal pointing away from the **Capture Position** don’t receive any influence from this Probe. | +| ![Capture Position](Images/ReflectionProbeGizmo4.png) | **Capture Position**. | Changes the behavior of the Move Tool so that it alters the **Capture Position** property, rather than the **Position** of the **Transform**. | diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md index 2ea362da080..041cba7a2dc 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Reflection-Probes-Intro.md @@ -7,7 +7,7 @@ The High Definition Render Pipeline (HDRP) allows you to use two different Refle - [Reflection Probes](Reflection-Probe.md) captures a view of its surroundings in all directions and stores the result as a cubemap, similar to the Reflection Probe in built-in render pipeline. - [Planar Reflection Probes](Planar-Reflection-Probe.md) captures a view in a direction calculated from a reflection of the Camera’s position and rotation, then stores the result in a 2D RenderTexture. By default, the reflected Camera calculates its field of view by setting the center of its projection to the Probe’s **Mirror Position**, and then expands it until it includes the Probe’s **Influence Volume**, as shown here: -![](Images/ReflectionProbeIntro1.png) +![A diagram that represents the Camera, the Planar Reflection Probe, the capture area, and the reflected Camera. The reflected Camera has the same field of view angle as the Camera.](Images/ReflectionProbeIntro1.png) For more information about how to use the reflection probe, see [Use reflection probes](Reflection-Probe-Usage.md). diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Rendering-Layers.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Rendering-Layers.md index b1a2d7f9475..20ccc91d1ea 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Rendering-Layers.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Rendering-Layers.md @@ -5,7 +5,7 @@ The High Definition Render Pipeline (HDRP) allows you to use Rendering Layers, w A Renderer can support up to 32 rendering layers, but all HDRP effects using Rendering Layers only support the first 16 layers. On the image below, you can see usage of Rendering Layers with Lights to only affect some of the meshes. -![](Images/HDRPFeatures-LightLayers.png) +![Three spheres, labelled to show that each receives light from different lights.](Images/HDRPFeatures-LightLayers.png) Rendering Layers are also supported on decal projectors, and can be sampled from the ShaderGraph to implement custom effects. @@ -63,17 +63,15 @@ By default, in the UI for Lights, Decals, Mesh Renderers or Terrain, Rendering L Using [cookies](https://docs.unity3d.com/Manual/Cookies.html) for light fixtures can sometimes have a negative visual effect on a bulb, such as self-shadowing or transmission contribution. You can use Light Layers to make a bulb Mesh not receive any light from the Light’s cookie, and instead receive light from a separate small Point Light. +![The Light cookie incorrectly affects the transmission of this bulb’s geometry.](Images/LightLayers1.png)
The Light cookie incorrectly affects the transmission of this bulb’s geometry. -![](Images/LightLayers1.png) - +![Assigning the bulb’s Mesh Renderer to a specific Rendering Layer means that the Light cookie no longer affects the bulb’s Mesh Renderer.](Images/LightLayers2.png)
Assigning the bulb’s Mesh Renderer to a specific Rendering Layer means that the Light cookie no longer affects the bulb’s Mesh Renderer. -![](Images/LightLayers2.png) - +![To restore the transmission effect, create a Point Light and assign it to the same Rendering Layer as the bulb’s Mesh Renderer. Now this Point Light only affects the bulb’s Mesh Renderer and does not contribute to the rest of the Scene Lighting.](Images/LightLayers3.png)
To restore the transmission effect, create a Point Light and assign it to the same Rendering Layer as the bulb’s Mesh Renderer. Now this Point Light only affects the bulb’s Mesh Renderer and does not contribute to the rest of the Scene Lighting. -![](Images/LightLayers3.png) For more information on this process, see Pierre Donzallaz’s [expert guide](https://pydonzallaz.files.wordpress.com/2019/02/create-high-quality-light-fixtures-in-unity.pdf) on creating high quality light fixtures in Unity. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Shadows-in-HDRP.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Shadows-in-HDRP.md index a3f7322ff12..3488bc431bb 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Shadows-in-HDRP.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Shadows-in-HDRP.md @@ -72,9 +72,7 @@ In HDRP, each individual Light component controls its own shadow biasing using t - **Slope-Scale Depth Bias** - **Normal Bias** -Find these settings under the **Shadows** section. If some property fields are missing, enable [additional properties](expose-all-additional-properties.md) to display them. For details on how each property controls the shadow biasing, see the [Light documentation](Light-Component.md). - -![](Images/Shadows1.png) +Find these settings under the **Shadows** section in the **Light** Inspector. If some property fields are missing, enable [additional properties](expose-all-additional-properties.md) to display them. For details on how each property controls the shadow biasing, see the [Light documentation](Light-Component.md). Using high shadow bias values may result in light "leaking" through Meshes. This is where there is a visible gap between the shadow and its caster and leads to shadow shapes that don't accurately represent their casters. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Stencil-Usage.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Stencil-Usage.md index caf23eddd1e..5d11da1e02d 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Stencil-Usage.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Stencil-Usage.md @@ -8,8 +8,6 @@ HDRP reserves specific bits for features such as subsurface scattering, SSR, rec During HDRP rendering, a "Clear Stencil Buffer" pass occurs just before starting to render transparent objects, and it doesn't modify user bits. The only instance where user bits are cleared is at the start of rendering when the depth buffer is cleared. -![](Images/HDRP-frame-graph-diagram.png) - ## Free Stencil Bits Within the stencil buffer during rendering, bits 6 and 7 remain untouched by HDRP code. Any other bits are HDRP reserved and may be cleared or overwritten at any moment during the frame. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/System-Requirements.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/System-Requirements.md index cc6eb578bbb..f992a9384a3 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/System-Requirements.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/System-Requirements.md @@ -7,18 +7,19 @@ This page contains information on system requirements and compatibility of the H The following table shows the compatibility of the High Definition Render Pipeline (HDRP) versions with different Unity Editor versions. | **Package version** | **Minimum Unity version** | **Maximum Unity version** | -| --------------- | --------------------- | --------------------- | -| 16.0.x | 2023.2 | 2023.x | -| 15.0.x | 2023.1 | 2023.1 | -| 14.0.x | 2022.2 | 2022.x | -| 13.x.x | 2022.1 | 2022.1 | -| 12.0.x | 2021.2 | 2021.3 | -| 11.x | 2021.1 | 2021.1 | -| 10.x | 2020.2 | 2020.3 | -| 9.x-preview | 2020.1 | 2020.1 | -| 8.x | 2020.1 | 2020.1 | -| 7.x | 2019.3 | 2019.4 | -| 6.x | 2019.2 | 2019.2 | +|---------------------|---------------------------|---------------------------| +| 17.x | 6000.x | 6000.x | +| 16.0.x | 2023.2 | 2023.x | +| 15.0.x | 2023.1 | 2023.1 | +| 14.0.x | 2022.2 | 2022.x | +| 13.x.x | 2022.1 | 2022.1 | +| 12.0.x | 2021.2 | 2021.3 | +| 11.x | 2021.1 | 2021.1 | +| 10.x | 2020.2 | 2020.3 | +| 9.x-preview | 2020.1 | 2020.1 | +| 8.x | 2020.1 | 2020.1 | +| 7.x | 2019.3 | 2019.4 | +| 6.x | 2019.2 | 2019.2 | ## Render pipeline compatibility diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md index 68421eedb6c..ea38b46f2a5 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md @@ -45,6 +45,7 @@ * [Set up a Volume](set-up-a-volume.md) * [Create a Volume Profile](create-a-volume-profile.md) * [Configure Volume Overrides](configure-volume-overrides.md) + * [Troubleshooting volumes](volumes-troubleshooting.md) * [Convert a project from the Built-in Render Pipeline](convert-project-from-built-in-render-pipeline.md) * [Convert post-processing scripts](convert-from-built-in-convert-post-processing-scripts.md) * [Convert lighting and shadows](convert-from-built-in-convert-lighting-and-shadows.md) @@ -192,13 +193,12 @@ * [Create realistic clouds (volumetric clouds)](create-realistic-clouds-volumetric-clouds.md) * [Create simple clouds (Cloud Layer)](create-simple-clouds-cloud-layer.md) * [Create custom cloud effects](create-custom-cloud-effects.md) + * [Troubleshooting Volumetric Clouds rendering issues](troubleshooting-volumetric-clouds-rendering-issues.md) * [Fog](fog.md) * [Understand fog](Understand-Fog.md) * [Create a global fog effect](create-a-global-fog-effect.md) * [Create a local fog effect](create-a-local-fog-effect.md) * [Create a Fog Volume shader](create-a-fog-volume-shader.md) - * [Volumetric fog samples](VolumetricSamplesDescriptions.md) - * [Set up a volumetric sample scene](set-up-the-volumetric-sample-scene.md) * [Troubleshoot fog](troubleshoot-fog.md) * [Water](water.md) * [Use the water system in your Project](water-use-the-water-system-in-your-project.md) @@ -242,7 +242,7 @@ * [Use the Rendering Debugger](use-the-rendering-debugger.md) * [Add controls to the Rendering Debugger](add-controls-to-the-rendering-debugger.md) * [Rendering and post-processing](rendering-and-post-processing.md) - * [Understand execution order](rendering-execution-order.md) + * [Execution order reference](rendering-execution-order.md) * [Understand post-processing](Post-Processing-Main.md) * [Anti-aliasing](Anti-Aliasing.md) * [Dynamic resolution](Dynamic-Resolution.md) @@ -311,7 +311,6 @@ * [Customize the High Definition Render Pipeline (HDRP)](render-graph.md) * [Test and debug rendering and post-processing](rendering-troubleshoot.md) * [Troubleshoot a custom pass](Custom-Pass-Troubleshooting.md) - * [View a custom pass in the Frame Debugger](Custom-Pass-Frame-Debugger.md) * [Troubleshoot a custom post-processing effect](rendering-troubleshoot-custom-post-processes.md) * [Understand and fix Not a Number (NAN) and Infinite (Inf) values](Post-Processing-Propagating-NaNs.md) * [Known issues](Known-Issues.md) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/VolumetricSamplesDescriptions.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/VolumetricSamplesDescriptions.md deleted file mode 100644 index fbb5ce8fa2e..00000000000 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/VolumetricSamplesDescriptions.md +++ /dev/null @@ -1,92 +0,0 @@ -# Volumetric fog samples - -This page provides an overview of how to use the Local Volumetric Fog component -in Unity to enhance your fog effects with **3D Textures** or **Shader -Graphs**. It also covers various blending modes and quality settings to optimize -the visual quality and performance of your fog effects. - -![](Images/volumetric-fog-samples.webp) - -Learn how to configure the Local Volumetric Fog component, use different -blending modes, and explore a variety of sample effects like 3D texture masks, -ground smoke, local clouds, foggy orbs, procedural noise fog, and fumes. Each -sample demonstrates unique techniques for creating and controlling volumetric -fog effects. - -## Using local volumetric fog - -The Local Volumetric Fog component allows you to use **3D Textures** or **Shader -Graphs** to add details and animation locally to the fog. **Blending Modes** -also allow you to add, multiply, or overwrite fog values. - -The **Volumetric Fog quality settings**, found in the active **Volume Profile**, -determine the Local Fog's visual quality. Manual control offers precise -management over the Fog's budget: for an effect with lots of variation over a -short distance, increase the **Volume Slice Count**. If performance becomes an -issue, you can keep the **Screen Resolution Percentage** low as a tradeoff. - -## Sample effects - -### 3D texture mask - -This Local Volumetric Fog uses the **Texture Mask Mode**. It requires a **3D -texture**, with more examples found in **VolumetricSamples/3D Textures**. RGB -channels provide tint, while the alpha channel drives the density. If the 3D -texture contains only the alpha channel, the tint will be presumed white. - -### Ground smoke - -This Ground Smoke Shader Graph relies exclusively on 2D textures. To achieve -this effect, adjust the density vertically by projecting a 2D noise pattern from -above. Two textures of varying sizes move in separate directions, while a basic -color gradient adds depth to the volume. - -### Cloudy (local clouds) - -This Shader Graph creates the Local Clouds Effect using various sampled noises -stored in **3D textures** to generate distinct cloud-like formations. For -realistic sky clouds, opt for **Volumetric Clouds**, as Local Volumetric Fog is -designed for close-range, localized camera effects. - -### Foggy orb and light - -This Foggy Orb uses a Shader Graph. The 3D texture scrolls upwards and rotates, -which helps to give it a good flow. It has a **light** in the middle. - -### Procedural noise fog - -This sample showcases procedural 3D Noise. You can compute 3D noise directly in -the Shader Graph. Several **3D noise functions** are available as **SubGraphs** -found in **VolumetricSamples/Fog Volume Shadergraph/Procedural -Noises**. Procedural Noise can be slow to run due to the complex math -involved. Check out the Material on the Sample to visualize different noise -functions. - -### Fumes - -This Fumes Effect uses a Shader Graph with a **procedural 3D Noise -SubGraph**. Not utilizing any textures allows you to scale and deform the effect -without a loss in quality. - -## Blending modes - -The **Local Volumetric Fog** offers different **Blending Modes**. - -- **Additive blending mode**: Seamlessly blends with the surrounding fog by - adding the color and density values of overlapping volumes. This mode does not - allow subtraction. -- **Overwrite blending mode**: Replaces any fog value and doesn't blend with - surrounding fog. Useful for removing fog from an interior. -- **Multiply blending mode**: Tints the fog color locally and reduces the fog's - density by multiplying it with small values. -- **Min and max blending modes**: Clamp values in one way or the other. - -### Volumetric heart - -This simple Heart effect uses basic math in Shader Graph without involving any -textures. - -## Additional resources - -- [Local Volumetric Fog Volume - Reference](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html?subfolder=/manual/local-volumetric-fog-volume-reference.html) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/add-swell-agitation-or-ripples.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/add-swell-agitation-or-ripples.md index 1fc300e8f0f..0361c16a915 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/add-swell-agitation-or-ripples.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/add-swell-agitation-or-ripples.md @@ -23,18 +23,8 @@ To add a simulation mask: 1. In the Water Volume Inspector window, drag the texture to the **Simulation Mask** property. - - - - - - - - -
- - - -
-In this example, the red channel has a gradient that reduces the first and second simulation bands. The noise on the green channel reduces ripples. For more information, refer to the Simulation Mask property description. -
+![A water mask that's more red towards the left and more blue towards the right.](Images/WaterMask_Example-22.2.png) + +![An ocean rendered using the water mask.](Images/WaterMask_ExempleRender.PNG) + +In this example, the red channel has a gradient that reduces the first and second simulation bands. The noise on the green channel reduces ripples. For more information, refer to the Simulation Mask property description. \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/build-test-and-deploy.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/build-test-and-deploy.md index 52ddfbaa46e..3b54e640757 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/build-test-and-deploy.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/build-test-and-deploy.md @@ -12,6 +12,5 @@ Configure a build, and publish and debug a project in the High Definition Render - [Configure build settings for different platforms](configure-build-settings-for-different-platforms.md) - [Platform configuration](platform-configuration.md) - [Test and debug materials](test-and-debug-materials.md) -- [View a Custom Pass in the Frame Debugger](Custom-Pass-Frame-Debugger.md) - [Debug ray tracing effects](Ray-Tracing-Debug.md) - [Reduce shader variants](reduce-shader-variants.md) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/clouds.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/clouds.md index 9d0d30130c5..1c0bac613c7 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/clouds.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/clouds.md @@ -8,3 +8,6 @@ The High Definition Render Pipeline (HDRP) includes two cloud solutions that you | [Create realistic clouds (volumetric clouds)](create-realistic-clouds-volumetric-clouds.md) | Use a Volumetric Clouds Volume Override to create interactable clouds that can render shadows, and receive fog and volumetric light. | | [Create simple clouds (Cloud Layer)](create-simple-clouds-cloud-layer.md) | Use a Cloud Layer Volume Override to create a simple representation of clouds using a 2D texture rendered on top of the sky. | | [Create custom cloud effects](create-custom-cloud-effects.md) | Create your own custom clouds with their own properties and shaders, while still keeping the clouds consistent with HDRP's lighting pipeline. | +| [Troubleshooting Volumetric Clouds rendering issues](troubleshooting-volumetric-clouds-rendering-issues.md) | Prevent far-away clouds from disappearing when the camera moves along the y-axis, especially when traversing the clouds. | + +* diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-from-built-in-convert-materials-and-shaders.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-from-built-in-convert-materials-and-shaders.md index 1be9d338547..0cfef4978c6 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-from-built-in-convert-materials-and-shaders.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-from-built-in-convert-materials-and-shaders.md @@ -18,7 +18,7 @@ The automatic upgrade options described above can't upgrade all Materials to HDR * Height mapped Materials might look incorrect. This is because HDRP supports more height map displacement techniques and decompression options than the Built-in Render Pipeline. To upgrade a Material that uses a heightmap, modify the Material's **Amplitude** and **Base** properties until the result more closely matches the Built-in Render Pipeline version. * You can't upgrade particle shaders. HDRP doesn't support particle shaders, but it does provide Shader Graphs that are compatible with the [Built-in Particle System](https://docs.unity3d.com/Manual/Built-inParticleSystem.html). These Shader Graphs work in a similar way to the built-in particle shaders. To use these Shader Graphs, import the **Particle System Shader Samples** sample: - 1. Open the Package Manager window (menu: **Window** > **Package Manager**). + 1. Open the Package Manager window (menu: **Window** > **Package Management** > **Package Manager**). 2. Find and click the **High Definition RP** entry. 3. In the package information for **High Definition RP**, go to the **Samples** section and click the **Import into Project** button next to **Particle System Shader Samples**. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-from-built-in-convert-post-processing-scripts.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-from-built-in-convert-post-processing-scripts.md index 608d8609034..f5afd208b7e 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-from-built-in-convert-post-processing-scripts.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-from-built-in-convert-post-processing-scripts.md @@ -2,7 +2,7 @@ HDRP no longer supports the **Post Processing** package and instead includes its own [implementation for post-processing](Post-Processing-Main.md). If your Project uses the Post Processing package, remove the Post Processing package from the Project. To do this: -1. In the Unity Editor, open the Package Manager window (menu: **Window** > **Package Manager**). +1. In the Unity Editor, open the Package Manager window (menu: **Window** > **Package Management** > **Package Manager**). 2. Find and select the **Post Processing** package, and click **Remove**. If your Project uses the Post Processing package's Scripting API to edit post-processing effects, you need to update your scripts to work with the new post-processing effects. To convert the Scene to HDRP post-processing: diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-from-built-in-convert-project-with-hdrp-wizard.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-from-built-in-convert-project-with-hdrp-wizard.md index f4041c88f0e..c5b33728659 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-from-built-in-convert-project-with-hdrp-wizard.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/convert-from-built-in-convert-project-with-hdrp-wizard.md @@ -3,7 +3,7 @@ Firstly, to install HDRP, add the High Definition RP package to your Unity Project: 1. Open your Unity project. -2. To open the **Package Manager** window, go to **Window** > **Package Manager**. +2. To open the **Package Manager** window, go to **Window** > **Package Management** > **Package Manager**. 3. In the **Package Manager** window, in the **Packages:** field, select **Unity Registry** from the menu. 4. Select **High Definition RP** from the list of packages. 5. In the bottom right corner of the Package Manager window, select **Install**. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-fabric-material.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-fabric-material.md index 4021c6d7140..2296f457ea3 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-fabric-material.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-fabric-material.md @@ -16,7 +16,7 @@ Refer to [Cotton/Wool Material Inspector reference](cotton-wool-material-inspect HDRP comes with Cotton/Wool Material samples to further help you get started. To find this Sample: -1. Go to **Windows** > **Package Manager**, and select **High Definition RP** from the package list. +1. Go to **Windows** > **Package Management** > **Package Manager**, and select **High Definition RP** from the package list. 2. In the main window that shows the package's details, find the **Samples** section. 3. To import a Sample into your Project, click the **Import into Project** button. This creates a **Samples** folder in your Project and imports the Sample you selected into it. This is also where Unity imports any future Samples into. 4. In the Asset window, go to **Samples** > **High Definition RP** > **11.0** and open the **Fabric** scene. Here you can see the sample materials set up in-context in the scene, and available for you to use. @@ -37,7 +37,7 @@ Refer to [Silk Material Inspector reference](silk-material-inspector-reference.m The High Definition Render Pipeline (HDRP) also comes with Silk Material samples to further help you get started. To find this Sample: -1. Go to **Windows** > **Package Manager**, and select **High Definition RP** from the package list. +1. Go to **Windows** > **Package Management** > **Package Manager**, and select **High Definition RP** from the package list. 2. In the main window that shows the package's details, find the **Samples** section. 3. To import a Sample into your Project, click the **Import into Project** button. This creates a **Samples** folder in your Project and imports the Sample you selected into it. This is also where Unity imports any future Samples into. 4. In the Asset window, go to **Samples** > **High Definition RP** > **11.0** and open the **Fabric** scene. Here you can see the silk sample material set up in-context in the scene, and available for you to use. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-fullscreen-material.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-fullscreen-material.md index ffabede8603..2f3bbdd6284 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-fullscreen-material.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-fullscreen-material.md @@ -77,8 +77,6 @@ To set a source material for the `Blit()` command to use in shader graph: **Note**: The type of source material node depends on the platform you use. Windows and some platforms use Texture2DArray and other platforms use Texture2D. To see which texture type to use, refer to the [documentation for the platform you are using](https://docs.unity3d.com/Manual/PlatformSpecific.html). -![](Images/FS_SampleTex2DArray.png) - ### Set the Blit pass in a C# script @@ -101,7 +99,7 @@ Your scene appears gray if you read from and write to the color buffer in the sa ## Missing part of full-screen effect -![](Images/fullscreen_troubleshooting_1.png) +![A view of a sphere, with a red fog post-processing effect that covers only part of the display.](Images/fullscreen_troubleshooting_1.png) This error can happen when you use a full-screen shader with a custom pass C# script that uses the `Blit()` function, and you haven’t selected the **Blit** shader pass in the Inspector window or in a script. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-hair-and-fur-material.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-hair-and-fur-material.md index fee0325b12a..0ed955da729 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-hair-and-fur-material.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-hair-and-fur-material.md @@ -30,7 +30,7 @@ Refer to [Hair Master Stack reference](hair-master-stack-reference.md) for more HDRP comes with a Hair Material sample to further help you get started. To find this Sample: -1. Go to **Windows** > **Package Manager**, and select **High Definition RP** from the package list. +1. Go to **Windows** > **Package Management** > **Package Manager**, and select **High Definition RP** from the package list. 2. In the main window that shows the package's details, find the **Samples** section. 3. To import a Sample into your Project, click the **Import into Project** button. This creates a **Samples** folder in your Project and imports the Sample you selected into it. This is also where Unity imports any future Samples into. 4. In the Asset window, go to **Samples** > **High Definition RP** > **11.0** and open the Hair scene. Here you will see the hair sample material set up in-context with a scene, and available for you to use. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-local-fog-effect.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-local-fog-effect.md index 06502fe872c..d29afb8e666 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-local-fog-effect.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-a-local-fog-effect.md @@ -1,118 +1,121 @@ # Create a local fog effect -You may want to have fog effects in your Scene that global fog can not produce by itself. In these cases you can use local fog. To add localized fog, use a Local Volumetric Fog component. Local Volumetric Fog is a volume of fog represented as an oriented bounding box. By default, fog is constant (homogeneous), but you can alter it by assigning a Density Mask 3D texture to the **Texture** field under the **Density Mask Texture** section. +To create fog effects that [global fog](create-a-global-fog-effect.md) can't produce, use a Local Volumetric Fog component, which is a fog volume represented as an oriented bounding box. + +## Limitations + +HDRP voxelizes Local Volumetric Fog at 64 or 128 slices along the camera's focal axis for better performance. This introduces the following limitations: + +- No volumetric shadowing: Local Volumetric Fog does not reduce light intensity between a Light and a surface. +- Aliasing artifacts: Noticeable aliasing can appear at the fog volume boundary. Use Local Volumetric Fog with [global fog](create-a-global-fog-effect.md) and a Blend Distance above 0 to reduce edge hardness. ## Create a Local Volumetric Fog component -You can create a Local Volumetric Fog component in one of the following ways: +Create a **Local Volumetric Fog** component in one of the following ways: -1. In the menu bar, select **GameObject** > **Rendering** > **Local Volumetric Fog**. +- From the main menu, select **GameObject** > **Rendering** > **Local Volumetric Fog**. -2. Right-click in the Hierarchy window and select **Volume** > **Local Volumetric Fog**. +- Right-click in the **Hierarchy** window and select **Volume** > **Local Volumetric Fog**. -## Set up Volumetric fog -To use volumetric fog, enable it in the all of the following locations: +## Set up volumetric fog + +To use volumetric fog, enable it in the following locations: + - [Project Settings](#enable-fog-project-settings) -- [HDRP Asset](#enable-fog-hdrp-asset) -- [Global Volume](#enable-fog-global-volume) +- [High Definition Render Pipeline (HDRP) Asset](#enable-fog-hdrp-asset) +- [Global volume](#enable-fog-global-volume) -### Enable Volumetric Fog in Project Settings +### Enable volumetric fog in Project Settings -To enable Volumetric Fog in the Project Settings window, open the Project settings window (menu: **Edit > Project Settings)** and enable the following properties**:** +To enable **Volumetric Fog** in the **Project Settings** window: -1. Go to **Quality** > **HDRP** > **Lighting** > **Volumetrics** and enable **Volumetric Fog**. -2. Go to **Graphics** > **Pipeline Specific Settings** > **HDRP**. -3. Under Frame Settings (Default Values), in the Camera section: +1. Open the **Project Settings** window (menu: **Edit** > **Project Settings**). +2. Go to **Quality** > **HDRP** > **Lighting** > **Volumetrics** and enable **Volumetric Fog**. +3. Go to **Graphics** > **Pipeline Specific Settings** > **HDRP**. +4. Under **Frame Settings (Default Values)** in the **Camera** section: - Select **Lighting**. - Enable **Fog**. - Enable **Volumetrics**. -### Enable Volumetric Fog in the HDRP Asset +### Enable volumetric fog in the HDRP asset -To enable Volumetric Fog in the [HDRP Asset](HDRP-Asset.md): +To enable **Volumetric Fog** in the [HDRP Asset](HDRP-Asset.md): -1. In the **Project** window, select the **HDRenderPipelineAsset** to open it in the Inspector**.** +1. In the **Project** window, select the **HDRenderPipelineAsset** to open it in the **Inspector** window. 2. Go to **Lighting** > **Volumetrics**. 3. Enable **Volumetric Fog**. -### Enable Volumetric Fog in a Global Volume +### Enable Volumetric Fog in a global volume -To use volumetric fog in your scene, create a [Global volume](understand-volumes.md) with a [**Fog** component](fog-volume-override-reference.md). To do this: +To use **Volumetric Fog** in your scene, create a [Global volume](understand-volumes.md) with a [Fog Volume Override](fog-volume-override-reference.md): -1. Create a new GameObject (menu: **GameObject** > **Create Empty**). -2. In the Inspector window, select **Add Component**. -3. In the search box that appears, enter “volume”. -4. Select the **Volume** Component. -5. Go to **Profile** and select **New** to create a volume profile. +1. Create a new **GameObject** (menu: **GameObject** > **Create Empty**). +2. In the **Inspector** window, select **Add Component**. +3. Enter “volume” in the search box. +4. Select the **Volume** component. +5. In **Profile**, select **New** to create a volume profile. 6. Select **Add Override**. -7. In the search box that appears, select **Fog.** +7. In the search box, select **Fog**. -To enable volumetric fog in the Fog component: +To enable **Volumetric Fog** in the Fog Volume Override: -1. Select the **Fog** dropdown -2. Select the **Enable** toggle, and enable it. -3. Change the **State** setting to **Enabled**. -4. Select the **Volumetric Fog** toggle, and enable it. +1. Select the **Fog** dropdown. +2. Enable **State** and **Volumetric Fog**. -To see more properties you can use to control Volumetric Fog, expose the hidden Fog settings: + -1. In the Volume component, go to the **Fog** override and select the **More** (**⋮**) dropdown. -2. Select **Show All Additional Properties** to open the Preferences window. -3. In the Preferences window, under Additional Properties, open the **Visibility** dropdown and select **All Visible.** +## Configure the fog with a mask -Refer to the [Local Volumetric Fog Volume reference](local-volumetric-fog-volume-reference.md) for more information. +To configure fog color and density with a mask, use one of the following methods: - +- Apply a 3D mask texture. +- Apply a Fog Volume shader graph. -## Apply a Fog Volume shader graph +### Apply a 3D mask texture -To apply a [Fog Volume shader](fog-volume-master-stack-reference.md) in a scene, assign a Fog Volume material to a Local Volumetric Fog component: +A mask texture is a 3D texture that defines the shape and appearance of the local volumetric fog. Unity does not limit the size of this texture, and its size does not affect memory usage. -1. [Create and set up a Local Volumetric Fog component.](#volumetric-fog-set-up). -2. In the Project window, right-click the Fog Volume shader graph asset and select **Create** > **Material.** -3. In the Hierarchy window, select the Local Volumetric Fog GameObject. -4. In the Local Volumetric Fog’s Inspector window, set the **Mask Mode** property to **Material**. -5. In the Mask Material section, select the material picker (circle). -6. Select the Fog Volume material. +#### Create a mask texture -If the Fog Volume doesn't appear in your scene, follow the [Local Volumetric Fog setup instructions](#volumetric-fog-set-up). +To create a 3D texture for a local volumetric fog component: -**Note**: The **Scale** transform doesn't affect the size of the fog in your scene. To do this, change the **Size** value in the Local Volumetric Fog component. +1. Create an RGBA flipbook texture in image-editing software. -**Note**: If you use more than one Fog Volume shader in your scene, then the HDRP fog system applies lighting consistently across them all. + For example, a texture size of 1024 x 32 represents a 3D texture size of 32 x 32 x 32, with 32 slices laid out sequentially. -Refer to [Fog Volume shader](fog-volume-master-stack-reference.md) for more information. +2. [Import the texture as a 3D texture](https://docs.unity3d.com/Manual/class-Texture3D.html). -### Mask textures +3. Open the **Local Volumetric Fog** component and assign the 3D texture to the **Texture** field in the **Mask Texture** section. -A mask texture is a 3D texture that controls the shape and appearance of the local volumetric fog in your scene. Unity does not limit the size of this 3D texture, and its size doesn't affect the amount of memory a local volumetric fog uses. +**Note**: The **Scale** transform does not affect the fog size. To change the size, modify the **Size** value in the Local Volumetric Fog component. -### Use a built-in Mask Texture +#### Use a built-in mask texture -HDRP includes 3D Density Mask Textures with different noise values and shapes that you can use in your scene. To use these Textures, import them from the High Definition RP package samples: +HDRP includes built-in 3D mask textures that set the density of a fog volume to different shapes and noise patterns. To use these textures: -1. Open the Package Manager window (menu: **Window** > **Package Manager**). +1. Open the **Package Manager** window (menu: **Window** > **Package Management** > **Package Manager**). 2. Find the **High Definition RP** package. -3. Expand the **Samples** drop-down. -4. Find the **Local Volumetric Fog 3D Texture Samples** and click on the **Import** button. +3. Open the **Samples** dropdown. +4. Find **Volumetric Samples** and select **Import**. -## Create a Density Mask Texture +### Apply a Fog Volume shader graph - To create a 3D texture to apply to a local volumetric fog component: +A Fog Volume shader graph is a custom shader graph designed to render volumetric fog effects in a 3D scene. -1. In the image-editing software of your choice, create an RGBA flipbook texture and [import it as a 3D texture](https://docs.unity3d.com/2020.2/Documentation/Manual/class-Texture3D.html). For example, a texture of size 1024 x 32 describes a 3D Texture of size 32 x 32 x 32 with 32 slices laid out one after another. -2. Open a **Local Volumetric Fog** component and in its **Density Mask Texture** section assign the 3D Texture you imported to the **Texture** field . +To apply a [Fog Volume shader graph](fog-volume-master-stack-reference.md) in a scene: + +1. [Create and set up a Local Volumetric Fog component.](#volumetric-fog-set-up) +2. In the **Project** window, right-click the Fog Volume shader graph asset and select **Create** > **Material**. +3. In the **Hierarchy** window, select the **Local Volumetric Fog** GameObject. +4. In the **Inspector**, set the **Mask Mode** to **Material**. +5. In the **Mask Material** section, select the **Material** picker (⊙) and choose the Fog Volume material. -## Limitations -HDRP voxelizes Local Volumetric Fog at 64 or 128 slices along the camera's focal axis to improve performance. This causes the following limitations: -- Local Volumetric Fog doesn't support volumetric shadowing. If you place Local Volumetric Fog between a Light and a surface, the Volume does not decrease the intensity of light that reaches the surface. -- Noticeable aliasing can appear at the boundary of the fog Volume. To hide aliasing artifacts, use Local Volumetric Fog with [global fog](create-a-global-fog-effect.md). You can also use a Density Mask and a Blend Distance value above 0 to decrease the hardness of the edge. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-an-eye-material.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-an-eye-material.md index 0b70ba029c3..680556d19ea 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-an-eye-material.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/create-an-eye-material.md @@ -44,7 +44,7 @@ You can also create your own custom Textures for the Eye Shader Graph. For more HDRP includes four sample eyes of different sizes in the Eye sample scene. This scene exists in HDRP’s Material Samples. To install the Material Samples: -1. Open the Package Manager window (**Window** > **Package Manager**). +1. Open the Package Manager window (**Window** > **Package Management** > **Package Manager**). 2. Open the **Packages** menu and select the **In Project** context. 3. Select the **High Definition RP** package. 4. Expand the **Samples** dropdown. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/custom-post-processing-create-apply.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/custom-post-processing-create-apply.md index de697675796..358f4bdf8b6 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/custom-post-processing-create-apply.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/custom-post-processing-create-apply.md @@ -20,8 +20,6 @@ This creates each template file in the **Project** window in the **Assets** fold **Note**: When using **Full screen Shader Graph**, if you need **Scene Color**, use the **Post Process Input** source for the **HD Sample Buffer** node. -![](Images/HDSampleBuffer.png) - ## Apply a custom post-processing effect diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/deep-learning-super-sampling-in-hdrp.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/deep-learning-super-sampling-in-hdrp.md index 993a539074f..2060e0af1db 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/deep-learning-super-sampling-in-hdrp.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/deep-learning-super-sampling-in-hdrp.md @@ -33,7 +33,7 @@ To use DLSS in your scene: * To install the NVIDIA package manually: - 1. Open the [Package Manager window](https://docs.unity3d.com/Manual/upm-ui.html) (menu: **Window** > **Package Manager**). + 1. Open the [Package Manager window](https://docs.unity3d.com/Manual/upm-ui.html) (menu: **Window** > **Package Management** > **Package Manager**). 2. Select **Packages**, then select **Built-in**. 3. In the packages list view, find and select the NVIDIA package. 4. In the bottom right of the package-specific detail view, select **Enable**. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/float-objects-on-a-water-surface.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/float-objects-on-a-water-surface.md index 16d557b003a..5bdb4414e42 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/float-objects-on-a-water-surface.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/float-objects-on-a-water-surface.md @@ -10,7 +10,7 @@ To do this: ## Example: Float one object -![](Images/water-22.2-onebuoyancy.png) +![A cube floating on an ocean.](Images/water-22.2-onebuoyancy.png) This is an example script to float one object on a water surface. @@ -52,7 +52,7 @@ public class FitToWaterSurface : MonoBehaviour ## Example: Float several objects -![](Images/water-22.2-multibuoyancy.png) +![Hundreds of cubes floating on an ocean.](Images/water-22.2-multibuoyancy.png) This is an example script to float an array of objects on a water surface using the [Burst compiler](https://docs.unity3d.com/Packages/com.unity.burst@1.8/manual/index.html). diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/install-hdrp.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/install-hdrp.md index 7a7e7589ce4..ae72d5b1c5e 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/install-hdrp.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/install-hdrp.md @@ -27,7 +27,7 @@ This template is a great starting point for projects aiming for high-end graphic To install HDRP, add the High Definition RP package to your Unity Project: 1. Open your Unity project. -2. To open the **Package Manager** window, go to **Window** > **Package Manager**. +2. To open the **Package Manager** window, go to **Window** > **Package Management** > **Package Manager**. 3. In the **Package Manager** window, in the **Packages:** field, select **Unity Registry** from the menu. 4. Select **High Definition RP** from the list of packages. 5. In the bottom right corner of the Package Manager window, select **Install**. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/light-anchor.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/light-anchor.md index c2661d5451e..a709c9cb0fe 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/light-anchor.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/light-anchor.md @@ -19,7 +19,7 @@ Use **Orbit** and **Elevation** to control the orientation of the light, in degr You can use the **Anchor Position Override** to provide a GameObject’s [Transform](https://docs.unity3d.com/ScriptReference/Transform.html) as an anchor point for the Light. This is useful if you want the Light to follow a specific GameObject in the Scene. -![](Images/LightAnchorAnimation.gif) +![The Light follows the sphere GameObject in the scene as it rotates.](Images/LightAnchorAnimation.gif) **Note**: The above example uses the Main Camera as the reference Camera that adjusts the light rotation. The Common presets might create a different result in the Scene View if your view isn't aligned with the Main Camera. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/lights-placement-tool.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/lights-placement-tool.md index 5cc49c45782..47640ee969b 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/lights-placement-tool.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/lights-placement-tool.md @@ -4,7 +4,7 @@ The High Definition Render Pipeline (HDRP) includes the Light Placement Tool whi This tool does not affect any Cameras in your Scene. The Scene View Camera returns to its original position when you disable the Light Placement Tool. -![](Images/light-placement-tool.jpg) +![A garden scene. On the left, the default Scene view. On the right, the view from the light.](Images/light-placement-tool.jpg) ## Use the Light Placement Tool diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/local-volumetric-fog-volume-reference.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/local-volumetric-fog-volume-reference.md index 82581d4d1b0..23248191544 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/local-volumetric-fog-volume-reference.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/local-volumetric-fog-volume-reference.md @@ -13,6 +13,7 @@ Refer to [Create a local fog effect](create-a-local-fog-effect.md) for more info | **Mask Mode** | Select a mask type to apply to the fog:
•**Texture**: Applies a 3D texture to the fog volume.
•**Material**: Applies a Material to the fog which updates every frame. You can use this to create dynamic fog effects. | | **Blending Mode** | Determines how this fog volume blends with existing fog in the scene:
•**Overwrite**: Replaces existing fog in the volume area with this fog volume.
•**Additive**: Adds the color and density of this fog volume to other fog in the scene. This is the default value.
•**Multiply**: Multiplies the color and density of this fog volume with other fog in the scene. You can use this to create effects relative to a specific fog density.
•**Min**: Determines the minimum density value of this fog volume and the scene fog inside its bounding box. For example, a value of 0 appears to remove fog in a certain area.
•**Max**: Determines the maximum density value of this fog volume and the scene fog inside its bounding box.
| | **Priority** | Determined the order in which HDRP blends fog volumes. HDRP renders the lowest priority volume first and the highest priority last. | +| **Scale Mode** | Specifies the scaling mode to apply to the Local Volumetric Fog Volume. Invariant uses only the size of the volume. Inherit From Hierarchy multiplies the size and the transform scale. | | **Size** | Controls the dimensions of the Volume. | | **Per Axis Control** | Controls the blend distance based on each axis. | | **Blend Distance** | Blend Distance fades from this fog volume's level to the fog level outside it.
This value indicates the absolute distance from the edge of the Volume bounds, defined by the Size property, where the fade starts.
Unity clamps this value between 0 and half of the lowest axis value in the Size property.
If you use the **Normal** tab, you can alter a single float value named Blend Distance, which gives a uniform fade in every direction. If you open the **Advanced** tab, you can use two fades per axis, one for each direction. For example, on the X-axis you could have one for left-to-right and one for right-to-left.
A value of 0 hides the fade, and a value of 1 creates a fade. | diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-adjustment-volume-component-reference.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-adjustment-volume-component-reference.md index c9c660983f7..2e5421e7e5a 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-adjustment-volume-component-reference.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-adjustment-volume-component-reference.md @@ -6,93 +6,18 @@ Refer to the following for more information about using the Probe Adjustment Vol - [Fix issues with Adaptive Probe Volumes](probevolumes-fixissues.md) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyDescription
Influence Volume
ShapeSet the shape of the Adjustment Volume to either Box or Sphere.
SizeSet the size of the Adjustment Volume. This property only appears if you set Shape to Box.
RadiusSet the radius of the Adjustment Volume. This property only appears if you set Shape to Sphere.
Mode -

Select how to override probes inside the Adjustment Volume.

-
    -
  • Invalidate Probes: Mark selected probes as invalid. Refer to How light probe validity works for more information.
  • -
  • Override Validity Threshold: Override the threshold HDRP uses to determine whether Light Probes are marked as invalid. Refer to Adjust Dilation for more information.
  • -
  • Apply Virtual Offset: Change the position Light Probes use when sampling the lighting in the scene during baking. Refer to Adjust Virtual Offset for more information.
  • -
  • Override Virtual Offset Settings: Override the biases HDRP uses during baking to determine when Light Probes use Virtual Offset, and calculate sampling positions. Refer to Adjust Virtual Offset for more information
  • -
  • Intensity Scale: Override the intensity of probes to brighten or darken affected areas.
  • -
  • Override Sky Direction Override the directions Unity uses to sample the ambient probe, if you enable sky occlusion.
  • -
  • Override Sample Count: Override the number of samples Unity uses for Adaptive Probe Volumes.
  • -
-
Dilation Validity Threshold -

Override the ratio of backfaces a probe samples before HDRP considers it invalid. This option only appears if you set Mode to Override Validity Threshold, and you enable Additional Properties.

-
Virtual Offset Rotation -

Set the rotation angle for the Virtual Offset vector on all probes in the Adjustment Volume. This option only appears if you set Mode to Apply Virtual Offset.

-
Virtual Offset Distance -

Set how far HDRP pushes probes along the Virtual Offset Rotation vector. This option only appears if you set Mode to Apply Virtual Offset.

-
Geometry Bias -

Sets how far HDRP pushes a probe's capture point out of geometry after one of its sampling rays hits geometry. This option only appears if you set Mode to Override Virtual Offset Settings.

-
Ray Origin Bias

Override the distance between a probe's center and the point HDRP uses to determine the origin of that probe's sampling ray. This can be used to push rays beyond nearby geometry if the geometry causes issues. This option appears only if you set Mode to Override Virtual Offset Settings.

-
Intensity Scale -

Change the brightness of all probes covered by the Probe Volumes Adjustment Volume component. Use this sparingly, because changing the intensity of probe data can lead to inconsistencies in the lighting. This option only appears if you set Mode to Intensity Scale.

-
Preview Probe Adjustments -

Preview the effect of the adjustments in the Scene view and the Rendering Debugger.

-
Bake Probe Volumes -

Bake the Adaptive Probe Volumes with the adjustments.

-
+| Property | Description | +| :------- | :--------------------------------------------------------------------------------- | +| **Influence Volume** | Set the shape of the Adjustment Volume to either **Box** or **Sphere**.
  • **Shape**: Set the shape of the Adjustment Volume to either **Box** or **Sphere**.
  • **Size**: Set the size of the Adjustment Volume. This property only appears if you set **Shape** to **Box**.
  • **Radius**: Set the radius of the Adjustment Volume. This property only appears if you set **Shape** to **Sphere**.
| +| **Mode** | Select how to override probes inside the Adjustment Volume.
  • **Invalidate Probes:** Mark selected probes as invalid. Refer to [How light probe validity works](probevolumes-fixissues.md#how-light-probe-validity-works) for more information.
  • **Override Validity Threshold:** Override the threshold HDRP uses to determine whether Light Probes are marked as invalid. Refer to [Adjust Dilation](probevolumes-fixissues.md#adjust-dilation) for more information.
  • **Apply Virtual Offset:** Change the position Light Probes use when sampling the lighting in the scene during baking. Refer to [Adjust Virtual Offset](probevolumes-fixissues.md#adjust-virtual-offset) for more information.
  • **Override Virtual Offset Settings:** Override the biases HDRP uses during baking to determine when Light Probes use Virtual Offset, and calculate sampling positions. Refer to [Adjust Virtual Offset](probevolumes-fixissues.md#adjust-virtual-offset) for more information.
  • **Intensity Scale:** Override the intensity of probes to brighten or darken affected areas.
  • **Override Sky Direction:** Override the directions Unity uses to sample the ambient probe, if you enable [sky occlusion](probevolumes-skyocclusion.md).
  • **Override Sample Count:** Override the number of samples Unity uses for Adaptive Probe Volumes.
| +| **Dilation Validity Threshold** | Override the ratio of backfaces a probe samples before HDRP considers it invalid. This option only appears if you set **Mode** to **Override Validity Threshold**, and you enable **Additional Properties**. | +| **Virtual Offset Rotation** | Set the rotation angle for the Virtual Offset vector on all probes in the Adjustment Volume. This option only appears if you set **Mode** to **Apply Virtual Offset**. | +| **Virtual Offset Distance** | Set how far HDRP pushes probes along the Virtual Offset Rotation vector. This option only appears if you set **Mode** to **Apply Virtual Offset**. | +| **Geometry Bias** | Sets how far HDRP pushes a probe's capture point out of geometry after one of its sampling rays hits geometry. This option only appears if you set **Mode** to **Override Virtual Offset Settings**. | +| **Ray Origin Bias** | Override the distance between a probe's center and the point HDRP uses to determine the origin of that probe's sampling ray. This can be used to push rays beyond nearby geometry if the geometry causes issues. This option appears only if you set **Mode** to **Override Virtual Offset Settings**. | +| **Intensity Scale** | Change the brightness of all probes covered by the Probe Volumes Adjustment Volume component. Use this sparingly, because changing the intensity of probe data can lead to inconsistencies in the lighting. This option only appears if you set **Mode** to **Intensity Scale**. | +| **Preview Probe Adjustments** | Preview the effect of the adjustments in the Scene view and the [Rendering Debugger](rendering-debugger-window-reference.md). | +| **Bake Probe Volumes** | Bake the Adaptive Probe Volumes with the adjustments. | ## Override Sample Count properties @@ -101,7 +26,7 @@ These properties are visible only when you set **Mode** to **Override Sample Cou ### Probes | Property | Description | -|-|-| +|:--------|:-------| | **Direct Sample Count** | Set the number of samples Unity uses to calculate direct lighting. | | **Indirect Sample Count** | Set the number of samples Unity uses to calculate indirect lighting. | | **Sample Count Multiplier** | Set a value to multiply **Direct Sample Count** and **Indirect Sample Count** by. | @@ -112,6 +37,6 @@ These properties are visible only when you set **Mode** to **Override Sample Cou These properties only have an effect if you enable sky occlusion. Refer to [Update light from the sky at runtime with sky occlusion](probevolumes-skyocclusion.md) for more information. | Property | Description | -|-|-| +|:------|:------| | **Sample Count** | Set the number of samples Unity uses to calculate a sky occlusion value for each probe. | | **Max Bounces** | Set the maximum number of times Unity bounces light off objects when it calculates a sky occlusion value. | diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-concept.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-concept.md index 8591c72a8fd..797503a0456 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-concept.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-concept.md @@ -23,7 +23,7 @@ Adaptive Probe Volumes have the following advantages: - Adaptive Probe Volumes include [streaming](probevolumes-streaming.md) functionality to support large open worlds. - You can use Adaptive Probe Volumes to [update light from the sky at runtime with sky occlusion](probevolumes-skyocclusion.md). -![](Images/probevolumes-per-pixel.png)
+![Two comparison scenes of a red car model. The left scene uses Light Probe Groups, so each part of the car is a different shade of red. The right scene uses Adaptive Probe Volumes, so each part of the car is the same shade of red. ](Images/probevolumes-per-pixel.png)
The car model is made up of separate GameObjects. The left scene uses Light Probe Groups, which use per-object lighting, so each part of the car samples a single blended probe value. The right scene uses Adaptive Probe Volumes, which use per-pixel lighting, so each part of the car samples its nearest probes. This image uses the ArchVizPRO Photostudio HDRP asset from the Unity Asset Store. ![](Images/probevolumes-reflection-probe-normalization.png)
diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-fixissues.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-fixissues.md index 16eee27c819..90766a7a973 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-fixissues.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-fixissues.md @@ -14,11 +14,11 @@ HDRP uses the following techniques to minimise incorrect lighting data from Ligh You can check which Light Probes are invalid using the [Rendering Debugger](rendering-debugger-window-reference.md#ProbeVolume). -![](Images/probevolumes-virtualoffsetvsnot.png)
-In the Scene on the left, Virtual Offset isn't active and dark bands are visible. In the Scene on the right, Virtual Offset is active.
+![In the scene on the left, Virtual Offset isn't active so dark bands are visible. In the scene on the right, Virtual Offset is active so there are no dark bands.](Images/probevolumes-virtualoffsetvsnot.png)
+In the scene on the left, Virtual Offset isn't active so dark bands are visible. In the scene on the right, Virtual Offset is active so there are no dark bands. -![](Images/probevolumes-dilationvsnot.png)
-In the Scene on the left, Dilation isn't active and some areas are too dark. In the Scene on the right, Dilation is active.
+![In the scene on the left, Dilation isn't active so some areas are too dark. In the scene on the right, Dilation is active so the areas are no longer dark.](Images/probevolumes-dilationvsnot.png)
+In the scene on the left, Dilation isn't active so some areas are too dark. In the scene on the right, Dilation is active so the areas are no longer dark. ## Fix dark blotches or streaks @@ -39,7 +39,7 @@ You can also disable Virtual Offset for a Baking Set. Virtual Offset only affect ### Adjust Dilation -You can configure **Probe Dilation Settings** in the [Adaptive Probe Volumes panel](probevolumes-lighting-panel-reference.md) in the Lighting window). This changes how HDRP calculates the validity of Light Probes, and how invalid Light Probes use lighting data from nearby valid Light Probes. +You can configure **Probe Dilation Settings** in the [Adaptive Probe Volumes panel](probevolumes-lighting-panel-reference.md) in the Lighting window. This changes how HDRP calculates the validity of Light Probes, and how invalid Light Probes use lighting data from nearby valid Light Probes. You can adjust the following: @@ -56,9 +56,8 @@ You can also disable Dilation for a Baking Set. Dilation only affects baking tim Light leaks are areas that are too light or dark, often in the corners of a wall or ceiling. -![](Images/probevolumes-lightleak.JPG)
-A light leak. -
+![A wall with light leaks, where one side of the wall is too light and one side of the wall is too dark.](Images/probevolumes-lightleak.JPG)
+A wall with light leaks, where one side of the wall is too light and one side of the wall is too dark. Light leaks often occur when geometry receives light from a Light Probe that isn't visible to the geometry, for example because the Light Probe is on the other side of a wall. Adaptive Probe Volumes use regular grids of Light Probes, so Light Probes might not follow walls or be at the boundary between different lighting areas. @@ -151,9 +150,8 @@ Refer to [Probe Adjustment Volume component reference](probevolumes-adjustment-v Seams are artefacts that appear when one lighting condition transitions immediately into another. Seams are caused when two adjacent bricks have different Light Probe densities. Refer to [bricks](probevolumes-concept.md#how-probe-volumes-work) for more information. -![](Images/probevolumes-seams.JPG)
-Two seams. -
+![Two seams on a wall which show the sharp changes in lighting conditions between light and dark.](Images/probevolumes-seams.JPG)
+Two seams on a wall which show the sharp changes in lighting conditions between light and dark. URP fixes seams automatically. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-streaming.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-streaming.md index ece305d9a54..bbdfa985b21 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-streaming.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes-streaming.md @@ -32,7 +32,7 @@ The smallest section HDRP loads and uses is a cell, which is the same size as th To view the cells in an Adaptive Probe Volume, or debug streaming, use the [Rendering Debugger](rendering-debugger-window-reference.md#probe-volume-panel). -![](Images/probevolumes-debug-displayprobecells.PNG)
+![The Rendering Debugger with **Display Cells** enabled. Each green rectangle is a cell.](Images/probevolumes-debug-displayprobecells.PNG)
The Rendering Debugger with **Display Cells** enabled. ## Load APV data from AssetBundles or Addressables diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/raytracing-troubleshooting.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/raytracing-troubleshooting.md index 6e79d2e5e05..4cc87068da3 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/raytracing-troubleshooting.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/raytracing-troubleshooting.md @@ -44,8 +44,8 @@ You might notice the following symptoms when shadows from directional lights are - The lighting feels flat or unrealistic, especially in large outdoor scenes with sunlight. - - + Directional shadow fallback off + Directional shadow fallback on ### Cause @@ -69,8 +69,8 @@ The following symptoms indicate missing shadows from punctual lights: - Light leaks occur in areas where shadows are meant to be cast by nearby objects. - - + Shadow culling off + Shadow culling on ### Cause @@ -126,8 +126,8 @@ The following symptoms might occur when an indirect specular light leaks: - Reflections seem disconnected from nearby objects or appear out of place. - - + Specular reflection probe off + Specular reflection probe on ### Cause @@ -176,9 +176,9 @@ The following symptoms can indicate indirect diffuse light leaks: + title="Ambient probe dimmer 1" alt="Ambient probe dimmer 1"> + title="Ambient probe dimmer 0" alt="Ambient probe dimmer 0"> ### Cause @@ -207,9 +207,9 @@ Fog light leaks have the following symptoms: + title="Fog color: sky color" alt="Fog color: sky color"> + title="Fog color: Black" alt="Fog color: Black"> ### Cause diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/refraction-models.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/refraction-models.md index 27f67be8952..d11b075b2e2 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/refraction-models.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/refraction-models.md @@ -11,7 +11,7 @@ If you use this model, HDRP does the following [during the refraction process](O 2. HDRP uses a sphere to approximate the object's shape, and the diameter of the sphere to determine how far the light travels inside. 3. When the light leaves the object, HDRP uses the sphere's surface normal as part of calculating the second refraction. This determines how much the light bends back. -
+The sphere refraction model with an angel statue object. Three rays travel from the camera, and bend as they travel through the object.
How HDRP calculates the refracted light for three example pixels, if you use a **Refraction Thickness Map** to set different widths for different pixels on an object. The solid orange lines are vectors that represent the direction of light from the camera to a pixel. The white circles represent spheres that approximate the object's thickness. The solid blue lines are surface normals. To control the diameter of the spheres: @@ -21,10 +21,10 @@ To control the diameter of the spheres: If you use the sphere refraction model with a spherical object, the Scene you see through the object might be upside-down. -![](Images/refraction-inversion-diagram.svg)
+![Light rays from a tree converging to a point (the inversion point) then continuing, so the tree is upside-down when the rays reach the camera.](Images/refraction-inversion-diagram.svg)
The light rays bend a lot when they exit the object, so they cross over and hit the opposite end of the tree. -![](Images/refraction-inversion.png)
+![A scene with a translucent sphere floating in a forest.](Images/refraction-inversion.png)
The view through a refractive sphere is upside-down. ## Planar refraction model @@ -42,7 +42,7 @@ If you use this model, HDRP does the following [during the refraction process](O 2. HDRP uses a parallel plane to approximate the exit surface (this is a 'planar projection'), and the distance between the object's surface and the plane to determine how far the light travels inside. 3. When the light leaves the object, HDRP bends the light back so it has the same direction as the light that entered the object. -
+The planar refraction model with an angel statue object. Three rays travel from the camera, and bend as they travel through the object.
How HDRP calculates the refracted light for three example pixels, if you use a **Refraction Thickness Map** to set different widths for different pixels on an object. The solid orange lines are vectors that represent the direction of light from the camera to a pixel. The dotted blue lines represent parallel planes approximating the object's thickness. The solid blue lines are surface normals. To control the distance between the planes: @@ -52,10 +52,10 @@ To control the distance between the planes: Set the thickness to the approximate width of the object. The bigger the width, the more visible the refraction effect. -![](Images/refraction-thickness-diagram.svg)
+![A camera viewing a tree through two refractive objects. The light bends more as it travels through the thicker object.](Images/refraction-thickness-diagram.svg)
With a thicker object, the light is offset by a greater amount. -![](Images/refraction-thickness.png)
+![Three transparent cubes of increasing thickness, in front of a checkerboard pattern.](Images/refraction-thickness.png)
Objects with increasing thickness, showing how the light is increasingly deformed. ## Thin refraction model diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/rendering-and-post-processing.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/rendering-and-post-processing.md index e5bd1fced6f..b2e7215b017 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/rendering-and-post-processing.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/rendering-and-post-processing.md @@ -4,7 +4,7 @@ Control how the High Definition Render Pipeline (HDRP) renders a scene and apply |Page|Description| |-|-| -|[Understand execution order](rendering-execution-order.md)|Learn the order in which HDRP executes render passes.| +|[Execution order reference](rendering-execution-order.md)|Learn the order in which HDRP executes render passes.| |[Understand post-processing](Post-Processing-Main.md)|Learn how HDRP performs post-processing.| |[Anti-aliasing](Anti-Aliasing.md)|Use an antialiasing method to reduce the appearance of jagged edges.| |[Dynamic resolution](Dynamic-Resolution.md)|Change the screen resolution automatically to maintain a stable frame rate.| diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/rendering-execution-order.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/rendering-execution-order.md index bb94eb05881..8f4f69374de 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/rendering-execution-order.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/rendering-execution-order.md @@ -1,35 +1,135 @@ -# Understand execution order +# Execution order reference -The following diagram shows the order in which the High Definition Render Pipeline (HDRP) executes render passes. +The High Definition Render Pipeline (HDRP) executes render passes using the following stages: -For more information about injection points, refer to [injection points](Custom-Pass-Injection-Points.md). +1. Prepass +2. Prepare LightLoop data +3. Opaque and sky +4. Transparent +5. Post-processing +6. Overlay gizmos -![](Images/HDRP-frame-graph-diagram.png) +## Prepass stage + +HDRP executes the prepass stage in the following order: + +1. Before Rendering - custom pass injection point +2. Prepass - depth, normal/smoothness, motion vectors +3. PreRenderSky/Cloud +4. DBuffer - no emissive decal +5. GBuffer +6. After Depth and Normal - custom pass injection point +7. Depth pyramid +8. Camera motion vectors + +## Prepare Lightloop data stage + +1. Shadows or cached shadows, or an [optional async pass](#optional-async-stage) +2. Screen space shadows +3. Generate MaxZPass + + +### Optional async pass + +The optional async pass calculates the following: + +- Lights list +- Screen space ambient occlusion (SSAO) +- Contact shadows +- Volume voxelization +- Screen space reflections (SSR) +- Screen space global illumination (SSGI) + +### Opaque and sky stage + +HDRP executes the opaque and sky stage in the following order: + +1. Deferred lighting +2. Forward opaques +3. Decal emissive +4. Subsurface scattering +5. Sky +6. After Opaque and Sky - custom pass injection point +7. After Opaque and Sky - custom post-processing injection point + +### Transparents stage + +HDRP executes the transparents stage in the following order: + +1. Clear stencil +2. Pre-refraction transparent depth prepass +3. Water G-buffer +4. Waterline +5. Transparent depth prepass +6. Volumetric lighting +7. Fog +8. Clouds +9. High Quality Line Rendering +10. Screen space reflections (SSR) +11. Before PreRefraction - custom pass injection point +12. Transparent pre-refraction +13. Water lighting +14. Color pyramid pre-refraction +15. Screen space multiple scattering (SSMS) +16. Before Transparent - custom pass injection point +17. Transparents +18. Low-resolution transparents +19. Combine transparents +20. Transparent PostPass +21. Transparent UI: HDR output + +## Post-processing stage + +HDRP executes the post-processing stage in the following order: + +1. Color pyramid distortion +2. Distortion +3. Before Post Process - custom pass injection point +4. After Post Process Objects +5. Exposure +6. Deep learning super sampling (DLSS) upsample - before Post +7. Before Temporal anti-aliasing (TAA) - custom post-processing injection point +8. TAA or subpixel morphological anti-aliasing (SMAA) +9. Before Postprocess - custom post-processing injection point +10. Depth of field +11. DLSS upsample - After depth of field +12. Motion blur +13. After Post Process Blurs - custom post-processing injection point +14. Panini projection +15. Lens Flare (SRP) +16. Bloom +17. Uber pass - color grading, lens distortion, chromatic effect, vignette, composite +18. After Post Process - custom post-processing injection point +19. DLSS upsample - After Post +20. Final - grain, dithering, composite, fast approximate anti-aliasing (FXAA) +21. After Post Process - custom post-processing injection point ## Post-processing effect execution order The post-processing system in HDRP applies post-processing effects in a specific order. The system also combines some effects into the same compute shader stack to minimize the number of passes. -### Execution order and effect grouping - HDRP executes post processing effects in the following order, from top to bottom. -| Post-processing passes | Compute shader stack | Final post-processing pass | -| -------------------------------------------------- | --------------------- | -------------------------- | -| NaN Killer | | | -| Anti-aliasing (TAA, SMAA) | | | -| Depth of Field | | | -| Motion Blur | | | -| Panini Projection | | | -| Bloom (Pyramid) | | | -| Color Grading (LUT Baking) | | | -| Screen Space Lens Flare (written in bloom texture) | | | -| Data driven lens flare | | | -| | Lens Distortion | | -| | Chromatic Aberration | | -| | Bloom (Apply) | | -| | Vignette | | -| | Color Grading (Apply) | | -| | | Antialiasing (FXAA) | -| | | Film Grain | -| | | 8-bit Dithering | +| **Effect** | **Execution order** | +|-|-| +| NaN remover | Post-processing pass | +| Anti-aliasing - TAA, SMAA | Post-processing pass | +| Depth of field | Post-processing pass | +| Motion blur | Post-processing pass | +| Panini projection | Post-processing pass | +| Bloom - pyramid | Post-processing pass | +| Color grading - look up table (LUT) baking | Post-processing pass | +| Screen space lens flare, written in bloom texture | Post-processing pass | +| Lens flare (SRP) | Post-processing pass | +| Lens distortion | Compute shader stack | +| Chromatic aberration | Compute shader stack | +| Apply bloom | Compute shader stack | +| Vignette | Compute shader stack | +| Apply color grading | Compute shader stack | +| Anti-aliasing - FXAA | Final post-processing pass | +| Film grain | Final post-processing pass | +| 8-bit dithering | Final post-processing pass | + +## Additional resources + +- [Injection points](Custom-Pass-Injection-Points.md) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/rendering-troubleshoot.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/rendering-troubleshoot.md index 819a6af902a..0016702a76d 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/rendering-troubleshoot.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/rendering-troubleshoot.md @@ -5,8 +5,10 @@ Identify and fix common problems with rendering, post-processing and custom pass | Page | Description | |-|-| |[Troubleshoot a Custom Pass](Custom-Pass-Troubleshooting.md)|Fix issues with custom pass effects.| -|[View a Custom Pass in the Frame Debugger](Custom-Pass-Frame-Debugger.md)| Use the Frame Debugger to identify issues with a custom pass.| |[Troubleshoot a custom post-processing effect](rendering-troubleshoot-custom-post-processes.md)|Fix issues with custom post-processing effects.| |[Understand and fix Not a Number (NAN) and Infinite (Inf) values](Post-Processing-Propagating-NaNs.md)|Learn how to identify and remove spreading NAN and Inf values.| |[Known issues](Known-Issues.md)|Fix problems you might have with material array size and local HDRP config packages.| +## Additional resources + +- [Check or find a rendering event](xref:frame-debugger-window-event-hierarchy) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/scene-setup.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/scene-setup.md index cb33e424dc8..da85f37ac8d 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/scene-setup.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/scene-setup.md @@ -8,3 +8,4 @@ Use Volumes in the High Definition Render Pipeline (HDRP) to partition your scen | [Set up a Volume](set-up-a-volume.md) | Create a Volume and assign a Volume Profile. | | [Configure Volume Overrides](configure-volume-overrides.md) | Create a Volume Override and configure its properties. | | [Create a Volume Profile](create-a-volume-profile.md) | Create and customize a Volume Profile. | +| [Troubleshooting volumes](volumes-troubleshooting.md) | Identify and resolve common issues when working with volumes. | diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/set-up-a-volume.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/set-up-a-volume.md index e264f54f8cc..5b587880ef8 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/set-up-a-volume.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/set-up-a-volume.md @@ -37,7 +37,7 @@ To add a volume to your scene and edit its Volume Profile, follow these steps: 2. In the **Scene** or **Hierarchy** view, select the new GameObject to view it in the Inspector. 3. In the **Volume** component, assign a Volume Profile asset. To create a new Volume Profile, select **New**. -The list of Volume Overrides that the Volume Profile contains appears below the Volume Profile asset. You can add or remove Volume Overrides and edit their properties. Refer to [Volume Overrides](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/manual/VolumeOverrides.html) for more information about changing the Volume Overrides and properties. +The list of Volume Overrides that the Volume Profile contains appears below the Volume Profile asset. You can add or remove Volume Overrides and edit their properties. Refer to [Volume Overrides](https://docs.unity3d.com/Manual/urp/VolumeOverrides.html) for more information about changing the Volume Overrides and properties. ### Example: Create a local post-processing effect diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/set-up-the-volumetric-sample-scene.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/set-up-the-volumetric-sample-scene.md deleted file mode 100644 index dc46b019537..00000000000 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/set-up-the-volumetric-sample-scene.md +++ /dev/null @@ -1,47 +0,0 @@ -# Set up a volumetric sample scene - -1. Select **Window** > **Package manager**. - -1. In the **Package manager** window, select **High Definition RP**. - -1. In the **Samples** tab, import the **Volumetric Samples**. - -1. In the **Project** window, go to **Assets** > **Samples** > **High Definition RP** > HDRP version number > **Volumetric samples** > **Scenes.** - -1. Select the **Volumetric Samples scene.** - -1. Go to **Assets** > **Samples** > **High Definition RP** > HDRP version number > **Volumetric sample**s > **Prefabs**. - -1. Drag one of the following sample prefabs in your scene: - -![](Images/3d-texture-mask-sample.webp) - -**3D Texture Mask Sample** - -![](Images/about-blending-modes.webp) - -**About Blending Modes** - -![](Images/cloudy-sample.webp) - -**Cloudy Sample** - -![](Images/foggy-orb-and-light-sample.webp) - -**Foggy Orb and Light Sample** - -![](Images/fumes-sample.webp) - -**Fumes Sample** - -![](Images/ground-smoke-prefab-sample.webp) - -**Ground Smoke Prefab Sample** - -![](Images/procedural-noise-fog-sample.webp) - -**Procedural Noise Fog Sample** - -![](Images/volumetric-heart-sample.webp) - -**Volumetric Heart Sample** diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/settings-and-properties-related-to-the-water-system.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/settings-and-properties-related-to-the-water-system.md index f452ff2a24b..b42c0ab9c6f 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/settings-and-properties-related-to-the-water-system.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/settings-and-properties-related-to-the-water-system.md @@ -7,949 +7,113 @@ This page explains the settings and properties you can use to configure the: * [Water system in the HDRP asset](#waterhdrpasset) -
- ## Water Volume Inspector + ### Additional properties To see properties related to Fade, Caustics Intensity, and Caustics Plane Band Distance, you must enable them in Preferences > Core Render Pipeline. Select the Visibility option All Visible. These properties are not visible by default because they are not essential to use the feature, being primarily for performance optimization. -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Water type - -Property - -Description -
-Pool - -River - -Ocean, Sea, or Lake -
-X -X -X -General -
-Surface Type - -Specifies the type of water body that this surface should imitate. -
-Geometry Type - -Specifies the shape of the water surface. -The options are: -
    -
  • Quad: Based on a square.
  • -
  • Instanced Quads: Creates a finite water surface with multiple instanced grids to keep a higher vertex density.
  • -
  • Custom Mesh: Based on a Mesh you provide. Overrides the vertical position of the vertices to keep the surface of the water consistently level.
  • -
  • Infinite (Ocean, Sea, or Lake only): Bounds the water surface with the Global Volume.
  • -
-
-Script Interactions - -Enable to have the ability to query the water surface position and current direction from the simulation. -
-- Full Resolution - -Only available if Script Interactions is active. Enable to have HDRP calculate the CPU simulation at full resolution. Otherwise, HDRP calculates the simulation at half resolution. Full resolution simulations demand more from the CPU. -
-- Evaluate Ripples - -Only available if Script Interactions is active. Enable to have HDRP include ripples in the simulation on the CPU. Increases visual fidelity, but demands more from the CPU. -
-Tessellation - -Enable to implement tessellation. -
-- Max Tessellation Factor - -Set the level of detail HDRP applies to the surface geometry relative to the camera's position. A higher maximum tessellation factor makes the water surface more detailed and responsive to waves but increases the computational load. -
-- Tessellation Factor Fade Start - -Set the distance from the camera where the tessellation detail begins to decrease. -
-- Tessellation Factor Fade Range - -Set the distance from the camera at which the tessellation factor reaches 0. -
-X - -X - -X - -Simulation -
-Time Multiplier - -Determines the speed at which HDRP presents the water simulation. Values above 1 increase the simulation speed; values lower than 1 decrease it. -
-Simulation Mask - -Set the texture HDRP uses to reduce or stop water frequencies depending on the water surface type.
  • Ocean: Reduces swell (red channel), agitation (green), and ripples (blue).
  • River: Reduces agitation (red channel) and ripples (green channel).
  • Pool: Reduces ripples (red channel).
The simulation mask reduces the intensity of these water effects by multiplying the mask values with the corresponding water properties in the shader. Darker areas (closer to black) reduce the intensity, while lighter areas (closer to white) increase it.
For more information, refer to Decals and masking in the Water System. -
-X - -X - -X - -Water Decals -
-Region Size - -Set the width and length in meters of the region HDRP applies the Water Decal to. -
-Region Anchor - -Anchor the Water Decal to a GameObject. By default, the region follows the camera. To make the region static, anchor it to the water surface. -
-Deformation - -Enable to activate the option for creating a deformation decal. -
-Foam - -Enable to activate the option for creating a foam decal. -
- - -X - -X - -River surface types: Agitation
-Ocean, Sea, or Lake surface types: Swell
-
-Repetition Size - -The size of the water patch in meters. Higher values result in less visible repetition. Also affects the Maximum Amplitude of Swell or Agitation simulation bands. -
-Distant Wind Speed - -Represents the speed of distant wind in kilometers per hour. This property indirectly determines the Maximum Amplitude and shape of the swell in a nonlinear way. Nonlinear means that changes to Distant Wind Speed do not have a proportional effect on swells. -
-Distant Wind Orientation - -Represents the orientation of distant wind counterclockwise to the world space X vector. (This vector aligns with the blue handle of the Transform Gizmo). Only affects a swell with a Chaos value less than 1. -
-Chaos - -Determines how much the Local Wind Orientation affects ripples; values less than 1 increase Local Wind Orientation's influence. Values more than 1 decrease Local Wind Orientation's influence. -
-Current - -Translates the swell at a constant speed in the given direction. -
    -
  • Speed: Determines how fast the current moves, measured in kilometers per hour.
  • -
  • Orientation: Determines the orientation of the current in degrees relative counterclockwise to the world space X vector. (This vector aligns with the blue handle of the Transform Gizmo).
-
- -X - -X - -Simulation Band properties -
-Amplitude Dimmer - -Amplitude Dimmer (Ocean, Sea, or Lake)
-
    -
  • First band: The degree to which amplitude reduces on the first simulation band of the Swell.
  • -
  • Second Band: The degree to which amplitude reduces on the second simulation band of the Swell.
- -
-Amplitude Dimmer (River)
-A dimmer that determines the degree to which amplitude can reduce on the Agitation simulation band. For example, if your Amplitude value is 10 meters and you set this property to 0.5, your Agitation is 5 meters high.
- - -
-Fade - -Additional property. When this option is active, HDRP begins fading the contribution of this simulation band at the distance from the camera that the Range value specifies. This helps minimize distant aliasing artifacts. -
-- Range - -Additional property. The distance from the camera in meters at which HDRP begins to fade the contribution of this simulation band. -
-Total Amplitude - -The combined amplitude of all bands. -
- - - -X - -Simulation Band property specific to Ocean, Sea, or Lake, appears after Amplitude Mulitplier for each band. -
-Max Amplitude - -The amplitude of this band, in meters. This is the sum of the original amplitude and the multiplied amplitude. -
-X - -X - -X -Ripples
-Local Wind Speed - -Represents the speed of local wind blowing over the water surface in kilometers per hour. This determines the maximum amplitude and shape of ripples indirectly, in a nonlinear way. Nonlinear means that changes to Local Wind Speed do not have a proportional effect on ripples. -
-Local Wind Orientation - -Represents the orientation of local wind counterclockwise to the world space X vector. (This vector aligns with the blue handle of the Transform Gizmo). Only affects ripples with a Chaos value less than 1. - -River and Ocean, Sea, or Lake only: If set to 0, matches the Distant Wind Orientation. - - -
-Chaos - -Determines how much the Local Wind Orientation affects ripples; values below 1 increase Local Wind Orientation's influence. Values above 1 decrease the influence of Local Wind Orientation. -
-Current - -
    -
  • Pool: Determines the orientation and constant speed of the swells that displace ripples in the pool. -
  • -
  • River: Determines the orientation and constant speed of the current that displaces ripples in the river. By default, River Current inherits the Agitation values, but you can also set custom orientation and speed values.
  • -
  • Ocean, Sea, or Lake: -Determines the orientation and constant speed of the current that displaces ripples in the river. By default, Ocean, Sea, or Lake Current inherits the Swell values, but you can also set custom orientation and speed values.
  • -
  • Speed: Determines how fast the current moves, measured in kilometers per hour.
  • -
  • Orientation: Determines the orientation of the current in degrees relative counterclockwise to the world space X vector. (This vector aligns with the blue handle of the Transform Gizmo).
-
-Fade - -Additional property. When this option is active, HDRP begins fading the contribution of this simulation band at the distance from the camera that corresponds to the Range value in meters. This helps minimize distant aliasing artifacts. -
-- Range - -Additional property. The distance from the camera, in meters, at which HDRP begins to fade the contribution of this simulation band. -
-x - -X - -X -Deformation
-Enable -Specify if this surface supports deformation..
-Resolution -The resolution of the deformation texture used to represent the deformation area. -
    -
  • 256 x 256: Set the deformation texture to 256 x 256 pixels.
  • -
  • 512 x 512: Set the deformation texture to 512 x 512 pixels.
  • -
  • 1024 x 1024: Set the deformation texture to 1024 x 1024 pixels.
  • -
  • 2048 x 2048: Set the deformation texture to 2048 x 2048 pixels.
-
-Area Size -Set the size of the deformation area in meters.
-Area Offset -Set the offset of the deformation area in meters
- - -X - -X -
-Foam -
Persistence MultiplierDetermines the lifespan of surface foam. Higher values cause foam to persist longer and leave a trail.
-Current Influence -Specifies the influence of the swell current on foam. A value of zero means foam stays still, a value of one makes the foam match with current direction and speed. Ripple motion doesn't have any impact on foam.
-Color -Determines the foam color, which HDRP multiplies by the foam texture to produce the final appearance.
-Smoothness -Determines how much the foam reflects light.
-Texture Tiling -Sets the per-meter tiling for the foam texture.
Wind Speed DimmerDetermines foam intensity. The normalized Distant Wind Speed determines the X axis value. The spline editor configures the Y axis value. Refer to Foam in the water system for more information.
Simulation Foam AmountDetermines the amount of surface foam. Higher values generate larger foam patches.
- X - - X - - X - - Appearance -
-Custom Material - -Select a custom material Unity can use to render the water surface. If this is None, Unity uses the default material. -
-Smoothness -
-Close - -Determines how detailed the water surface is when closer to the Scene camera than the smoothness Fade Start value. -
-- Distant - -Determines how detailed the water surface is when further from the Scene camera than the smoothness Fade Distance value. -
-Fade Range - -Specifies the range over which Unity interpolates smoothness from close to distant.
-
    -
  • Start: Determines the distance in meters from the Scene camera at which HDRP begins removing detail and interpolating the smoothness value for the water surface.
  • -
  • Distance: Determines the distance in meters from the Start point at which the Distant smoothness value takes effect.
  • -
-
-Refraction -
-Color - -Determines the color HDRP uses to simulate underwater refraction. -
-Maximum Distance - -Determines the maximum distance from the Scene camera Unity renders underwater refraction. Higher values increase the distortion amount. -
-Absorption Distance - -Determines how deep into the water the camera can perceive, in meters. -
-Scattering -
-Color - -Determines the color that Unity uses to simulate underwater scattering. -
-Ambient Term - -Determines the intensity of the ambient scattering term. -
-Height Term - -Determines the intensity of height-based scattering. The higher the vertical displacement, the more the water receives scattering. You can adjust this for artistic purposes. -
-Displacement Term - -Determines the intensity of displacement-based scattering. The larger this value is, the more the water receives scattering. -
-Direct Light Body Term - -Determines the intensity of direct light scattering on the bodies of waves. -
- - -X - -X - -Direct Light Tip Term - -Determines the intensity of direct light scattering on the tips of waves. You can perceive this effect more at grazing angles. -
-X - -X - -X - -Caustics -
-X - -X - -X - -Caustics - -Enable to render caustics. -
-Caustics Resolution - -The resolution at which Unity renders caustics in the simulation. -
- - -X - -X - -Simulation Band - -Determines which Simulation Band Unity uses for caustics evaluation.
-For Ocean, Sea, or Lake water surfaces, the Swell simulation determines the first (index 0) and second (index 1) simulation band values. Ripples determine the third band value (index 2).
-The River type has two Simulation Bands, one for Agitation simulation and one for Ripples. -For the Pool type, ripples determine the caustics evaluation. A higher Local Wind Speed value results in larger, looser caustics. -
-X - -X - -X - -Virtual Plane Distance - -Determines the distance from the camera at which Unity projects simulated caustics. High values generate sharper caustics but can cause artifacts. The larger the waves are, the further the plane distance should be to obtain sharp caustics. -
-Caustics Intensity - -Additional property. The normalized intensity of underwater caustics. -
-Caustics Plane Blend Distance - -Additional property. The vertical blending distance of the water caustics, in meters from the camera. -
-X - -X - -X - -Underwater -
-Volume Bounds - -Specifies the collider Unity uses to determine the volume in which it applies the underwater effect for non-infinite water surfaces. -
-Volume Priority - -Determines which surface Unity prioritizes for underwater rendering when multiple water surfaces overlap. Unity renders surfaces with a higher value first. -
-Transition Size - -Where the distance between the camera and the water surface is lower than or equal to this value, Unity begins to blend the water surface rendering with the underwater rendering to prevent a sharp cutoff between them. -
-Absorption Distance Multiplier - -Determines how far the camera can see underwater. For example, a value of 2.0 means the camera can see twice as far underwater as you can from the water surface. -
-X - -X - -X - -Miscellaneous -
-Rendering Layer Mask - -Specifies the rendering layers that render on the water surface. To use this feature, enable Decal Layers and/or Light Layers in your HDRP Asset. -
-Debug Mode - -Specifies the view of the debug mode used for the water surface. -
- - - -
- +### General + +| **Pool** | **River** | **Ocean** | **Property** | **Subproperty** | **Description** | +|--------------|--------------|--------------|-------------------------|------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Yes | Yes | Yes | **Surface Type** | N/A | Specifies the type of water body that this surface should imitate. | +| Yes | Yes | Yes | **Geometry Type** | N/A | Specifies the shape of the water surface. The options are: Quad: Based on a square. Instanced Quads: Creates a finite water surface with multiple instanced grids to keep a higher vertex density. Custom Mesh: Based on a Mesh you provide. Overrides the vertical position of the vertices to keep the surface of the water consistently level. Infinite (Ocean only): Bounds the water surface with the Global Volume. | +| Yes | Yes | Yes | **Time Multiplier** | N/A | Specifies the shape of the water surface. The options are: Quad: Based on a square. Instanced Quads: Creates a finite water surface with multiple instanced grids to keep a higher vertex density. Custom Mesh: Based on a Mesh you provide. Overrides the vertical position of the vertices to keep the surface of the water consistently level. Infinite (Ocean only): Bounds the water surface with the Global Volume. | +| Yes | Yes | Yes | **Script Interactions** | N/A | Enable to have the ability to query the water surface position and current direction from the simulation. Refer to Scripting in the water system for more information. | +| Yes | Yes | Yes | N/A | **Evaluate Ripples** | Only available if Script Interactions is active. Enable to have HDRP include ripples in the simulation on the CPU. Increases visual fidelity, but demands more from the CPU. | +| Yes | Yes | Yes | **Tessellation** | N/A | Enable to implement tessellation. | +| Yes | Yes | Yes | N/A | **Max Tessellation Factor** | Set the level of detail HDRP applies to the surface geometry relative to the camera's position. A higher maximum tessellation factor makes the water surface more detailed and responsive to waves but increases the computational load. | +| Yes | Yes | Yes | N/A | **Tessellation Factor Fade Start** | Set the distance from the camera where the tessellation detail begins to decrease. | +| Yes | Yes | Yes | N/A | **Tessellation Factor Fade Range** | Set the distance from the camera at which the tessellation factor reaches 0. | + +### Simulation + +| **Pool** | **River** | **Ocean** | **Property** | **Subproperty** | **Description** | +|--------------|--------------|--------------|---------------------|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Yes | Yes | Yes | **Water Mask** | N/A | Sets the texture used to attenuate or suppress swell (red and green channels) and ripples (blue channel) water frequencies. | +| No | Yes | Yes | **Agitation/Swell** | N/A | N/A | +| No | Yes | Yes | N/A | **Repetition Size** | Controls the size of the water patch in meters. Larger values results in less visible repetition across the water surface. This parameter also affects the maximum amplitude of the swell frequency bands. | +| No | Yes | Yes | N/A | **Distant Wind Speed** | Controls the speed of the distant wind in kilometers per hour that blowed over the water surface for a long period of time. This indirectly controls the maximum amplitude and shape of the swell in a non-linear way. | +| No | Yes | Yes | N/A | **Chaos** | Controls how directional the swell is. The lower the value, the more the swell waves are traveling in the Distant Wind Orientation. | +| No | Yes | Yes | N/A | **Orientation** | Sets the orientation of distant wind in degrees in a counterclockwise fashion relative to the X world vector. This parameter only affects the swell with a chaos value inferior to one. | +| No | Yes | Yes | N/A | **Current Speed** | Sets the speed of the current for the swell in kilometers per hour. This current translates the I swell at a constant speed. | +| No | Yes | Yes | N/A | **Current Map** | Sets the texture used to modify the local swell or agitation currents. The Red and Green channel of Outdoor the texture contain the 2D direction of the current and Blue channel contains the influence of the current map. | +| No | No | Yes | N/A | **First/Second Band** | N/A | +| No | Yes | Yes | N/A | **Amplitude Dimmer** | Controls the attenuation of amplitude on the frequency band of the swell. | +| No | No | Yes | N/A | **Max Amplitude** | Displays the current maximum amplitude of the frequency band. | +| No | Yes | Yes | N/A | **Fade** | When enabled, HDRP starts fading the contribution of this frequency band over a given range. This helps reduce the aliasing artifacts at a distance. Automatic mode computes the fading range based on the Repetition Size parameter. | +| No | Yes | Yes | N/A | **Total Amplitude** | Displays the current maximum amplitude of the swell. This is the sum of the first and second frequency bands. | +| Yes | Yes | Yes | **Ripples** | N/A | When enabled, the Water System allows you to simulate and render ripples. The frequency range is not affected by the swell/agitation parameters. | +| Yes | Yes | Yes | N/A | **Local Wind Speed** | Controls the speed of the local wind in kilometers per hour that is blowing over the water surface. This indirectly controls the maximum amplitude and shape of the ripples in a non-linear way. | +| Yes | Yes | Yes | N/A | **Chaos** | Controls how directional the ripples are. The lower the value, the more the ripples are traveling in the Local Wind Orientation. | +| Yes | Yes | Yes | N/A | **Motion** | Specifies if the Local Wind's Orientation and Current properties are inherited from the Swell/Agitation or set independently. | +| Yes | Yes | Yes | N/A | **Fade** | When enabled, HDRP starts fading the contribution of this frequency band over a given range. This helps reduce the aliasing artifacts at a distance. Automatic mode computes the fading range based on the Repetition Size parameter. | + +### Water Decals + +| **Pool** | **River** | **Ocean** | **Property** | **Subproperty**| **Description** | +|--------------|--------------|--------------|-------------------|----------------|-----------------------------------------------------------------------------------------------------------| +| Yes | Yes | Yes | **Region Size** | N/A | Sets the extent of the decal region in meters. | +| Yes | Yes | Yes | **Region Anchor** | N/A | Sets the center of the decal region. If nothing is set, the region will follow the main camera transform. | +| Yes | Yes | Yes | **Deformation** | N/A | Specifies if decals deforming the surface of the water are supported. | +| Yes | Yes | Yes | N/A | **Resolution** | Sets the resolution of the texture covering the region. | +| Yes | Yes | Yes | **Foam** | N/A | Specifies if decals injecting foam are supported. | +| Yes | Yes | Yes | N/A | **Resolution** | Sets the resolution of the texture covering the region. | + + + +### Appearance + +| **Pool** | **River** | **Ocean** | **Property** | **Subproperty** | **Description** | +|--------------|--------------|--------------|---------------------|-----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Yes | Yes | Yes | **Custom Material** | N/A | Sets a custom material that will be used to render the water surface. If set to None, a default material is used. | +| Yes | Yes | Yes | **Smoothness** | N/A | N/A | +| Yes | Yes | Yes | N/A | **Value Range** | Controls the smoothness value range over the Fade region. | +| Yes | Yes | Yes | N/A | **Fade Range** | Specifies the range over which the smoothness is interpolated from close to distant. | +| Yes | Yes | Yes | **Refraction** | N/A | N/A | +| Yes | Yes | Yes | N/A | **Color** | Sets the color that is used to simulate the underwater refraction. | +| Yes | Yes | Yes | N/A | **Maximum Distance** | Controls the maximum distance in meters used to clamp the underwater refraction depth. Higher value increases the distortion amount. | +| Yes | Yes | Yes | N/A | **Absorption Distance** | Controls the approximative distance in meters that the camera can perceive through a water surface. This distance can vary widely depending on the intensity of the light the object receives. | +| Yes | Yes | Yes | **Scattering** | N/A | N/A | +| Yes | Yes | Yes | N/A | **Color** | Sets the color that is used to simulate the underwater refraction. The luminance of the color affects the intensity of the scattering terms. | +| Yes | Yes | Yes | N/A | **Ambient Term** | Controls the intensity of the ambient scattering term. You can adjust this for artistic purposes. | +| Yes | Yes | Yes | N/A | **Height Term** | Controls the intensity of the height based scattering. The higher the vertical displacement, the more the water receives scattering. You can adjust this for artistic purposes. | +| Yes | Yes | Yes | N/A | **Displacement Term** | Controls the intensity of the displacement-based scattering. The bigger the horizontal displacement, the more the water receives scattering. You can adjust this for artistic purposes. | +| No | Yes | Yes | N/A | **Direct Light Tip Term** | Controls the intensity of the direct light scattering on the tip of the waves. The effect is more perceivable at grazing angles. | +| Yes | Yes | Yes | N/A | **Direct Light Body Term** | Controls the intensity of the direct light scattering on the body of the waves. The effect is more perceivable at grazing angles. | +| Yes | Yes | Yes | N/A | **Maximum Height Override** | Specifies a maximum wave height that overrides the simulation to support scattering properly for deformers. | +| Yes | Yes | Yes | **Caustics** | N/A | N/A | +| Yes | Yes | Yes | N/A | **Caustics Resolution** | Specifies the resolution at which the water caustics are rendered (simulation only). | +| Yes | Yes | Yes | N/A | **Simulation Band** | Controls which simulation band is used for the caustics evaluation. The first (index 0) and second band (index 1) come from the swell simulation and the third (index 2) one from the ripples. | +| Yes | Yes | Yes | N/A | **Virtual Plane Distance** | Sets the distance at which the simulated caustics are projected. High values generate sharper caustics but can cause artefacts. The larger the waves are, the further the plane distance should be to obtain sharp caustics. | +| Yes | Yes | Yes | N/A | **Tiling Factor** | Sets a tiling factor for the water caustics. | +| Yes | Yes | Yes | N/A | **Intensity** | Sets the intensity of the under-water caustics. | +| Yes | Yes | Yes | N/A | **Caustics Plane Blend Distance** | Sets the vertical blending distance for the water caustics. | +| Yes | Yes | Yes | N/A | **Directional Shadow** | When enabled, the water caustics will take into account the directional light's shadow. | +| Yes | Yes | Yes | **Underwater** | N/A | When enabled, HDRP will apply a fog and color shift to the final image when the camera is under the surface. This feature has a cost even when the camera is above the water surface. | + +### Foam + +| **Pool** | **River** | **Ocean** | **Property** | **Subproperty** | **Description** | +|--------------|--------------|--------------|----------------------------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Yes | Yes | Yes | **Persistence Mutliplier** | N/A | Specifies the decal foam persistence multiplier. A higher value will lead to the foam remaining visible Outdoor longer. This option requires Foam to be enabled in the Water Decals section. | +| Yes | Yes | Yes | **Current Influence** | N/A | Specifies the influence of the swell current on foam. A value of zero means foam stays still, a value of one makes the foam match with current direction and speed. Ripples motion have no impact on foam. | +| Yes | Yes | Yes | **Color** | N/A | Sets the foam color. | +| Yes | Yes | Yes | **Smoothness** | N/A | Controls the simulation foam smoothness. | +| No | Yes | Yes | **Texture Tiling** | N/A | Sets the per-meter tiling for the foam texture. | +| No | Yes | Yes | **Simulation Foam Amount** | N/A | Sets the amount of foam. | +| No | Yes | Yes | N/A | **Mask** | Sets the texture used to attenuate or suppress the simulation foam. The red channel of the texture is used for the masking. | +| No | Yes | Yes | N/A | **Wind Speed Dimmer** | Controls the foam intensity depending on the normalized Distant Wind Speed. The X axis refers to the normalized Distant Wind Speed, the Y axis refers to the dimmer value. | + +### Miscellaneous + +| **Pool** | **River** | **Ocean** | **Property** | **Description** | +|--------------|--------------|--------------|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| +| Yes | Yes | Yes | **Rendering Layer Mask** | Specifies the rendering layers that render on the water surface. To use this feature, enable Decal Layers and/or Light Layers in your HDRP Asset. | +| Yes | Yes | Yes | **Debug Mode** | Specifies the view of the debug mode used for the water surface. | # Water system volume override @@ -958,66 +122,12 @@ Specifies the view of the debug mode used for the water surface. To use a Volume Override, you must first add a Volume Profile. Refer to The water system Volume Override for more information.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Property - -Description -
-General -
-State - -Enable the override to render water surfaces. -
-Level of Detail -
-Triangle Size - -Sets the size of the triangle edge in screen space. -
-Lighting -
-Ambient Probe Dimmer - -Determines the influence of the ambient light probe on the water surface. -
-
+| **Property** | **Description** | +|-----------------------------------------|---------------------------------------------------------------------------| +| **General** > **State** | Enable the override to render water surfaces. | +| **Level of Detail**> **Triangle Size** | Sets the size of the triangle edge in screen space. | +| **Lighting** > **Ambient Probe Dimmer** | Determines the influence of the ambient light probe on the water surface. | # Water system in the rendering debugger @@ -1026,7 +136,6 @@ Determines the influence of the # water system in the HDRP Asset diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/troubleshooting-volumetric-clouds-rendering-issues.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/troubleshooting-volumetric-clouds-rendering-issues.md new file mode 100644 index 00000000000..a2d60158e32 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/troubleshooting-volumetric-clouds-rendering-issues.md @@ -0,0 +1,23 @@ +# Troubleshooting Volumetric Clouds rendering issues + +Prevent far-away clouds from disappearing when the camera moves along the y-axis, especially when traversing the clouds. + +## Symptoms + +Far-away clouds disappear as the camera moves along the y-axis when the **Rendering Space** is set to **World**. + +## Cause + +To enhance performance, the default number of steps used to evaluate the clouds' transmittance is low. This causes the clouds further away to disappear as the camera moves along the y-axis. + +**Note:** In Unity 6, the default rendering space was changed to **World**, making this issue more noticeable than in Unity 2022 LTS, where **Camera** was the default setting. + +## Resolution + +To prevent far-away clouds from disappearing, increase the **Num Primary Steps** value in the **Quality** section of the **Volumetric Clouds** override. + +**Important:** A high **Num Primary Steps** value can hinder performance. Adjust this setting with caution. + +## Additional resources + +- [Create realistic clouds (volumetric clouds)](create-realistic-clouds-volumetric-clouds.md) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/understand-volumes.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/understand-volumes.md index 99e3cd3fcb8..02fca675ff2 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/understand-volumes.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/understand-volumes.md @@ -28,6 +28,8 @@ Refer to the following for more information: - [Create a Volume Profile](create-a-volume-profile.md) - [Configure Volume Overrides](configure-volume-overrides.md) + + ## Default volumes All HDRP scenes have two default global volumes: @@ -41,3 +43,7 @@ Refer to the following for more information: - [Configure the Default Volume](set-up-a-volume.html#configure-the-default-volume) - [Configure the global volume for a quality level](set-up-a-volume.html#configure-the-global-volume-for-a-quality-level) + +## Caching for volumes + +When you first configure your project, Unity computes the values for [default volumes](#default-volumes) once and then caches them for performance and optimization. Caching prevents repeated calculations during gameplay and enables efficient interpolation between settings. This means that changes to these settings in your script will not have any effect. To implement changes that affect your scene despite caching, refer to [Troubleshooting volumes](volumes-troubleshooting.md). \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/volumes-troubleshooting.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/volumes-troubleshooting.md new file mode 100644 index 00000000000..819d6ddba09 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/volumes-troubleshooting.md @@ -0,0 +1,34 @@ +# Troubleshooting volumes + +Identify and resolve common issues when working with volumes. + +## Volume settings aren't updated via scripting + +Changing the values of a Volume Profile currently assigned as Default Volume Profile or Quality Volume Profile through scripting has no effect. + +### Cause + +Unity caches the values of the Project settings for volumes at startup or when you edit the values through the Unity Editor. This means that changes to these settings in your script will not affect your scene unless you explicitly update the cache. For more information, refer to [Understand Volumes](understand-volumes.md). + +### Resolution + +To resolve this issue, use one of the following options. + +#### Create a Global Volume in a scene and override properties using it + +Create a **Global Volume** in a scene and override the properties of a Default Volume Profile using it. Unity doesn't cache properties of a **Global Volume** defined in your scene. + +To configure a Volume Profile to receive updates via a script: + +1. [Add a **Global Volume**](set-up-a-volume#add-a-volume) to the scene. +2. [Add a **Volume Override**](VolumeOverrides) to the **Global Volume**. +3. In the **Volume Override** Inspector window, enable the property you want to change. +4. Modify the corresponding property in your script. + +Unity updates the property correctly because it's not tied to the cached values. + +#### Recache the initial values + +You can explicitly force the volume framework to recalculate its cached values by using the [VolumeManager.instance.OnVolumeProfileChanged(volumeProfile)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.core@latest/index.html?subfolder=/api/UnityEngine.Rendering.VolumeManager.html) method after modifying a value. + +**Important**: Forcing the volume framework to recalculate the cache adds extra workload. This can decrease the performance of volume interpolation in your project. Use this method only when necessary. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/water-caustics-in-the-water-system.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/water-caustics-in-the-water-system.md index e379a323308..5c7333ed6a2 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/water-caustics-in-the-water-system.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/water-caustics-in-the-water-system.md @@ -1,6 +1,6 @@ # Customize caustics in the water system -![](Images/caustics.jpg) +![A swimming pool with water caustics below the surface.](Images/caustics.jpg) Customize the appearance of caustics, which are bright light patterns on GameObjects caused by the curved water surface reflecting and refracting light. @@ -16,7 +16,7 @@ To calculate caustics from larger waves in a river, ocean, sea, or lake, follow To prevent aliasing artifacts, set **Caustics Resolution** to a higher value. -![](Images/caustics-simulation-bands.jpg)
+![On the left, caustics with the simulation band set to **Ripples**. On the right, caustics with the simulation band set to **Swell First Band**.](Images/caustics-simulation-bands.jpg)
On the left, caustics with the simulation band set to **Ripples**. On the right, caustics with the simulation band set to **Swell First Band**. ## Add caustics above water diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/water-create-a-current-in-the-water-system.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/water-create-a-current-in-the-water-system.md index 1d60a0c4b37..fe59abc85d1 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/water-create-a-current-in-the-water-system.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/water-create-a-current-in-the-water-system.md @@ -13,7 +13,7 @@ HDRP includes the River sample scene which shows how a current map behaves. To open the River sample scene: -1. Go to **Window** > **Package Manager**. +1. Go to **Window** > **Package Management** > **Package Manager**. 2. Select **High Definition RP**. 3. In the Samples tab, import the **Environment Samples**. 4. Open the scene named **River**. diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/water-debug-mode.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/water-debug-mode.md index b24f9ebf7ea..c9f7109f38c 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/water-debug-mode.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/water-debug-mode.md @@ -8,33 +8,33 @@ The Simulation Mask mode displays the reduction of each simulation band. White m You can select which channel of the water mask to debug by using the **Simulation Mask Mode** dropdown. Note that, for saving texture space, the red channel always attenuate the first band (First swell band for oceans, Agitation for rivers, Ripples for pools), green channel, the second band (Second swell band for oceans, ripples for rivers)... etc -![](Images/water-debug-simulationmask.png) +![An island scene, with a gradient texture that represents the simulation band changing as the water approaches the island.](Images/water-debug-simulationmask.png) ## Simulation Foam Mask The Simulation Foam Mask mode shows where the simulation foam is rendered on your water surface. -![](Images/water-debug-foammask.png) +![A glacier, with a waterfall displayed as black.](Images/water-debug-foammask.png) ## Current The Current mode shows in which direction the current flows. You can select between swell or agitation and ripples to debug. Note that this mode does not take into account the chaos parameter set in the simulation section. -![](Images/water-debug-current.png) +![An aerial view of a winding river, with small arrows on the water surface that represent the current direction.](Images/water-debug-current.png) ## Deformation The Deformation mode shows the deformation area and the deformation height of the water surface. -![](Images/water-debug-deformation.png) +![A glacier with a waterfall. Different shades of blue represent deformation.](Images/water-debug-deformation.png) ## Foam The Foam mode shows the foam are and where the generated foam (both foam from foam generated and simulation foam) are rendered. You can select to show Surface Foam or Deep Foam using the **Water Foam Mode**. -![](Images/water-debug-foam.png) +![An island scene, with the water surface rendered bright blue to make surface foam clearer.](Images/water-debug-foam.png) diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/whats-new-12.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/whats-new-12.md index edb08ee45b1..9f905a6d002 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/whats-new-12.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/whats-new-12.md @@ -25,7 +25,7 @@ You can use this Vertex Block to create an additional velocity for procedural ge ### Cloud Layer System -![](Images/HDRPFeatures-CloudLayer.png) +![A scene of a town square with a cloudy sky.](Images/HDRPFeatures-CloudLayer.png) HDRP 12.0 introduces a cloud system that you can control through the volume framework. @@ -37,28 +37,24 @@ For detailed steps on how to create custom clouds in your scene, see [creating c HDRP now includes a Volumetric Clouds volume override which allows you to precisely control the cloud coverage in your scene. These clouds receive realistic lighting from the sun and sky. For more information, see the [Volumetric Clouds](create-realistic-clouds-volumetric-clouds.md) documentation. -![](Images/volumetric-clouds-2.png) +![A snowy mountain range and lake with a cloudy sky at sunset.](Images/volumetric-clouds-2.png) -![](Images/volumetric-clouds-1.png) +![A snowy mountain range on a clear day with clouds in the sky.](Images/volumetric-clouds-1.png) ### Lens Flares -![](Images/LensFlareSamples2.png) +![Lens flare effects from a bright sun viewed from space.](Images/LensFlareSamples2.png) HDRP 12.0 includes a new Lens Flare system. You can attach a Lens Flare (SRP) component to any GameObject. Some Lens Flare properties only appear when you attach a Lens Flare (SRP) component to a light. Each Lens Flare has optional multiple elements that you can control individually. HDRP also provides a [new lens flare asset](shared/lens-flare/lens-flare-asset.md) and a [new lens flare component](shared/lens-flare/lens-flare-component.md) that you can attach to any GameObject. -HDRP includes a new Lens Flare sample that uses presets and Textures. You can see an example of the Textures included in this sample in the image below: - -![](Images/LensFlareTextures.png) +HDRP includes a new Lens Flare sample that uses presets and Textures. ### Light Anchor From HDRP 12.0, HDRP includes a new [Light Anchor](light-anchor.md) component. You can attach this component to any light to control the light in Main Camera view. -![](Images/LightAnchor0.png) - ### Light List HDRP version 2021.2 includes a new setting in `ShaderConfig.cs` called `FPTLMaxLightCount`. You can use this setting to set the maximum number of lights per tile on the GPU. To increase this value, you must generate a new Shader config project. For information on how to create a new Shader config project, see [HDRP-Config-Package](). @@ -83,7 +79,7 @@ The image below displays the **Temporal Anti-Aliasing (TAA) Upscale** (A) next t For more information, see [Dynamic Resolution](Dynamic-Resolution.md) -![A:TAA Upscale. B: Catmull-Rom.](Images/DynamicRes_SidebySide_AB.png) +![An industrial environment rendered twice, using TAA (A) and Catmull-Rom (B).](Images/DynamicRes_SidebySide_AB.png) #### NVIDIA’s Deep Learning Super Sampling @@ -113,10 +109,6 @@ To enable **AMD’s FidelityFX Super Resolution**.: - Open the **Default Fallback Upscale Filter** drop down . - Select **FidelityFX Super Resolution**. -![](Images/FidelityFX-Menu.png) - - - ### Mip Bias Support This HDRP version introduces a new setting called **Use Mip Bias.** This setting improves the detail of any upscaling filters you use in your scene. @@ -128,8 +120,6 @@ To enable **Use Mip Bias**: - Expand the **Dynamic resolution** section. - Enable the **Use Mip Bias** checkbox. -![](Images/UseMipBias.png) - ### ClearFlag HDRP 2021.2 includes the new `ClearFlag.Stencil` function. Use this to clear all flags from a stencil. @@ -138,7 +128,7 @@ From HDRP 2021.2, `ClearFlag.Depth` does not clear stencils. ### Probe Volumes Global Illumination (Experimental) -![](Images/ProbeVolumesGI.png) +![A classroom scene, with a 3D grid of Probe Volume probes represented as white spheres throughout the scene.](Images/ProbeVolumesGI.png) HDRP 12.0 introduces an experimental version of the Probe Volume system that creates pre-computed probe-based global illumination. You can use this system to place light probes automatically and create per-pixel lighting. @@ -206,7 +196,7 @@ You can also choose whether to hide or display ### Path tracing improvements -![](Images/HDRPFeatures-FabricPT.png) +![A high-definition living room scene, with highly realistic textures on the sofa, chair, and cushions.](Images/HDRPFeatures-FabricPT.png) HDRP’s path tracing now supports more materials: @@ -244,7 +234,7 @@ When you create a custom decal shader in HDRP 12.x, the accumulated normal value ### Decal normal blending -![](Images/HDRPFeatures-SurfGrad.png) +![A rock with a Unity logo, rendered twice. The image on the right uses the new additive normal blending method, so the logo blends into the surface detail.](Images/HDRPFeatures-SurfGrad.png) From HDRP 12.0 you can use a new option in the [HDRP Asset](HDRP-Asset.md) (**Rendering > Decals > Additive Normal Blending**) to additively blend decal normals with the GameObject's normal map. @@ -272,10 +262,10 @@ Improved the quality of the physically-based Depth Of Field in the following way - Improved support for MSAA to remove artifacts around the edges of visible GameObjects. -![](Images/HDRPFeatures-BetterDoF.png) +![A highly detailed render of a cassette player on a desk, with a depth of field effect that makes surfaces blurry towards and away from the camera.](Images/HDRPFeatures-BetterDoF.png) ### Physically Based Hair Shader -![](Images/PBHairShader.png) +![A head of curly hair.](Images/PBHairShader.png) HDRP 12.0 includes a new physically-based Marschner hair shader. You can use this as an alternative to the Kajiya-Kay hair shader. This new shading model allows you to quickly create a hair material that fits any lighting scenario. For more information about this new hair shader model and its parameters, see [Hair Master Stack](hair-master-stack-reference.md). @@ -306,8 +296,6 @@ HDRP 12.0 includes a built-in custom pass that you can use to generate Object ID HDRP 12.0 includes a more precise method to calculate specular occlusion based on Ambient Occlusion (AO) and Bent normals. This replaces the old method for all materials and shader graphs. -![](Images/SpecularOcclusion.png) - ### Ambient Occlusion and Specular Occlusion In HDRP 12.x, the algorithm that calculates how ambient occlusion and specular occlusion contributes to direct lighting doesn’t use the multi-bounce contribution (GTAOMultiBounce). This gives a more accurate direct lighting result. @@ -323,11 +311,11 @@ HDRP 12.0 improves the quality of the [Screen Space Global Illumination (SSGI)]( SSGI off: -![](Images/SSGIoff.png) +![A room with SSGI off.](Images/SSGIoff.png) SSGI on: -![](Images/SSGIon.png) +![A room with SSGI on, with improved lighting.](Images/SSGIon.png) ### Ray Traced Global Illumination diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/whats-new-17.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/whats-new-17.md index 079d59900b3..1c5d5f3b27f 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/whats-new-17.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/whats-new-17.md @@ -8,7 +8,7 @@ This page contains an overview of new features, improvements, and issues resolve Adaptive Probe Volumes can now be enhance with [Sky Occlusion](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@17.0/manual/probevolumes-skyocclusion.html) baking. -![](Images/WhatsNew17_SkyOcclusionTOD.png) +![The exterior of an apartment building lit differently in the morning, afternoon, and evening.](Images/WhatsNew17_SkyOcclusionTOD.png) This add a way to perform dynamic time of day for exterior with a sun light on top of a static lighting scenario like for interior done with Adaptive Probe Volumes. @@ -17,9 +17,6 @@ This add a way to perform dynamic time of day for exterior with a sun light on t #### Fallback New user interface for upscaler fallbacks. This new user interface will help the user set their preference in case a platform or API does not support such upscaler. -![](Images/stp-upscaler-ux.png) - - #### AMD FidelityFX 2.1 Super Resolution for Windows Support for AMD FidelityFX 2.1 Super Resolution for Dx11, Dx12, Vulkan in any GPU vendor. The upscaler includes predefined upscaling modes and can easily be turned on in the HDRP settings by enabling the com.unity.amd internal package. This feature also includes the plugin and public API for programmability and accessibility of this effect on any scriptable object. @@ -28,13 +25,11 @@ Support for AMD FidelityFX 2.1 Super Resolution for Dx11, Dx12, Vulkan in any GP Support for the Spatial-Temporal Post-Processing (STP) upscaler has been added for all platforms. This upscaler produces higher quality visuals than the existing TAAU upscaler, but it only supports dynamic resolution when the hardware dynamic resolution mode is active. This means APIs such as DX11 are only capable of using STP when the resolution scale is forced to a fixed percentage. -![](Images/stp-comparison.png) - ### SpeedTree Support of SpeedTree 9 files (.st9) exported by the SpeedTree Modeler application. Speedtree is now compatible with GPU Resident Drawer introduced in this release for improve CPU performance. In addition re-designs the SpeedTreeWind & SpeedTreeWindManager implementations to support multiple SpeedTree wind technologies as well as scalable CPU performance. Performance improvements depends on number of tree instances with wind, a speed up of x5-x10 CPU can be observe on MainThread and RenderThread depends on scenario. -![](Images/fantasy_kingdom_environment.jpg) +![The [Fantasy Kingdom](https://unity.com/demos/fantasy-kingdom) scene with trees in bright autumn colors.](Images/fantasy_kingdom_environment.jpg) ### Path Tracing @@ -42,13 +37,13 @@ Support of SpeedTree 9 files (.st9) exported by the SpeedTree Modeler applicatio Disc and tube shaped area lights are now supported with path tracing. -![](Images/Path-traced-tube-disc-lights.png) +![A car with underbody lights.](Images/Path-traced-tube-disc-lights.png) #### Separate Volumetric Fog denoising The HDRP path tracer now offers an option to denoise the volumetric fog effect separately from the full color output. -![](Images/Separate-volumetric-denoising.png) +![A foggy town square scene, with separate volumetric fog denoising on the left that provides smoother fog.](Images/Separate-volumetric-denoising.png) ### Performance @@ -58,12 +53,10 @@ GPU Resident Drawer Leveraging the power of the [Batch Render Group API](https:/ The extra GPU Culling functionality built on top of GPU Resident drawer allows for GPU-side culling of instances that do not contribute to the final image. This can help to improve GPU performance in scenes with heavy overdraw, and does not require any additional authoring to try out. With Rendering Debugger integration. -![](Images/gpu-occlusion-culling.png) +![The Rendering Debugger displaying occlusion culling information.](Images/gpu-occlusion-culling.png) Enable GPU Resident Drawer and occlusion culling via checkbox on the SRP asset. -![](Images/gpu-occlusion-culling-ux.png) - ## Updated ### Adaptive Probe Volumes @@ -78,8 +71,6 @@ A new toggle was also added to the Probe Volume Graphics settings to disable the Planet parametrization for effects like fog, physically based sky and volumetric clouds have been moved to a shared place in the [Visual Environement override](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@17.0/manual/visual-environment-volume-override-reference). -![](Images/environment-plane-settings.jpg) - #### Physically Based Sky The Physically Based sky has received a set of improvements and optimizations. @@ -88,33 +79,31 @@ The memory usage for the precomputed tables has also been reduced. Memory and pe Additionally, the PBR sky now includes an ozone layer as part of the atmosphere model. This is especially noticeable when the sun is close to the horizon. -![](Images/ozone.png) +![A cloudy sky at sunset, with an ozone layer on the right that darkens the sky.](Images/ozone.png) Finally, aerial perspective can now be enabled to simulate light absorption by particles in the atmosphere when looking at objects in the distance, such as mountains or clouds. -![](Images/scattering.png) +![A cloudy sky, with atmospheric scattering on the right that makes the centre of the clouds brighter.](Images/scattering.png) #### Volumetric clouds The volumetric clouds are not clipped by the far plane anymore. Additionally, earth curvature control was removed as Planet settings are now controlled from the Visual Environement. Local Clouds option is also removed, as far plane clipping does not happen anymore. To preserve the behavior of camera not being able to go inside the clouds, you should now set the **Rendering Space** option in **Camera Space** from the Visual Environement -![](Images/visualenvironment-renderingspace.png) - #### Water system Support of GameObject transform on Water Surfaces have been improved. Infinite Oceans and surfaces with Instanced Quad geometry can now be translated and rotated, and support setting a negative scale to flip the surface. Added a Water Decal target for ShaderGraph in order to output water deformation and foam directly to the atlas, and avoid going through a CustomRenderTexture. Using the same graph also simplifies authoring when deformation and foam generation are linked. Additionally foam is now animated to follow the current direction. -![](Images/water-decal.png) +![A shader graph with a Water Decal target, and the effect it produces on a lake.](Images/water-decal.png) Underwater rendering now supports using the volumetric fog to rendering god rays and light shafts. -![](Images/volumetric-underwater.png) +![An underwater view with light shafts shining through from above.](Images/volumetric-underwater.png) Finally, a node has been added to the shadergraph to sample the height of the camera relative to the water surface. It can be used to create water drips and droplets on the camera. Refer to the underwater scene from the water samples in the package manager to see it in action. -![](Images/Waterline.png) +![A camera at the surface level of an ocean, with droplets on the lens.](Images/Waterline.png) #### Volumetric Fog @@ -131,8 +120,6 @@ They are now more consistent and coherent across the different samples. There is more sharing between pipelines and packages and have dependencies in samples themselves. More explanations, links, files are included to better understand what is presented. -![](Images/samples-materials.png) - ### Lens Flare Lens Flares are now have improved XR support. @@ -142,29 +129,23 @@ Additionally, a new ring procedural shape have been added as well as few other f - Support for radial gradient for procedural shapes. - Support for light override to be able to have multiple flares affected by one light. -![](Images/shared/lens-flare/lensflare-ring.png) - ### Hair Improve the workflow for width of a line with the High Quality Line Rendering Feature. Users are now able to express the width in centimeter units on a per-vertex basis. -![](Images/per-vertex-width-values.png) +![At the top, eyebrows with no width values. At the bottom, eyebrows with per-vertex width values, which are softer. ](Images/per-vertex-width-values.png) Character using per-vertex width values for peach fuzz with uniform width of 0.01cm -![](Images/orb-hair.png) +![Character using per-vertex width values for peach fuzz with uniform width of 0.01cm.](Images/orb-hair.png) Also, a new rendering LOD mode based on screen coverage of a hair asset have been added to culls strands based on some kind of heuristic. The screen coverage LOD mode allows an artist to define an animation curve, where the x-axis is the ratio between the screen space bounding-box of the hair instance to the viewport. The y-axis is the percentage of strands to render based on this ratio. -![](Images/ghost-beast.png) - ### Area Lights Area light now used a "pillow" windowing function that is used for range attenuation of both rectangular and line lights. Both area (with cookie) and line lights now works correctly with every material type including Water, Hair, Fabric shaders, dual lobe SSS. In addition this version reduce the amount of CPU memory used to store LTC tables. -![](Images/Area_Materials.png) - ### Path Tracing #### Include for Path Tracing checkbox diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/LocalVolumetricFogEditor.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/LocalVolumetricFogEditor.cs index 747416783e1..b640ac13f40 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/LocalVolumetricFogEditor.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/LocalVolumetricFogEditor.cs @@ -111,7 +111,7 @@ static void DrawGizmosSelected(LocalVolumetricFog localVolumetricFog, GizmoType || s_ShapeBox == null || s_ShapeBox.Equals(null)) return; - using (new Handles.DrawingScope(Matrix4x4.TRS(localVolumetricFog.transform.position, localVolumetricFog.transform.rotation, Vector3.one))) + using (new Handles.DrawingScope(Matrix4x4.TRS(localVolumetricFog.transform.position, localVolumetricFog.transform.rotation, localVolumetricFog.effectiveScale))) { // Blend box s_BlendBox.center = CenterBlendLocalPosition(localVolumetricFog); @@ -131,7 +131,7 @@ static void DrawGizmosSelected(LocalVolumetricFog localVolumetricFog, GizmoType void OnSceneGUI() { //Note: for each handle to be independent when multi-selecting LocalVolumetricFog, - //We cannot rely hereon SerializedLocalVolumetricFog which is the collection of + //We cannot rely here on SerializedLocalVolumetricFog which is the collection of //selected LocalVolumetricFog. Thus code is almost the same of the UI. LocalVolumetricFog localVolumetricFog = target as LocalVolumetricFog; @@ -139,7 +139,7 @@ void OnSceneGUI() switch (EditMode.editMode) { case k_EditBlend: - using (new Handles.DrawingScope(Matrix4x4.TRS(localVolumetricFog.transform.position, localVolumetricFog.transform.rotation, Vector3.one))) + using (new Handles.DrawingScope(Matrix4x4.TRS(localVolumetricFog.transform.position, localVolumetricFog.transform.rotation, localVolumetricFog.effectiveScale))) { //contained must be initialized in all case s_ShapeBox.center = Vector3.zero; @@ -186,10 +186,10 @@ void OnSceneGUI() case k_EditShape: //important: if the origin of the handle's space move along the handle, //handles displacement will appears as moving two time faster. - using (new Handles.DrawingScope(Matrix4x4.TRS(Vector3.zero, localVolumetricFog.transform.rotation, Vector3.one))) + using (new Handles.DrawingScope(Matrix4x4.TRS(localVolumetricFog.transform.position, localVolumetricFog.transform.rotation, localVolumetricFog.effectiveScale))) { //contained must be initialized in all case - s_ShapeBox.center = Quaternion.Inverse(localVolumetricFog.transform.rotation) * localVolumetricFog.transform.position; + s_ShapeBox.center = Vector3.zero; s_ShapeBox.size = localVolumetricFog.parameters.size; Vector3 previousSize = localVolumetricFog.parameters.size; @@ -257,9 +257,6 @@ void OnSceneGUI() 1.0f - (newSize.y > 0.00000001 ? (newSize.y - newUniformFade) / newSize.y : 0f), 1.0f - (newSize.z > 0.00000001 ? (newSize.z - newUniformFade) / newSize.z : 0f)); } - - Vector3 delta = localVolumetricFog.transform.rotation * s_ShapeBox.center - localVolumetricFog.transform.position; - localVolumetricFog.transform.position += delta; } } break; diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/LocalVolumetricFogUI.Drawer.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/LocalVolumetricFogUI.Drawer.cs index 4fdedfa0024..24298da733b 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/LocalVolumetricFogUI.Drawer.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/LocalVolumetricFogUI.Drawer.cs @@ -79,6 +79,8 @@ static void Drawer_VolumeContent(SerializedLocalVolumetricFog serialized, Editor Vector3 previousPositiveFade = serialized.editorPositiveFade.vector3Value; Vector3 previousNegativeFade = serialized.editorNegativeFade.vector3Value; + EditorGUILayout.PropertyField(serialized.scaleMode, Styles.s_ScaleMode); + EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(serialized.size, Styles.s_Size); if (EditorGUI.EndChangeCheck()) diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/LocalVolumetricFogUI.Skin.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/LocalVolumetricFogUI.Skin.cs index 576feb02bcb..fd6f24e3e67 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/LocalVolumetricFogUI.Skin.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/LocalVolumetricFogUI.Skin.cs @@ -16,6 +16,7 @@ internal static class Styles EditorGUIUtility.IconContent("PreMatCube", "|Modify the influence volume. (SHIFT+2)") }; + public static readonly GUIContent s_ScaleMode = new GUIContent("Scale Mode", "Specifies the scaling mode to apply to the Local Volumetric Fog Volume."); public static readonly GUIContent s_Size = new GUIContent("Size", "Modify the size of this Local Volumetric Fog. This is independent of the Transform's Scale."); public static readonly GUIContent s_AlbedoLabel = new GUIContent("Single Scattering Albedo", "The color this fog scatters light to."); public static readonly GUIContent s_MeanFreePathLabel = new GUIContent("Fog Distance", "Density at the base of the fog. Determines how far you can see through the fog in meters."); diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/SerializedLocalVolumetricFog.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/SerializedLocalVolumetricFog.cs index 33f03f41e89..2785963a2a6 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/SerializedLocalVolumetricFog.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Editor/Lighting/VolumetricLighting/SerializedLocalVolumetricFog.cs @@ -16,6 +16,7 @@ class SerializedLocalVolumetricFog public SerializedProperty textureScroll; public SerializedProperty textureTile; + public SerializedProperty scaleMode; public SerializedProperty size; SerializedProperty positiveFade; @@ -54,6 +55,7 @@ public SerializedLocalVolumetricFog(SerializedObject serializedObject) textureScroll = densityParams.FindPropertyRelative("textureScrollingSpeed"); textureTile = densityParams.FindPropertyRelative("textureTiling"); + scaleMode = densityParams.FindPropertyRelative("scaleMode"); size = densityParams.FindPropertyRelative("size"); positiveFade = densityParams.FindPropertyRelative("positiveFade"); diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs index 7e49b97def1..0068fdaf98e 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs @@ -122,7 +122,7 @@ internal static class Styles public static GUIContent lockWithTilingRateText = new GUIContent("Lock With Height Map Tiling Rate", "When enabled, displacement mapping takes the absolute value of the tiling rate of the height map into account."); // Material ID - public static GUIContent materialIDText = new GUIContent("Material Type", "Specifies additional feature for this Material. Customize you Material with different settings depending on which Material Type you select."); + public static GUIContent materialIDText = new GUIContent("Material Type", "Specifies additional features for this Material. Customize your Material with different settings depending on which Material Type you select."); public static GUIContent transmissionEnableText = new GUIContent("Transmission", "When enabled HDRP processes the transmission effect for subsurface scattering. Simulates the translucency of the object."); public static string transparentSSSErrorMessage = "Transparent Materials With SubSurface Scattering is not supported."; public static GUIContent clearCoatEnabledText = new GUIContent("Clear Coat", "Controls whether the clear coat effect is enabled or not."); @@ -325,7 +325,7 @@ public override void LoadMaterialProperties() transmissionEnable = FindProperty(kTransmissionEnable); clearCoatEnabled = FindProperty(kClearCoatEnabled); - + excludeFromTUAndAA = FindProperty(kExcludeFromTUAndAA); if ((m_Features & Features.DoubleSidedNormalMode) != 0) @@ -874,6 +874,15 @@ protected void DrawLitSurfaceOptions() materialEditor.ShaderProperty(depthOffsetEnable, Styles.depthOffsetEnableText); EditorGUI.indentLevel--; } + + if (displaceMode != DisplacementMode.None && materials[0].GetTexture(kHeightMap) == null) + { + EditorGUILayout.Space(); + EditorGUI.indentLevel++; + + EditorGUILayout.HelpBox("Please set a valid HeightMap (in the 'Surface Inputs' category) to apply any displacement.", MessageType.Warning); + EditorGUI.indentLevel--; + } } } diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Rendering.Drawers.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Rendering.Drawers.cs index f81d4b7dcd0..2c90c94b564 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Rendering.Drawers.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Camera/HDCameraUI.Rendering.Drawers.cs @@ -148,10 +148,6 @@ static void Drawer_Draw_DLSS_Section(SerializedHDCamera p, Editor owner) { EditorGUI.indentLevel++; EditorGUILayout.PropertyField(p.deepLearningSuperSamplingUseOptimalSettings, HDRenderPipelineUI.Styles.DLSSUseOptimalSettingsContent); - using (new EditorGUI.DisabledScope(p.deepLearningSuperSamplingUseOptimalSettings.boolValue)) - { - EditorGUILayout.PropertyField(p.deepLearningSuperSamplingSharpening, HDRenderPipelineUI.Styles.DLSSSharpnessContent); - } EditorGUI.indentLevel--; } } diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs index b2a8067c37f..4e439304ba1 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs @@ -277,7 +277,6 @@ public class Styles public static readonly GUIContent TAAUInjectionPoint = EditorGUIUtility.TrTextContent("TAA Upscale Injection Point", "The injection point at which to apply the upscaling."); public static readonly GUIContent STPInjectionPoint = EditorGUIUtility.TrTextContent("STP Injection Point", "The injection point at which to apply the upscaling."); public static readonly GUIContent DLSSUseOptimalSettingsContent = EditorGUIUtility.TrTextContent("DLSS Use Optimal Settings", "Sets the sharpness and scale automatically for NVIDIA Deep Learning Super Sampling, depending on the values of quality settings. When DLSS Optimal Settings is on, the percentage settings for Dynamic Resolution Scaling are ignored."); - public static readonly GUIContent DLSSSharpnessContent = EditorGUIUtility.TrTextContent("DLSS Sharpness", "NVIDIA Deep Learning Super Sampling pixel sharpness of upsampler. Controls how the DLSS upsampler will render edges on the image. More sharpness usually means more contrast and clearer image but can increase flickering and fireflies. This setting is ignored if optimal settings are used."); public static readonly GUIContent FSR2Title = EditorGUIUtility.TrTextContent("AMD FidelityFX Super Resolution 2.0 (FSR2)"); public static readonly GUIContent enableFSR2 = EditorGUIUtility.TrTextContent("Enable Fidelity FX 2.2", "Enables FidelityFX 2.0 Super Resolution (FSR2)."); diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs index 4fbbdad54fc..2fe854b4ab6 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -686,10 +686,6 @@ static void Drawer_SectionDynamicResolutionSettings(SerializedHDRenderPipelineAs serialized.renderPipelineSettings.dynamicResolutionSettings.DLSSInjectionPoint.intValue = injectionPointVal; EditorGUILayout.PropertyField(serialized.renderPipelineSettings.dynamicResolutionSettings.DLSSUseOptimalSettings, Styles.DLSSUseOptimalSettingsContent); - using (new EditorGUI.DisabledScope(serialized.renderPipelineSettings.dynamicResolutionSettings.DLSSUseOptimalSettings.boolValue)) - { - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.dynamicResolutionSettings.DLSSSharpness, Styles.DLSSSharpnessContent); - } --EditorGUI.indentLevel; } diff --git a/Packages/com.unity.render-pipelines.high-definition/Editor/Water/WaterSurface/VFX/SampleWaterSurface.cs b/Packages/com.unity.render-pipelines.high-definition/Editor/Water/WaterSurface/VFX/SampleWaterSurface.cs index 15e58885dce..04b7fc9effd 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Editor/Water/WaterSurface/VFX/SampleWaterSurface.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Editor/Water/WaterSurface/VFX/SampleWaterSurface.cs @@ -64,7 +64,7 @@ public class OutputProperties [Tooltip("Returns the normal of the Water Surface at the sampled position.")] public Vector3 normal; [Tooltip("Vector that gives the local current orientation.")] - public Vector3 currentDirectionWS; + public Vector2 currentDirectionWS; } public static(string errorID, string errorDesc) ComputeHDRPConfigurationError() @@ -121,7 +121,7 @@ protected override sealed VFXExpression[] BuildExpression(VFXExpression[] inputE VFXExpression outputPosition = new VFXExpressionHLSL("ProjectPoint", ProjectPoint, typeof(Vector3), inputExpression, Array.Empty()); VFXExpression outputHeight = new VFXExpressionHLSL("EvaluateHeight", EvaluateHeight, typeof(float), inputExpression, Array.Empty()); VFXExpression outputNormal = new VFXExpressionHLSL("EvaluateNormal", EvaluateNormal, typeof(Vector3), inputExpression, Array.Empty()); - VFXExpression outputCurrent = new VFXExpressionHLSL("EvaluateCurrent", EvaluateCurrent, typeof(Vector3), inputExpression, Array.Empty()); + VFXExpression outputCurrent = new VFXExpressionHLSL("EvaluateCurrent", EvaluateCurrent, typeof(Vector2), inputExpression, Array.Empty()); return new [] { outputPosition, outputHeight, outputNormal, outputCurrent }; } } diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Core/Debugging/.buginfo b/Packages/com.unity.render-pipelines.high-definition/Runtime/Core/Debugging/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Core/Debugging/.buginfo +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Core/Debugging/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/.buginfo b/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/.buginfo index a8e3ae67ae4..272688b1879 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/.buginfo +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/.buginfo @@ -1 +1 @@ -area: Graphics Tools \ No newline at end of file +area: Graphics Debugging Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index 49bc23ec9ea..a350074b455 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -1078,6 +1078,7 @@ void RegisterMaterialDebug() { var container = new DebugUI.Container() { + displayName = "#MaterialRenderingLayers", isHiddenCallback = () => !IsDebuggingRenderingLayers(), children = { @@ -1099,45 +1100,17 @@ void RegisterMaterialDebug() } }; - var field = new DebugUI.BitField + var renderingLayersField = new DebugUI.RenderingLayerField() { nameAndTooltip = LightingStrings.LightLayersFilterLayers, - getter = () => data.lightingDebugSettings.debugLightLayersFilterMask, - setter = value => data.lightingDebugSettings.debugLightLayersFilterMask = (RenderingLayerMask)value, - enumType = typeof(RenderingLayerMask), - isHiddenCallback = () => data.lightingDebugSettings.debugSelectionLightLayers + getter = () => (uint)data.lightingDebugSettings.debugLightLayersFilterMask, + setter = value => data.lightingDebugSettings.debugLightLayersFilterMask = (RenderingLayerMask)(uint)value, + getRenderingLayerColor = index => data.lightingDebugSettings.debugRenderingLayersColors[index], + setRenderingLayerColor = (value, index) => data.lightingDebugSettings.debugRenderingLayersColors[index] = value, + isHiddenCallback = () => data.lightingDebugSettings.debugSelectionLightLayers, }; - var renderingLayers = new List(); - for (int i = 0; i < 32; i++) - renderingLayers.Add($"Unused Rendering Layer {i}"); - - var names = UnityEngine.RenderingLayerMask.GetDefinedRenderingLayerNames(); - for (int i = 0; i < names.Length; i++) - { - var index = UnityEngine.RenderingLayerMask.NameToRenderingLayer(names[i]); - renderingLayers[index] = names[i]; - } - - for (int i = 0; i < field.enumNames.Length - 1; i++) - field.enumNames[i + 1].text = renderingLayers[i]; - - container.children.Add(field); - - var layersColor = new DebugUI.Foldout() { nameAndTooltip = LightingStrings.LightLayersColor, flags = DebugUI.Flags.EditorOnly }; - for (int i = 0; i < renderingLayers.Count; i++) - { - int index = i; - layersColor.children.Add(new DebugUI.ColorField - { - displayName = renderingLayers[i], - flags = DebugUI.Flags.EditorOnly, - getter = () => data.lightingDebugSettings.debugRenderingLayersColors[index], - setter = value => data.lightingDebugSettings.debugRenderingLayersColors[index] = value - }); - } - - container.children.Add(layersColor); + container.children.Add(renderingLayersField); list.Add(container); } @@ -1247,7 +1220,6 @@ static class LightingStrings public static readonly NameAndTooltip LightLayersUseSelectedLight = new() { name = "Filter Light Layers by Light", tooltip = "Highlight Renderers affected by the selected light." }; public static readonly NameAndTooltip LightLayersSwitchToLightShadowLayers = new() { name = "Use Light's Shadow Layer Mask", tooltip = "Highlight Renderers that cast shadows for the selected light." }; public static readonly NameAndTooltip LightLayersFilterLayers = new() { name = "Filter Layers", tooltip = "Use the drop-down to filter light layers that you want to visialize." }; - public static readonly NameAndTooltip LightLayersColor = new() { name = "Layers Color", tooltip = "Select the display color of each light layer." }; // Material Overrides public static readonly NameAndTooltip OverrideSmoothness = new() { name = "Override Smoothness", tooltip = "Enable the checkbox to override the smoothness for the entire Scene." }; diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/HDDebugDisplaySettings.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/HDDebugDisplaySettings.cs index 15825b6e2e2..68c46d2cba4 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/HDDebugDisplaySettings.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/HDDebugDisplaySettings.cs @@ -36,7 +36,7 @@ public override void Reset() { base.Reset(); displayStats = Add(new DebugDisplaySettingsStats(new HDDebugDisplayStats())); - volumeSettings = Add(new DebugDisplaySettingsVolume(new HDVolumeDebugSettings())); + volumeSettings = Add(new DebugDisplaySettingsVolume()); decalSettings = Add(new DebugDisplaySettingsDecal()); gpuResidentDrawerSettings = Add(new DebugDisplayGPUResidentDrawer()); cameraSettings = Add(new DebugDisplaySettingsCamera()); diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/HDVolumeDebugSettings.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/HDVolumeDebugSettings.cs index a00754974d7..09bb0a36b63 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/HDVolumeDebugSettings.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Debug/HDVolumeDebugSettings.cs @@ -1,3 +1,4 @@ +using System; #if UNITY_EDITOR using UnityEditor; #endif @@ -14,6 +15,7 @@ namespace UnityEngine.Rendering.HighDefinition /// This class provides access to debug settings for the volume stack and layer mask in the High Definition Render Pipeline (HDRP). /// It is useful for visualizing and adjusting volume settings for specific cameras during development. /// + [Obsolete("This is not longer supported Please use DebugDisplaySettingsVolume. #from(6000.2)", false)] public partial class HDVolumeDebugSettings : VolumeDebugSettings { /// diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute index c11ba80ebd1..de71120111c 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/lightlistbuild.compute @@ -556,9 +556,14 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL else break; + // Imlicit division by 32, to pick the correct array index. + // E.g 37th light devided by 32 = 1.15 (rounded to 1), so we pick uLightsFlags[1] (which represents the lights from 32 to 64). uLightsFlags[l >> 5] |= lightValid << (l&31); } + // Merge results from all threads into shared memory. + // `InterlockedOr` performs a bitwise OR between `ldsDoesLightIntersect` and `uLightsFlags`. + // This allows multiple threads to update `ldsDoesLightIntersect` without collision. { [unroll(LIGHT_FPTL_VISIBILITY_DWORD_COUNTS)] for (uint ii = 0; ii < LIGHT_FPTL_VISIBILITY_DWORD_COUNTS; ++ii) @@ -570,30 +575,58 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL #endif { - uint localCount = 0; - [unroll(LIGHT_FPTL_VISIBILITY_DWORD_COUNTS)] - for (uint ii = 0; ii < LIGHT_FPTL_VISIBILITY_DWORD_COUNTS; ++ii) - localCount += countbits(ldsDoesLightIntersect[ii]); - - if (t == 0) ldsNrLightsFinal = localCount; + // Reset the total number of lights for the tile. + if (t == 0) + ldsNrLightsFinal = 0; + // Split the job into multiple passes to ensure all lights are processed even if NR_THREADS is smaller than SHADEROPTIONS_FPTLMAX_LIGHT_COUNT. + // A thread will possibly processes many lights. #define MAX_LIGHT_WRITE_LOOP_CNT (((SHADEROPTIONS_FPTLMAX_LIGHT_COUNT+1) + NR_THREADS - 1)/NR_THREADS) [unroll(MAX_LIGHT_WRITE_LOOP_CNT)] for (uint it = 0; it < MAX_LIGHT_WRITE_LOOP_CNT; ++it) { - uint i = t + it * NR_THREADS; - uint lightsMask = ldsDoesLightIntersect[i >> 5]; - uint localMask = (1u << (i & 31)); - if(i<(uint) iNrCoarseLights && (localMask & lightsMask) != 0u) + // Retrieve the light index for the current thread and current iteration. + uint lightIndex = t + it * NR_THREADS; + + // Check if the mask of the current light is valid (intersection with the tile). + uint lightsMask = ldsDoesLightIntersect[lightIndex >> 5]; + + // Select only the current light bit i in the block of 32. + uint localMask = (1u << (lightIndex & 31)); + + // If the thread index is in the light list and the mask is valid. + if (lightIndex < (uint)iNrCoarseLights && (localMask & lightsMask) != 0u) { + // ldsDoesLightIntersect[k] contains the valid lights for each block of 32 lights. + // We sum the number of enabled bits (countbits()) in all blocks before the block i. + // backOffset represents the number of valid lights before the block where i is located. uint backOffset = 0; [unroll(LIGHT_FPTL_VISIBILITY_DWORD_COUNTS)] for (uint k = 0u; k < LIGHT_FPTL_VISIBILITY_DWORD_COUNTS; ++k) - if (k < (i >> 5)) + if (k < (lightIndex >> 5)) backOffset += countbits(ldsDoesLightIntersect[k]); - uint uIndex = backOffset + countbits((localMask - 1u) & lightsMask); - if(uIndex= 0.5f && EvaluateDepthDifference(history.y, currentSceneDepth)) + float2 historyUVMax = 1.0 - 0.5 * _IntermediateScreenSize.zw - 0.000001; // To avoid lerp with garbage pixels + if (all(0.0 <= float4(historyUV, historyUVMax - historyUV)) && previousSampleCount >= 0.5f && EvaluateDepthDifference(history.y, currentSceneDepth)) { float4 previousColor = SAMPLE_TEXTURE2D_X_LOD(_HistoryVolumetricClouds0Texture, s_linear_clamp_sampler, historyUV * _HistoryViewportScale, 0); previousColor.xyz *= GetInversePreviousExposureMultiplier() * GetCurrentExposureMultiplier(); diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/HDRenderPipeline.VolumetricLighting.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/HDRenderPipeline.VolumetricLighting.cs index 6aff7044b16..a9144beadd8 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/HDRenderPipeline.VolumetricLighting.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/HDRenderPipeline.VolumetricLighting.cs @@ -877,10 +877,12 @@ void PrepareVisibleLocalVolumetricFogList(HDCamera hdCamera, CommandBuffer cmd) ulong cameraSceneCullingMask = HDUtils.GetSceneCullingMaskFromCamera(hdCamera.camera); foreach (var volume in volumes) { + var transform = volume.transform; + Vector3 scaleSize = volume.GetScaledSize(transform); Vector3 center = volume.transform.position; // Reject volumes that are completely fade out or outside of the volumetric fog using bounding sphere - float boundingSphereRadius = Vector3.Magnitude(volume.parameters.size); + float boundingSphereRadius = Vector3.Magnitude(scaleSize); float minObbDistance = Vector3.Magnitude(center - camPosition) - hdCamera.camera.nearClipPlane - boundingSphereRadius; if (minObbDistance > volume.parameters.distanceFadeEnd || minObbDistance > fog.depthExtent.value) continue; @@ -892,8 +894,8 @@ void PrepareVisibleLocalVolumetricFogList(HDCamera hdCamera, CommandBuffer cmd) // Handle camera-relative rendering. center -= camOffset; - var transform = volume.transform; - var bounds = GeometryUtils.OBBToAABB(transform.right, transform.up, transform.forward, volume.parameters.size, center); + + var bounds = GeometryUtils.OBBToAABB(transform.right, transform.up, transform.forward, scaleSize, center); // Frustum cull on the CPU for now. TODO: do it on the GPU. // TODO: account for custom near and far planes of the V-Buffer's frustum. @@ -910,7 +912,7 @@ void PrepareVisibleLocalVolumetricFogList(HDCamera hdCamera, CommandBuffer cmd) } // TODO: cache these? - var obb = new OrientedBBox(Matrix4x4.TRS(transform.position - camOffset, transform.rotation, volume.parameters.size)); + var obb = new OrientedBBox(Matrix4x4.TRS(transform.position - camOffset, transform.rotation, scaleSize)); m_VisibleVolumeBounds.Add(obb); m_GlobalVolumeIndices.Add(volume.GetGlobalIndex()); var visibleData = volume.parameters.ConvertToEngineData(); diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/LocalVolumetricFog.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/LocalVolumetricFog.cs index 33f0cc975a5..f1f3c018159 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/LocalVolumetricFog.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/LocalVolumetricFog.cs @@ -8,6 +8,17 @@ namespace UnityEngine.Rendering.HighDefinition { + /// The scaling mode to apply to Local Volumetric Fog. + public enum LocalVolumetricFogScaleMode + { + /// Ignores the transformation hierarchy and uses the scale values in the Local Volumetric Fog component directly. + [InspectorName("Scale Invariant")] + ScaleInvariant, + /// Multiplies the lossy scale of the Transform with the Local Volumetric Fog's size then applies this to the Local Volumetric Fog component. + [InspectorName("Inherit from Hierarchy")] + InheritFromHierarchy, + } + /// Artist-friendly Local Volumetric Fog parametrization. [Serializable] public partial struct LocalVolumetricFogArtistParameters @@ -55,6 +66,9 @@ public partial struct LocalVolumetricFogArtistParameters [SerializeField, FormerlySerializedAs("advancedFade"), FormerlySerializedAs("m_AdvancedFade")] internal bool m_EditorAdvancedFade; + /// The scaling mode to apply to Local Volumetric Fog. + public LocalVolumetricFogScaleMode scaleMode; + /// Dimensions of the volume. public Vector3 size; /// Inverts the fade gradient. @@ -98,6 +112,7 @@ public LocalVolumetricFogArtistParameters(Color color, float _meanFreePath, floa textureTiling = Vector3.one; textureOffset = textureScrollingSpeed; + scaleMode = LocalVolumetricFogScaleMode.ScaleInvariant; size = Vector3.one; positiveFade = Vector3.one * 0.1f; @@ -198,6 +213,12 @@ public partial class LocalVolumetricFog : MonoBehaviour [NonSerialized] internal Material textureMaterial; + /// stores the current effective scale, Vector3.one if the component is Scale Invariant, or lossy scale if the component Inherit From Hiearchy. + internal Vector3 effectiveScale; + + /// stores the final scale of the local volumetric fog component. + internal Vector3 scaledSize; + /// Gather and Update any parameters that may have changed. internal void PrepareParameters(float time) { @@ -274,11 +295,14 @@ internal void PrepareDrawCall(int globalIndex) // We can put this in global m_RenderingProperties.SetBuffer(HDShaderIDs._VolumetricMaterialData, LocalVolumetricFogManager.manager.volumetricMaterialDataBuffer); + effectiveScale = GetEffectiveScale(this.transform); + scaledSize = GetScaledSize(this.transform); + // Send local properties inside constants instead of structured buffer to optimize GPU reads var engineData = parameters.ConvertToEngineData(); var tr = transform; var position = tr.position; - var bounds = new OrientedBBox(Matrix4x4.TRS(position, tr.rotation, parameters.size)); + var bounds = new OrientedBBox(Matrix4x4.TRS(position, tr.rotation, scaledSize)); m_RenderingProperties.SetVector(HDShaderIDs._VolumetricMaterialObbRight, bounds.right); m_RenderingProperties.SetVector(HDShaderIDs._VolumetricMaterialObbUp, bounds.up); m_RenderingProperties.SetVector(HDShaderIDs._VolumetricMaterialObbExtents, new Vector3(bounds.extentX, bounds.extentY, bounds.extentZ)); @@ -319,6 +343,16 @@ internal void PrepareDrawCall(int globalIndex) Graphics.RenderPrimitivesIndexedIndirect(renderParams, MeshTopology.Triangles, LocalVolumetricFogManager.manager.volumetricMaterialIndexBuffer, LocalVolumetricFogManager.manager.globalIndirectBuffer, 1, m_GlobalIndex); } + internal Vector3 GetEffectiveScale(Transform tr) + { + return (parameters.scaleMode == LocalVolumetricFogScaleMode.InheritFromHierarchy) ? tr.lossyScale : Vector3.one; + } + + internal Vector3 GetScaledSize(Transform tr) + { + return Vector3.Max(Vector3.one * 0.001f, Vector3.Scale(parameters.size, GetEffectiveScale(tr))); + } + #if UNITY_EDITOR void UpdateLocalVolumetricFogVisibility() { @@ -326,6 +360,7 @@ void UpdateLocalVolumetricFogVisibility() UpdateLocalVolumetricFogVisibility(isVisible); } + void UpdateLocalVolumetricFogVisibilityPrefabStage(SceneView sv) { var stage = PrefabStageUtility.GetCurrentPrefabStage(); diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/LocalVolumetricFogManager.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/LocalVolumetricFogManager.cs index f5026f75e10..250e8f6497c 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/LocalVolumetricFogManager.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/LocalVolumetricFogManager.cs @@ -105,12 +105,12 @@ void Resize(int bufferCount) unsafe void AllocateIndirectBuffers(int count) { - globalIndirectBuffer = new GraphicsBuffer(GraphicsBuffer.Target.IndirectArguments, count, sizeof(GraphicsBuffer.IndirectDrawArgs)); + globalIndirectBuffer = new GraphicsBuffer(GraphicsBuffer.Target.IndirectArguments, count, sizeof(GraphicsBuffer.IndirectDrawIndexedArgs)); globalIndirectionBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Raw, count, sizeof(uint)); // Initialize with zeros to prevent weird behaviours - var zeros = new NativeArray(count * Mathf.Max(sizeof(GraphicsBuffer.IndirectDrawArgs), sizeof(uint)), Allocator.Temp, NativeArrayOptions.ClearMemory); - globalIndirectBuffer.SetData(zeros, 0, 0, count * sizeof(GraphicsBuffer.IndirectDrawArgs)); + var zeros = new NativeArray(count * Mathf.Max(sizeof(GraphicsBuffer.IndirectDrawIndexedArgs), sizeof(uint)), Allocator.Temp, NativeArrayOptions.ClearMemory); + globalIndirectBuffer.SetData(zeros, 0, 0, count * sizeof(GraphicsBuffer.IndirectDrawIndexedArgs)); globalIndirectionBuffer.SetData(zeros, 0, 0, count * sizeof(uint)); zeros.Dispose(); } diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitDepthPass.hlsl b/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitDepthPass.hlsl index 1ce902b183b..98eabca5cc7 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitDepthPass.hlsl +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Lit/ShaderPass/LitDepthPass.hlsl @@ -7,7 +7,7 @@ #endif // Attributes -#define REQUIRE_TANGENT_TO_WORLD ((defined(_PIXEL_DISPLACEMENT) && defined(_HEIGHTMAP) && defined(_DEPTHOFFSET_ON)) || (defined(_ALPHATEST_ON) && defined(_MAPPING_TRIPLANAR))) +#define REQUIRE_TANGENT_TO_WORLD ((defined(_PIXEL_DISPLACEMENT) && defined(_DEPTHOFFSET_ON)) || (defined(_ALPHATEST_ON) && defined(_MAPPING_TRIPLANAR))) #define REQUIRE_NORMAL defined(TESSELLATION_ON) || REQUIRE_TANGENT_TO_WORLD || defined(_VERTEX_DISPLACEMENT) || defined(OUTPUT_DECAL_BUFER) #define REQUIRE_VERTEX_COLOR (defined(_VERTEX_DISPLACEMENT) || defined(_TESSELLATION_DISPLACEMENT) || (defined(LAYERED_LIT_SHADER) && (defined(_LAYER_MASK_VERTEX_COLOR_MUL) || defined(_LAYER_MASK_VERTEX_COLOR_ADD)))) diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialExternalReferences.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialExternalReferences.cs index 8d595b4f82e..9435ddb2cab 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialExternalReferences.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/MaterialExternalReferences.cs @@ -51,6 +51,9 @@ public static MaterialExternalReferences GetMaterialExternalReferences(Material MaterialExternalReferences matExternalRefs = null; foreach (var subAsset in subAssets) { + if (subAsset == null) + continue; + if (subAsset.GetType() == typeof(MaterialExternalReferences)) { matExternalRefs = subAsset as MaterialExternalReferences; diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/CompositeWithUIAndOETF.shader b/Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/CompositeWithUIAndOETF.shader index 8dee2fc4a26..557bc105ea8 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/CompositeWithUIAndOETF.shader +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/CompositeWithUIAndOETF.shader @@ -21,13 +21,16 @@ Shader "Hidden/HDRP/CompositeUI" CBUFFER_START(cb) float4 _HDROutputParams; + float4 _SrcOffset; int _NeedsFlip; int _BlitTexArraySlice; CBUFFER_END - #define _MinNits _HDROutputParams.x - #define _MaxNits _HDROutputParams.y - #define _PaperWhite _HDROutputParams.z + #define _MinNits _HDROutputParams.x + #define _MaxNits _HDROutputParams.y + #define _PaperWhite _HDROutputParams.z + #define _FullScreenHeight _SrcOffset.w + #define _ViewportLoadOffset _SrcOffset.xy struct Attributes { @@ -58,11 +61,14 @@ Shader "Hidden/HDRP/CompositeUI" float2 uv = input.texcoord; float2 samplePos = input.positionCS.xy; + float2 pixelSampleOffset = float2(-_ViewportLoadOffset.x, _ViewportLoadOffset.y); if (_NeedsFlip) { uv.y = _RTHandleScale.y - uv.y; samplePos.y = _ScreenSize.y - samplePos.y; + pixelSampleOffset.y = (_FullScreenHeight - _ScreenSize.y) - pixelSampleOffset.y; } + samplePos += pixelSampleOffset; #if defined(USE_TEXTURE2D_X_AS_ARRAY) && defined(BLIT_SINGLE_SLICE) float4 outColor = LOAD_TEXTURE2D_ARRAY(_InputTexture, samplePos.xy, _BlitTexArraySlice); diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/.buginfo b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/.buginfo index 5e8e3c368ad..47fb4f0ba92 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/.buginfo +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/.buginfo @@ -1,5 +1,5 @@ -Workflow: +settings: when: path: - ^.*GlobalSettings?.*$ - area: SRP Workflow \ No newline at end of file + area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Debug.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Debug.cs index 049bc962cbf..5f8163e41c8 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Debug.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Debug.cs @@ -48,12 +48,13 @@ public partial class HDRenderPipeline /// /// Debug display settings. /// - public DebugDisplaySettings debugDisplaySettings { get { return m_DebugDisplaySettings; } } - static DebugDisplaySettings s_NeutralDebugDisplaySettings = new DebugDisplaySettings(); + public DebugDisplaySettings debugDisplaySettings => m_DebugDisplaySettings; + private static DebugDisplaySettings s_NeutralDebugDisplaySettings; internal DebugDisplaySettings m_CurrentDebugDisplaySettings; void InitializeDebug() { + s_NeutralDebugDisplaySettings ??= new DebugDisplaySettings(); m_ComputePositionNormal = runtimeShaders.probeVolumeSamplingDebugComputeShader; m_DebugViewMaterialGBuffer = CoreUtils.CreateEngineMaterial(runtimeShaders.debugViewMaterialGBufferPS); m_DebugViewMaterialGBufferShadowMask = CoreUtils.CreateEngineMaterial(runtimeShaders.debugViewMaterialGBufferPS); diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs index e760e3f12ac..00ee3473b0c 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs @@ -3636,7 +3636,6 @@ void LensFlareComputeOcclusionDataDrivenPass(RenderGraph renderGraph, HDCamera h nonJitteredViewProjMatrix0 = data.hdCamera.mainViewConstants.nonJitteredViewProjMatrix; xrId0 = data.hdCamera.xr.multipassId; #endif - Rect viewport = data.hdCamera.finalViewport; LensFlareCommonSRP.ComputeOcclusion( data.parameters.lensFlareShader, data.hdCamera.camera, data.hdCamera.xr, xrId0, @@ -3724,9 +3723,9 @@ TextureHandle LensFlareDataDrivenPass(RenderGraph renderGraph, HDCamera hdCamera builder.SetRenderFunc( (LensFlareData data, RenderGraphContext ctx) => { - Rect viewport = data.hdCamera.finalViewport; float width = (float)data.viewport.x; float height = (float)data.viewport.y; + Rect viewport = new Rect(0, 0, width, height); #if ENABLE_VR && ENABLE_XR_MODULE // Single pass VR diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs index e07b59385b4..c52180548c5 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs @@ -537,6 +537,7 @@ void BlitFinalCameraTexture(RenderGraph renderGraph, HDCamera hdCamera, TextureH if (data.hdrOutputParmeters.x >= 0) { data.blitMaterial.SetInt(HDShaderIDs._NeedsFlip, data.flip ? 1 : 0); + propertyBlock.SetVector(HDShaderIDs._SrcOffset, new Vector4(data.viewport.x, data.viewport.y, Screen.width, Screen.height)); propertyBlock.SetTexture(HDShaderIDs._UITexture, data.uiTexture); propertyBlock.SetTexture(HDShaderIDs._InputTexture, sourceTexture); diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineGlobalSettings.Migration.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineGlobalSettings.Migration.cs index 973b4c20c93..1a1124aefc6 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineGlobalSettings.Migration.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineGlobalSettings.Migration.cs @@ -174,8 +174,9 @@ internal enum Version MigrationStep.New(Version.RenderingLayerMask, (HDRenderPipelineGlobalSettings data) => { #pragma warning disable 618 // Type or member is obsolete - if (data.renderingLayerNames == null) + if (data.renderingLayerNames == null || data.renderingLayerNames.Length == 0) return; + for (int i = 1; i < data.renderingLayerNames.Length; i++) { if (i >= UnityEngine.RenderingLayerMask.GetRenderingLayerCount()) diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.HDRTASManager.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.HDRTASManager.cs index eabd55f75d8..9df69a3dffd 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.HDRTASManager.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.HDRTASManager.cs @@ -276,7 +276,7 @@ void SetupCullingData(HDCamera hdCamera, bool pathTracingEnabled) } // We want the LODs to match the rasterization and we want to exclude reflection probes - cullingConfig.flags |= RayTracingInstanceCullingFlags.EnableLODCulling | RayTracingInstanceCullingFlags.IgnoreReflectionProbes; + cullingConfig.flags |= RayTracingInstanceCullingFlags.EnableLODCulling | RayTracingInstanceCullingFlags.IgnoreReflectionProbes | RayTracingInstanceCullingFlags.EnableMeshLOD; // Dirtiness need to be kept track of for the path tracing (when enabled) if (pathTracingEnabled) diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRenderPipeline.RaytracingRecursiveRenderer.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRenderPipeline.RaytracingRecursiveRenderer.cs index 023971243e7..b377d13a890 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRenderPipeline.RaytracingRecursiveRenderer.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRenderPipeline.RaytracingRecursiveRenderer.cs @@ -102,7 +102,9 @@ TextureHandle RaytracingRecursiveRender(RenderGraph renderGraph, HDCamera hdCame if (!validEffect) return colorBuffer; - using (var builder = renderGraph.AddRenderPass("Recursive Rendering Evaluation", out var passData, ProfilingSampler.Get(HDProfileId.RayTracingRecursiveRendering))) + RecursiveRenderingPassData passData; + + using (var builder = renderGraph.AddRenderPass("Recursive Rendering Evaluation", out passData, ProfilingSampler.Get(HDProfileId.RayTracingRecursiveRendering))) { builder.EnableAsyncCompute(false); @@ -188,11 +190,11 @@ TextureHandle RaytracingRecursiveRender(RenderGraph renderGraph, HDCamera hdCame // Run the computation ctx.cmd.DispatchRays(data.recursiveRenderingRT, m_RayGenShaderName, (uint)data.texWidth, (uint)data.texHeight, (uint)data.viewCount); }); + } - PushFullScreenDebugTexture(m_RenderGraph, passData.debugBuffer, FullScreenDebugMode.RecursiveRayTracing); + PushFullScreenDebugTexture(m_RenderGraph, passData.debugBuffer, FullScreenDebugMode.RecursiveRayTracing); - return passData.outputBuffer; - } + return passData.outputBuffer; } } } diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs index ff9c62c31cf..ac61c437278 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPass.cs @@ -245,7 +245,9 @@ virtual internal void ExecuteInternal(RenderGraph renderGraph, HDCamera hdCamera ctx.cmd.SetGlobalFloat(HDShaderIDs._CustomPassInjectionPoint, (float)customPass.injectionPoint); if (customPass.currentRenderTarget.colorBufferRG.IsValid() && customPass.injectionPoint == CustomPassInjectionPoint.AfterPostProcess) + { ctx.cmd.SetGlobalTexture(HDShaderIDs._AfterPostProcessColorBuffer, customPass.currentRenderTarget.colorBufferRG); + } if (customPass.currentRenderTarget.motionVectorBufferRG.IsValid() && (customPass.injectionPoint != CustomPassInjectionPoint.BeforeRendering)) ctx.cmd.SetGlobalTexture(HDShaderIDs._CameraMotionVectorsTexture, customPass.currentRenderTarget.motionVectorBufferRG); diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/.buginfo b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/.buginfo index 716a23b6629..751a0bb766e 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/.buginfo +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/.buginfo @@ -1 +1,8 @@ -area: SRP Workflow \ No newline at end of file +settings: + area: SRP Settings + +camera: + when: + path: + - ^.*CaptureSettings?.*$ + area: Camera \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Settings/.buginfo b/Packages/com.unity.render-pipelines.high-definition/Runtime/Settings/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Settings/.buginfo +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Settings/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/HDRenderPipeline.WaterSystem.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/HDRenderPipeline.WaterSystem.cs index e926414a59c..bbfb4bbb78b 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/HDRenderPipeline.WaterSystem.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/HDRenderPipeline.WaterSystem.cs @@ -177,9 +177,9 @@ void CheckWaterCurrentData() internal void Cleanup() { - // Grab all the water surfaces in the scene - var waterSurfaces = WaterSurface.instancesAsArray; - int numWaterSurfaces = WaterSurface.instanceCount; + // Grab all the water surfaces in the scene. Including disabled ones (i.e. not in WaterSurface.instances). + var waterSurfaces = Object.FindObjectsByType(FindObjectsSortMode.None); + int numWaterSurfaces = waterSurfaces.Length; // Loop through them and display them for (int surfaceIdx = 0; surfaceIdx < numWaterSurfaces; ++surfaceIdx) diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/WaterSurface/WaterSurface.cs b/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/WaterSurface/WaterSurface.cs index 99d9c5f1c6e..f74b6d9b875 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/WaterSurface/WaterSurface.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Water/WaterSurface/WaterSurface.cs @@ -86,6 +86,7 @@ public partial class WaterSurface : MonoBehaviour { #region Instance Management // Management to avoid memory allocations at fetch time + // NOTE: instances tracks active instances, disabled instances can exist and are not included. internal static HashSet instances = new HashSet(); internal static WaterSurface[] instancesAsArray = null; internal static int instanceCount = 0; diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines.meta b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines.meta new file mode 100644 index 00000000000..9f132de9c1a --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7bcd6b228267a5d47a89fa9f6a01816e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines/Sample Water Decal.shadergraph b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines/Sample Water Decal.shadergraph new file mode 100644 index 00000000000..3bdc41e7af8 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines/Sample Water Decal.shadergraph @@ -0,0 +1,6096 @@ +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "774a636fee9641d4a16892b91128223f", + "m_Properties": [ + { + "m_Id": "09a6f48279054c88a6e4346a94a11242" + }, + { + "m_Id": "d03e8f2fe93e4dabbfeac917bf74f900" + }, + { + "m_Id": "4674dfa8ddc44a658d9a3c1a12eca498" + }, + { + "m_Id": "f6708f4011f548aeb0cb00fdac483fe7" + }, + { + "m_Id": "97bb507753584770841496692a217241" + }, + { + "m_Id": "4b9b895b65a34b3480b31c809ac035a7" + }, + { + "m_Id": "544be7c7432342c997f70d6ecb5545ae" + }, + { + "m_Id": "b48f5cf81cf64bbeb7fe070ae436701c" + }, + { + "m_Id": "c65d68d9dcd04a50b9ba458b4e8bb102" + }, + { + "m_Id": "b6788ebbdbd1463986178f7c72fc24bc" + }, + { + "m_Id": "255b427465944111a7381b084e5113d2" + }, + { + "m_Id": "125bc64eb8eb48ad894446d406b09122" + }, + { + "m_Id": "56291a8bba0743c6973377043fb594eb" + }, + { + "m_Id": "bfa8250ec14e40e584f2f871b1b5d5ab" + }, + { + "m_Id": "b35647f5f7504c8ba5ad0ad533e6e242" + } + ], + "m_Keywords": [ + { + "m_Id": "1a4ac0c89ed94a44a71dc03470959d81" + } + ], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "670a8467e8ab40daba0a36bceffcd566" + }, + { + "m_Id": "38123c296a0441ab9fcab5b26f93218a" + }, + { + "m_Id": "4e4240e29bf349a1ae1e8552cc54b7ff" + }, + { + "m_Id": "4bcbca60f84d4103859c0ce422cf1bbd" + }, + { + "m_Id": "0f0e2b021c7d42c08187e43fa6dd4962" + } + ], + "m_Nodes": [ + { + "m_Id": "3f3113e71b3949e1af1452697cec65f2" + }, + { + "m_Id": "e0f9658f05ab4717843842018a795a0f" + }, + { + "m_Id": "f9ff9a3fcf5f41f8862cf70c51c2bb44" + }, + { + "m_Id": "470f4b54cc0a4a84b6c03aa0d23f6f6e" + }, + { + "m_Id": "c77e151773654d34abe9a265291d6271" + }, + { + "m_Id": "c52c12d2257443f5876944c04ee78e59" + }, + { + "m_Id": "672bbea27a4d40b8aae9a5bc868ca346" + }, + { + "m_Id": "5eb1aa67a8d640f2b367a6e97c6615ed" + }, + { + "m_Id": "edf2e5cb0bb94a63a7b2edf84aac9150" + }, + { + "m_Id": "14f7c81b2bcd45f3b990140c05d49823" + }, + { + "m_Id": "e28260962266475bb433d980c8b924da" + }, + { + "m_Id": "7d7f51ab484d4c53875e4f0721a129eb" + }, + { + "m_Id": "42c069ccfb2d4fa292a9680bb9d671a6" + }, + { + "m_Id": "bbe0cf3b91824934b16a8cdbcfd51335" + }, + { + "m_Id": "242c675261184977849c621ea24a59e8" + }, + { + "m_Id": "875b25c3b1b54232bebdf94948eae33b" + }, + { + "m_Id": "bf101db3b1194ddea2ba42170977eda4" + }, + { + "m_Id": "e4dcb03dc2a54f8bbb0b09580c6f40ee" + }, + { + "m_Id": "ece91409facb441c84280a48db8f804c" + }, + { + "m_Id": "af4e9eb3b90f413aa3e76e8da6f7c6c3" + }, + { + "m_Id": "16a802d5fcd94d7fae81760d05c06446" + }, + { + "m_Id": "89f074a6833f4839bd9e2a0d864a0c7c" + }, + { + "m_Id": "67733e0300b343f7acb41a9619d05a9b" + }, + { + "m_Id": "a39b56c198de4ee8aa8819864a13512d" + }, + { + "m_Id": "133745e2f7f349d8ba5bb1e9144da026" + }, + { + "m_Id": "0976dde1bc8a47618def5611bd249f26" + }, + { + "m_Id": "b91cf9031be54b69af1fcac04aad5921" + }, + { + "m_Id": "e8d6adee74ad448da9a84b03e14e19d4" + }, + { + "m_Id": "43156a8ee43c4a019442daca02b52937" + }, + { + "m_Id": "775e88eee8cf4bd483dc03cfcd5fa84b" + }, + { + "m_Id": "8a82f3d239894575baf8e4b3df4acd00" + }, + { + "m_Id": "a380a34163f241ab8cb27e3cc7c4e602" + }, + { + "m_Id": "224444fff5f14181bd302eaff97428cc" + }, + { + "m_Id": "27dc49ed1b624d87b604fa74ec7d535c" + }, + { + "m_Id": "6712bbae346f48978f024566aa88cb06" + }, + { + "m_Id": "4c61a445f24f4b42b08f9e638503a8e8" + }, + { + "m_Id": "d4b5754abd3d4969858c9780b1af5fd1" + }, + { + "m_Id": "8d903fc91f0e428396a17eaa23cb2db2" + }, + { + "m_Id": "830b6b58c34848f8a751aec0efeb9dac" + }, + { + "m_Id": "80eeac55ed524019bcbb353767795fe6" + }, + { + "m_Id": "6a0e1d2232b24ff4b09375fb66a615d4" + }, + { + "m_Id": "84deae75749a4d31b086be6a3504d79a" + }, + { + "m_Id": "7bc88fd2cf1c46fb89ad1d4458ac9685" + }, + { + "m_Id": "39ec674bcd2c42aa84509872919563ca" + }, + { + "m_Id": "05bcd1478127447ba3e179c422c20566" + }, + { + "m_Id": "0184e53df51a49ee95355140d81307a1" + }, + { + "m_Id": "a060650d21ed40d59d3589b618a1de75" + }, + { + "m_Id": "58a2cafe8164498ebbc9367260fba0c1" + } + ], + "m_GroupDatas": [ + { + "m_Id": "c38790565a684e2a9c46c18acf941a23" + }, + { + "m_Id": "6fa3b936f3b34768b5cacd1630c42c5f" + }, + { + "m_Id": "4af2da63fec845f7977ceb8a14dfa873" + }, + { + "m_Id": "0ea0002481514a129a34f44249840ec4" + }, + { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + } + ], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "0184e53df51a49ee95355140d81307a1" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "05bcd1478127447ba3e179c422c20566" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "0976dde1bc8a47618def5611bd249f26" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "67733e0300b343f7acb41a9619d05a9b" + }, + "m_SlotId": 3 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "133745e2f7f349d8ba5bb1e9144da026" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "67733e0300b343f7acb41a9619d05a9b" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "14f7c81b2bcd45f3b990140c05d49823" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "edf2e5cb0bb94a63a7b2edf84aac9150" + }, + "m_SlotId": 3 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "16a802d5fcd94d7fae81760d05c06446" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e4dcb03dc2a54f8bbb0b09580c6f40ee" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "224444fff5f14181bd302eaff97428cc" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "a380a34163f241ab8cb27e3cc7c4e602" + }, + "m_SlotId": 6 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "242c675261184977849c621ea24a59e8" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "bbe0cf3b91824934b16a8cdbcfd51335" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "27dc49ed1b624d87b604fa74ec7d535c" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "80eeac55ed524019bcbb353767795fe6" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "27dc49ed1b624d87b604fa74ec7d535c" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6a0e1d2232b24ff4b09375fb66a615d4" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "39ec674bcd2c42aa84509872919563ca" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0184e53df51a49ee95355140d81307a1" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "3f3113e71b3949e1af1452697cec65f2" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e0f9658f05ab4717843842018a795a0f" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "42c069ccfb2d4fa292a9680bb9d671a6" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "84deae75749a4d31b086be6a3504d79a" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "43156a8ee43c4a019442daca02b52937" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "8d903fc91f0e428396a17eaa23cb2db2" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "470f4b54cc0a4a84b6c03aa0d23f6f6e" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c77e151773654d34abe9a265291d6271" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4c61a445f24f4b42b08f9e638503a8e8" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "224444fff5f14181bd302eaff97428cc" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4c61a445f24f4b42b08f9e638503a8e8" + }, + "m_SlotId": 5 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "224444fff5f14181bd302eaff97428cc" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "5eb1aa67a8d640f2b367a6e97c6615ed" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "3f3113e71b3949e1af1452697cec65f2" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6712bbae346f48978f024566aa88cb06" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4c61a445f24f4b42b08f9e638503a8e8" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "672bbea27a4d40b8aae9a5bc868ca346" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "f9ff9a3fcf5f41f8862cf70c51c2bb44" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "67733e0300b343f7acb41a9619d05a9b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "42c069ccfb2d4fa292a9680bb9d671a6" + }, + "m_SlotId": 3 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "67733e0300b343f7acb41a9619d05a9b" + }, + "m_SlotId": 10 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "a380a34163f241ab8cb27e3cc7c4e602" + }, + "m_SlotId": 3 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "775e88eee8cf4bd483dc03cfcd5fa84b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "67733e0300b343f7acb41a9619d05a9b" + }, + "m_SlotId": 7 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "7bc88fd2cf1c46fb89ad1d4458ac9685" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "39ec674bcd2c42aa84509872919563ca" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "7d7f51ab484d4c53875e4f0721a129eb" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "edf2e5cb0bb94a63a7b2edf84aac9150" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "830b6b58c34848f8a751aec0efeb9dac" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "8d903fc91f0e428396a17eaa23cb2db2" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "875b25c3b1b54232bebdf94948eae33b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "bf101db3b1194ddea2ba42170977eda4" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "89f074a6833f4839bd9e2a0d864a0c7c" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "bbe0cf3b91824934b16a8cdbcfd51335" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "8a82f3d239894575baf8e4b3df4acd00" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "830b6b58c34848f8a751aec0efeb9dac" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "8d903fc91f0e428396a17eaa23cb2db2" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "67733e0300b343f7acb41a9619d05a9b" + }, + "m_SlotId": 6 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a380a34163f241ab8cb27e3cc7c4e602" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "27dc49ed1b624d87b604fa74ec7d535c" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a39b56c198de4ee8aa8819864a13512d" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "67733e0300b343f7acb41a9619d05a9b" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "af4e9eb3b90f413aa3e76e8da6f7c6c3" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "16a802d5fcd94d7fae81760d05c06446" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "b91cf9031be54b69af1fcac04aad5921" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "830b6b58c34848f8a751aec0efeb9dac" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "bbe0cf3b91824934b16a8cdbcfd51335" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "42c069ccfb2d4fa292a9680bb9d671a6" + }, + "m_SlotId": 5 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "bf101db3b1194ddea2ba42170977eda4" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e4dcb03dc2a54f8bbb0b09580c6f40ee" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c52c12d2257443f5876944c04ee78e59" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5eb1aa67a8d640f2b367a6e97c6615ed" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c77e151773654d34abe9a265291d6271" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c52c12d2257443f5876944c04ee78e59" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c77e151773654d34abe9a265291d6271" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c52c12d2257443f5876944c04ee78e59" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "d4b5754abd3d4969858c9780b1af5fd1" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "67733e0300b343f7acb41a9619d05a9b" + }, + "m_SlotId": 9 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e0f9658f05ab4717843842018a795a0f" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "672bbea27a4d40b8aae9a5bc868ca346" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e28260962266475bb433d980c8b924da" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "edf2e5cb0bb94a63a7b2edf84aac9150" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e4dcb03dc2a54f8bbb0b09580c6f40ee" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "42c069ccfb2d4fa292a9680bb9d671a6" + }, + "m_SlotId": 6 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e8d6adee74ad448da9a84b03e14e19d4" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "67733e0300b343f7acb41a9619d05a9b" + }, + "m_SlotId": 5 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "ece91409facb441c84280a48db8f804c" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "16a802d5fcd94d7fae81760d05c06446" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "edf2e5cb0bb94a63a7b2edf84aac9150" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "42c069ccfb2d4fa292a9680bb9d671a6" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "edf2e5cb0bb94a63a7b2edf84aac9150" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "a380a34163f241ab8cb27e3cc7c4e602" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "f9ff9a3fcf5f41f8862cf70c51c2bb44" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "42c069ccfb2d4fa292a9680bb9d671a6" + }, + "m_SlotId": 4 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "f9ff9a3fcf5f41f8862cf70c51c2bb44" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "a380a34163f241ab8cb27e3cc7c4e602" + }, + "m_SlotId": 4 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [] + }, + "m_FragmentContext": { + "m_Position": { + "x": -8.666665077209473, + "y": 172.6666717529297 + }, + "m_Blocks": [ + { + "m_Id": "84deae75749a4d31b086be6a3504d79a" + }, + { + "m_Id": "80eeac55ed524019bcbb353767795fe6" + }, + { + "m_Id": "6a0e1d2232b24ff4b09375fb66a615d4" + }, + { + "m_Id": "05bcd1478127447ba3e179c422c20566" + }, + { + "m_Id": "a060650d21ed40d59d3589b618a1de75" + }, + { + "m_Id": "58a2cafe8164498ebbc9367260fba0c1" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "preventRotation": false + }, + "m_Path": "Shader Graphs", + "m_GraphPrecision": 1, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_SubDatas": [], + "m_ActiveTargets": [ + { + "m_Id": "a259759fcd924df79257def1c2004f2f" + } + ] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.SwizzleNode", + "m_ObjectId": "0184e53df51a49ee95355140d81307a1", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Swizzle", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -338.0000305175781, + "y": 642.666748046875, + "width": 133.33331298828126, + "height": 125.33331298828125 + } + }, + "m_Slots": [ + { + "m_Id": "4dab5c77118c48c6abe8e5fe9a47a1e6" + }, + { + "m_Id": "ea3bcd1107b24044967d73b978fc13cf" + } + ], + "synonyms": [ + "swap", + "reorder", + "component mask" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "_maskInput": "xy", + "convertedMask": "xy" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "028ab375e529429a9d37aeddf9925966", + "m_Id": 0, + "m_DisplayName": "Skipped Waves", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "042e7e5170c54db99cd0b395ee42517d", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0507a36d731149ca8d03f73b5864c93c", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "0589e1fae1c54a1380135d25c04a238a", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "05bcd1478127447ba3e179c422c20566", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Material.LargeCurrent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "8648ae22bce5405a984bd74dc9e988ab" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "Material.LargeCurrent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "085ea5d3213d45cba4889e272ddc5acc", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "0976dde1bc8a47618def5611bd249f26", + "m_Group": { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1394.0, + "y": 311.0, + "width": 160.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "028ab375e529429a9d37aeddf9925966" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "b48f5cf81cf64bbeb7fe070ae436701c" + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector2ShaderProperty", + "m_ObjectId": "09a6f48279054c88a6e4346a94a11242", + "m_Guid": { + "m_GuidSerialized": "ababc14d-19ea-44fd-94f1-373fc7205c98" + }, + "m_Name": "Blend Distance", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Blend Distance", + "m_DefaultReferenceName": "_Blend_Distance", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "x": 0.10000000149011612, + "y": 0.10000000149011612, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0a0c8d4d9d934b2b97fc0f7bcb7848b2", + "m_Id": 1, + "m_DisplayName": "X", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "X", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "0b63a014aed54c8c9957c116bdeb8a17", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 2.0, + "y": 2.0, + "z": 2.0, + "w": 2.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "0bc7e6170db14172972d162741f53d51", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": -1.0, + "y": -1.0, + "z": -1.0, + "w": -1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "0c4d8bdf826246a6ba2162213a2f6c21", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "0e17027e00404aec8273afd34731b0ad", + "m_Id": 2, + "m_DisplayName": "Out Min Max", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "OutMinMax", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 1.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "0ea0002481514a129a34f44249840ec4", + "m_Title": "Texture", + "m_Position": { + "x": -1820.66650390625, + "y": 509.333251953125 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "0f0e2b021c7d42c08187e43fa6dd4962", + "m_Name": "Texture", + "m_ChildObjectList": [ + { + "m_Id": "b35647f5f7504c8ba5ad0ad533e6e242" + }, + { + "m_Id": "4b9b895b65a34b3480b31c809ac035a7" + }, + { + "m_Id": "f6708f4011f548aeb0cb00fdac483fe7" + }, + { + "m_Id": "97bb507753584770841496692a217241" + }, + { + "m_Id": "bfa8250ec14e40e584f2f871b1b5d5ab" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0f51abf4401046ee8394f0ada839338c", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector2ShaderProperty", + "m_ObjectId": "125bc64eb8eb48ad894446d406b09122", + "m_Guid": { + "m_GuidSerialized": "8fb36def-f729-4e98-9dbf-99aebee37135" + }, + "m_Name": "Breaking Range", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Breaking Range", + "m_DefaultReferenceName": "_Breaking_Range", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "x": 0.4000000059604645, + "y": 0.800000011920929, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "133745e2f7f349d8ba5bb1e9144da026", + "m_Group": { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1378.0, + "y": 286.0, + "width": 143.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "53e4d65368414135ae0e198cb00da772" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "544be7c7432342c997f70d6ecb5545ae" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "14f7c81b2bcd45f3b990140c05d49823", + "m_Group": { + "m_Id": "6fa3b936f3b34768b5cacd1630c42c5f" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1291.333251953125, + "y": -165.99998474121095, + "width": 141.333251953125, + "height": 36.00007629394531 + } + }, + "m_Slots": [ + { + "m_Id": "a6384e00050748a0b580de3c4a33b5da" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "d03e8f2fe93e4dabbfeac917bf74f900" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "15d9d1a1887a45ec9746fb785d500312", + "m_Id": 3, + "m_DisplayName": "CubicBlend", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "CubicBlend", + "m_StageCapability": 3, + "m_Value": false, + "m_DefaultValue": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "166b4342af444e59b005b08ee20f4ec1", + "m_Id": 1, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2Node", + "m_ObjectId": "16a802d5fcd94d7fae81760d05c06446", + "m_Group": { + "m_Id": "0ea0002481514a129a34f44249840ec4" + }, + "m_Name": "Vector 2", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1191.0, + "y": 698.0, + "width": 128.0, + "height": 101.0 + } + }, + "m_Slots": [ + { + "m_Id": "4c843bc387cf45f996a9c4f3c5326fc5" + }, + { + "m_Id": "5a906af8298743aeb97e6ddf4b218c4e" + }, + { + "m_Id": "0589e1fae1c54a1380135d25c04a238a" + } + ], + "synonyms": [ + "2", + "v2", + "vec2", + "float2" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Value": { + "x": 0.0, + "y": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "16a889c8961f4e7bb1e9647ad615e6d7", + "m_Id": 2, + "m_DisplayName": "Y", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Y", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "Y" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "17e19bf1b58047c1911d94b4a0ae00e3", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "183474d7e12847d0be71a0907abc91b6", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "18d403691b5f49b88544d1651f0732d7", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "1a42a1d45efa468cacbdef8e4a1d6dfc", + "m_Id": 4, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", + "m_ObjectId": "1a4ac0c89ed94a44a71dc03470959d81", + "m_Guid": { + "m_GuidSerialized": "44d5e903-35df-498c-a2c6-beebbd65e409" + }, + "m_Name": "Type", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Type", + "m_DefaultReferenceName": "_TYPE", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_KeywordType": 1, + "m_KeywordDefinition": 0, + "m_KeywordScope": 0, + "m_KeywordStages": 63, + "m_Entries": [ + { + "id": 4, + "displayName": "Sphere", + "referenceName": "SPHERE" + }, + { + "id": 2, + "displayName": "Box", + "referenceName": "BOX" + }, + { + "id": 5, + "displayName": "Bow Wave", + "referenceName": "BOW_WAVE" + }, + { + "id": 3, + "displayName": "Shore Wave", + "referenceName": "SHORE_WAVE" + }, + { + "id": 6, + "displayName": "Texture", + "referenceName": "TEXTURE" + } + ], + "m_Value": 0, + "m_IsEditable": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "1d6418828a90457eb4db92111b644a20", + "m_Id": 3, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "1fb121d1283c423db844f27df6955f4c", + "m_Id": 0, + "m_DisplayName": "Breaking Range", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "205af13703a04e5791db9b4fc268e8f0", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "2150869f7c604163a5449989329bbb42", + "m_Id": 3, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2Node", + "m_ObjectId": "224444fff5f14181bd302eaff97428cc", + "m_Group": { + "m_Id": "0ea0002481514a129a34f44249840ec4" + }, + "m_Name": "Vector 2", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -981.0, + "y": 870.0, + "width": 128.0, + "height": 101.0 + } + }, + "m_Slots": [ + { + "m_Id": "0a0c8d4d9d934b2b97fc0f7bcb7848b2" + }, + { + "m_Id": "16a889c8961f4e7bb1e9647ad615e6d7" + }, + { + "m_Id": "67ac2524dc4846b49c758a552fa98c57" + } + ], + "synonyms": [ + "2", + "v2", + "vec2", + "float2" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Value": { + "x": 0.0, + "y": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.WaterDecalData", + "m_ObjectId": "231f8c5c0ba649eaa090c7d3fb4f128b", + "affectsDeformation": true, + "affectsFoam": true, + "affectsSimulationMask": false, + "affectsLargeCurrent": true, + "affectsRipplesCurrent": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVNode", + "m_ObjectId": "242c675261184977849c621ea24a59e8", + "m_Group": { + "m_Id": "4af2da63fec845f7977ceb8a14dfa873" + }, + "m_Name": "UV", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1470.0, + "y": -13.333240509033204, + "width": 147.3333740234375, + "height": 131.99993896484376 + } + }, + "m_Slots": [ + { + "m_Id": "35cb0e94d4384e7f86ad39051ead3b35" + } + ], + "synonyms": [ + "texcoords", + "coords", + "coordinates" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_OutputChannel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "24a3fae68c5b404f9082791a662e4d84", + "m_Id": 3, + "m_DisplayName": "waveRepetition", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "waveRepetition", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "250b85443d7e453e81a13fe922b0b68a", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "254c780343a947cc88f07235b626d617", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector2ShaderProperty", + "m_ObjectId": "255b427465944111a7381b084e5113d2", + "m_Guid": { + "m_GuidSerialized": "7576556d-cdf9-4ad1-aeef-31f05c05e4e3" + }, + "m_Name": "Wave Blend", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Wave Blend", + "m_DefaultReferenceName": "_Wave_Blend", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "x": 0.44999998807907107, + "y": 0.5, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "27867daa1a9747a5b14cf3081b650ab1", + "m_Id": 0, + "m_DisplayName": "Deformation Texture", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SplitNode", + "m_ObjectId": "27dc49ed1b624d87b604fa74ec7d535c", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Split", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -311.33331298828127, + "y": 222.66668701171876, + "width": 119.99992370605469, + "height": 150.66665649414063 + } + }, + "m_Slots": [ + { + "m_Id": "d40cc68877854d42bd5867fb99920f53" + }, + { + "m_Id": "a48ba4f9568747708d510fe39b663dbf" + }, + { + "m_Id": "6d569496e8f64ef1a35706639bf5d61b" + }, + { + "m_Id": "2150869f7c604163a5449989329bbb42" + }, + { + "m_Id": "3e7eafcd04b146bd8ab4358a7db494bd" + } + ], + "synonyms": [ + "separate" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "28d2a3ab3d2944d790906b89d6149017", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "2c26d440bb2d436e88214c6453648f0a", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "2c81888b3a144e7bb59dd240839d10f8", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "2d7d9d5cb531400095cf9430562f8347", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "2dec29ce38cc4c7f9ac8f4b809580169", + "m_Id": 6, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "TEXTURE", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "35bc88b4bc7347f1bb90fa1b2ef283d7", + "m_Id": 2, + "m_DisplayName": "Y", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Y", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "Y" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "35cb0e94d4384e7f86ad39051ead3b35", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "38123c296a0441ab9fcab5b26f93218a", + "m_Name": "Box", + "m_ChildObjectList": [ + { + "m_Id": "09a6f48279054c88a6e4346a94a11242" + }, + { + "m_Id": "d03e8f2fe93e4dabbfeac917bf74f900" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "39ec674bcd2c42aa84509872919563ca", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": -519.3333740234375, + "y": 642.666748046875, + "width": 181.33334350585938, + "height": 158.666748046875 + } + }, + "m_Slots": [ + { + "m_Id": "28d2a3ab3d2944d790906b89d6149017" + }, + { + "m_Id": "85b5e0514f5249fe91f88d8d3638e9ac" + }, + { + "m_Id": "0f51abf4401046ee8394f0ada839338c" + }, + { + "m_Id": "c41d5a7c121e47d49c6c88fd61c716a3" + }, + { + "m_Id": "4bb7db20f77c402eb355b867d9ff1bf9" + }, + { + "m_Id": "bd262e9f0a8a47ee80b32c2f04d1f7b6" + }, + { + "m_Id": "af4627530f5448ba8a717e7e9ec83d31" + }, + { + "m_Id": "2d7d9d5cb531400095cf9430562f8347" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "3cc79404fe954f3d9b3e3cc1cb3a502d", + "m_Id": 4, + "m_DisplayName": "Smooth Delta", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Smooth Delta", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "3d23634152324820826624817d4c2f65", + "m_Id": 5, + "m_DisplayName": "Bow Wave", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BOW_WAVE", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "3e7eafcd04b146bd8ab4358a7db494bd", + "m_Id": 4, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.LengthNode", + "m_ObjectId": "3f3113e71b3949e1af1452697cec65f2", + "m_Group": { + "m_Id": "c38790565a684e2a9c46c18acf941a23" + }, + "m_Name": "Length", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1453.333251953125, + "y": -517.3333129882813, + "width": 130.6666259765625, + "height": 96.00006103515625 + } + }, + "m_Slots": [ + { + "m_Id": "183474d7e12847d0be71a0907abc91b6" + }, + { + "m_Id": "17e19bf1b58047c1911d94b4a0ae00e3" + } + ], + "synonyms": [ + "measure" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.KeywordNode", + "m_ObjectId": "42c069ccfb2d4fa292a9680bb9d671a6", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Type", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -577.3330688476563, + "y": -187.99996948242188, + "width": 209.33328247070313, + "height": 376.0000305175781 + } + }, + "m_Slots": [ + { + "m_Id": "085ea5d3213d45cba4889e272ddc5acc" + }, + { + "m_Id": "e070d2687a26477390a896caf1d197f5" + }, + { + "m_Id": "e2bb4d59e38f4741b6a2e03d4664703a" + }, + { + "m_Id": "3d23634152324820826624817d4c2f65" + }, + { + "m_Id": "cd7bf971e4004061b4769efd04f323b8" + }, + { + "m_Id": "2dec29ce38cc4c7f9ac8f4b809580169" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Keyword": { + "m_Id": "1a4ac0c89ed94a44a71dc03470959d81" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "43156a8ee43c4a019442daca02b52937", + "m_Group": { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1868.0, + "y": 294.0, + "width": 139.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "d152371369c1476a9ef3a91a3d0c308f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "b6788ebbdbd1463986178f7c72fc24bc" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "455ea972c9fb4f3d9ee6a4ab94ab1bcc", + "m_Id": 0, + "m_DisplayName": "LargeCurrentInfluence", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "LargeCurrentInfluence", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "4674dfa8ddc44a658d9a3c1a12eca498", + "m_Guid": { + "m_GuidSerialized": "abc25342-7bcb-4fd3-9e6b-2ed09e1e7989" + }, + "m_Name": "Elevation", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Elevation", + "m_DefaultReferenceName": "_Elevation", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.20000000298023225, + "m_FloatType": 1, + "m_RangeValues": { + "x": -1.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVNode", + "m_ObjectId": "470f4b54cc0a4a84b6c03aa0d23f6f6e", + "m_Group": { + "m_Id": "c38790565a684e2a9c46c18acf941a23" + }, + "m_Name": "UV", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2190.66650390625, + "y": -565.333251953125, + "width": 147.333251953125, + "height": 131.99996948242188 + } + }, + "m_Slots": [ + { + "m_Id": "f3a78674800644a4b313e6de9f9618ef" + } + ], + "synonyms": [ + "texcoords", + "coords", + "coordinates" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_OutputChannel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "483921b97cb4415f8e502a671348112a", + "m_Id": 0, + "m_DisplayName": "Remap Min", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "497935d0c9ab44d592d98ebf9afaf52a", + "m_Id": 9, + "m_DisplayName": "deepFoamRange", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "deepFoamRange", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "4af2da63fec845f7977ceb8a14dfa873", + "m_Title": "Bow Wave", + "m_Position": { + "x": -1495.3333740234375, + "y": -71.99999237060547 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "4b9b895b65a34b3480b31c809ac035a7", + "m_Guid": { + "m_GuidSerialized": "5429aadb-1187-4560-bdd4-a819569db6e8" + }, + "m_Name": "Deformation Texture", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Deformation Texture", + "m_DefaultReferenceName": "_Deformation_Texture", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "useTexelSize": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4bb7db20f77c402eb355b867d9ff1bf9", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "4bcbca60f84d4103859c0ce422cf1bbd", + "m_Name": "Shore Wave", + "m_ChildObjectList": [ + { + "m_Id": "544be7c7432342c997f70d6ecb5545ae" + }, + { + "m_Id": "b48f5cf81cf64bbeb7fe070ae436701c" + }, + { + "m_Id": "c65d68d9dcd04a50b9ba458b4e8bb102" + }, + { + "m_Id": "255b427465944111a7381b084e5113d2" + }, + { + "m_Id": "b6788ebbdbd1463986178f7c72fc24bc" + }, + { + "m_Id": "125bc64eb8eb48ad894446d406b09122" + }, + { + "m_Id": "56291a8bba0743c6973377043fb594eb" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "4c61a445f24f4b42b08f9e638503a8e8", + "m_Group": { + "m_Id": "0ea0002481514a129a34f44249840ec4" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1547.0, + "y": 846.0, + "width": 183.0, + "height": 251.0 + } + }, + "m_Slots": [ + { + "m_Id": "0c4d8bdf826246a6ba2162213a2f6c21" + }, + { + "m_Id": "2c26d440bb2d436e88214c6453648f0a" + }, + { + "m_Id": "250b85443d7e453e81a13fe922b0b68a" + }, + { + "m_Id": "53b5ce2f2d7c4085a3e541b1fca405aa" + }, + { + "m_Id": "0507a36d731149ca8d03f73b5864c93c" + }, + { + "m_Id": "9bbbb5bdfaef4e8f93d00b0146de36eb" + }, + { + "m_Id": "e1dbaa0af8744a2fb28691e359861ff0" + }, + { + "m_Id": "042e7e5170c54db99cd0b395ee42517d" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4c843bc387cf45f996a9c4f3c5326fc5", + "m_Id": 1, + "m_DisplayName": "X", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "X", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4c8bb99f83e0449fa58d6ec72c488eba", + "m_Id": 0, + "m_DisplayName": "Time", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "4dab5c77118c48c6abe8e5fe9a47a1e6", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "4e4240e29bf349a1ae1e8552cc54b7ff", + "m_Name": "Bow Wave", + "m_ChildObjectList": [ + { + "m_Id": "4674dfa8ddc44a658d9a3c1a12eca498" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "53b5ce2f2d7c4085a3e541b1fca405aa", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "53e4d65368414135ae0e198cb00da772", + "m_Id": 0, + "m_DisplayName": "Wave Length", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "544be7c7432342c997f70d6ecb5545ae", + "m_Guid": { + "m_GuidSerialized": "865b9c6f-bb5c-4e59-9ea2-8ddc62742717" + }, + "m_Name": "Wave Length", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Wave Length", + "m_DefaultReferenceName": "_Wave_Length", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.17499999701976777, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "54530a00dea34695a2bd39c4d7ab43cd", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": -1.0, + "y": -1.0, + "z": -1.0, + "w": -1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector2ShaderProperty", + "m_ObjectId": "56291a8bba0743c6973377043fb594eb", + "m_Guid": { + "m_GuidSerialized": "7cefad5f-60d0-4fe0-aaf0-b98f2e53b170" + }, + "m_Name": "Deep Foam Range", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Deep Foam Range", + "m_DefaultReferenceName": "_Deep_Foam_Range", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "x": 0.30000001192092898, + "y": 0.699999988079071, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "56d8139131734a12bc4d2935836d6205", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "58a2cafe8164498ebbc9367260fba0c1", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Material.LargeCurrentInfluence", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "455ea972c9fb4f3d9ee6a4ab94ab1bcc" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "Material.LargeCurrentInfluence" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5a906af8298743aeb97e6ddf4b218c4e", + "m_Id": 2, + "m_DisplayName": "Y", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Y", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "Y" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5bc61a665a7b45c79e166f28c6d4f74d", + "m_Id": 3, + "m_DisplayName": "Delta Time", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Delta Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.RemapNode", + "m_ObjectId": "5eb1aa67a8d640f2b367a6e97c6615ed", + "m_Group": { + "m_Id": "c38790565a684e2a9c46c18acf941a23" + }, + "m_Name": "Remap", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1771.333251953125, + "y": -517.3333129882813, + "width": 189.3333740234375, + "height": 144.00006103515626 + } + }, + "m_Slots": [ + { + "m_Id": "54530a00dea34695a2bd39c4d7ab43cd" + }, + { + "m_Id": "b3e1cb1285d748c4b7ab2fdba7544c7f" + }, + { + "m_Id": "6f0d7ebedfd24fc98c470e66ecfad85c" + }, + { + "m_Id": "c8da719855a24ec0aa6448827ae54cb1" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "5ebda058a0754fe3896c1792dcb55a1c", + "m_Id": 1, + "m_DisplayName": "uv", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "uv", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.WaterDecalSubTarget", + "m_ObjectId": "5eec71032c9f4b9ca4146025732fdf60" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "60f38dcc07434ed2931a766cb574a135", + "m_Id": 1, + "m_DisplayName": "In Min Max", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "InMinMax", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 1.0 + }, + "m_DefaultValue": { + "x": -1.0, + "y": 1.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "646cfe497a474a94a9080c6ac28d22a6", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "66fb6178945e476d8010f562a45e8110", + "m_Id": 10, + "m_DisplayName": "Foam", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Foam", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "670a8467e8ab40daba0a36bceffcd566", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "1a4ac0c89ed94a44a71dc03470959d81" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "6712bbae346f48978f024566aa88cb06", + "m_Group": { + "m_Id": "0ea0002481514a129a34f44249840ec4" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1795.0, + "y": 886.0, + "width": 155.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "98b7ece755184a0a80ef59ebe11fc3d3" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "bfa8250ec14e40e584f2f871b1b5d5ab" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PowerNode", + "m_ObjectId": "672bbea27a4d40b8aae9a5bc868ca346", + "m_Group": { + "m_Id": "c38790565a684e2a9c46c18acf941a23" + }, + "m_Name": "Power", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1113.3331298828125, + "y": -517.3333129882813, + "width": 127.33319091796875, + "height": 120.00003051757813 + } + }, + "m_Slots": [ + { + "m_Id": "2c81888b3a144e7bb59dd240839d10f8" + }, + { + "m_Id": "0b63a014aed54c8c9957c116bdeb8a17" + }, + { + "m_Id": "dc4b9826fe96462eb93cf52fa20de983" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "67733e0300b343f7acb41a9619d05a9b", + "m_Group": { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + }, + "m_Name": "EvaluateShoreWaveDecal (Custom Function)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1152.0, + "y": 223.0, + "width": 298.0, + "height": 238.0 + } + }, + "m_Slots": [ + { + "m_Id": "93fe3a5b3b0b418d96785d90694e8131" + }, + { + "m_Id": "90b395d0f5034f36befc31849d28ecea" + }, + { + "m_Id": "24a3fae68c5b404f9082791a662e4d84" + }, + { + "m_Id": "8e205d9640d54d00af3b273ae008e3df" + }, + { + "m_Id": "953f1239463b46ea9fc76d27c6c86117" + }, + { + "m_Id": "b6b455fb25e5468c858e33edea996a2f" + }, + { + "m_Id": "497935d0c9ab44d592d98ebf9afaf52a" + }, + { + "m_Id": "de1401b64db84f61ba9fb7bbbbabf0d5" + }, + { + "m_Id": "66fb6178945e476d8010f562a45e8110" + } + ], + "synonyms": [ + "code", + "HLSL" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 0, + "m_FunctionName": "EvaluateShoreWaveDecal", + "m_FunctionSource": "5ac2732c7d9c3a943ae9b2023d4f440d", + "m_FunctionSourceUsePragmas": true, + "m_FunctionBody": "Enter function body here..." +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "67ac2524dc4846b49c758a552fa98c57", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "67ae51a2c78b48ac9aea884758247e65", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "689be5cf5f324dab91fac99e20de217e", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "6a0e1d2232b24ff4b09375fb66a615d4", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Material.DeepFoam", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "cbbf241e49ca45cd9fb1d5fbbdc227e0" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "Material.DeepFoam" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6bd8f41c71914711883fbb82dae51c63", + "m_Id": 0, + "m_DisplayName": "Elevation", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6d569496e8f64ef1a35706639bf5d61b", + "m_Id": 2, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "6f0d7ebedfd24fc98c470e66ecfad85c", + "m_Id": 2, + "m_DisplayName": "Out Min Max", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "OutMinMax", + "m_StageCapability": 3, + "m_Value": { + "x": -1.0, + "y": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 1.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "6fa3b936f3b34768b5cacd1630c42c5f", + "m_Title": "Box", + "m_Position": { + "x": -1495.3333740234375, + "y": -323.9999694824219 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "72cff813310948b3bf8bae1295dfe3f3", + "m_Id": 5, + "m_DisplayName": "Bow Wave", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BOW_WAVE", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "7529790f0283479ca15558bb4edca24c", + "m_Id": 6, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "TEXTURE", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "775e88eee8cf4bd483dc03cfcd5fa84b", + "m_Group": { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1392.0, + "y": 384.0, + "width": 158.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "1fb121d1283c423db844f27df6955f4c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "125bc64eb8eb48ad894446d406b09122" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "7a6aeaefadbd4d8287816318fab4106b", + "m_Id": 1, + "m_DisplayName": "uv", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "uv", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "7bc88fd2cf1c46fb89ad1d4458ac9685", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -700.6666870117188, + "y": 696.666748046875, + "width": 147.333251953125, + "height": 36.0 + } + }, + "m_Slots": [ + { + "m_Id": "efd4d82d098b419e9bf3bf5b894b3109" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "b35647f5f7504c8ba5ad0ad533e6e242" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "7ca7fc5744b540bdae9815a9d3579b04", + "m_Id": 0, + "m_DisplayName": "SurfaceFoam", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "SurfaceFoam", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVNode", + "m_ObjectId": "7d7f51ab484d4c53875e4f0721a129eb", + "m_Group": { + "m_Id": "6fa3b936f3b34768b5cacd1630c42c5f" + }, + "m_Name": "UV", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1470.0, + "y": -265.3332824707031, + "width": 147.3333740234375, + "height": 132.00003051757813 + } + }, + "m_Slots": [ + { + "m_Id": "e9998db43fec43878b72f4de81c5bf2c" + } + ], + "synonyms": [ + "texcoords", + "coords", + "coordinates" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_OutputChannel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "80eeac55ed524019bcbb353767795fe6", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Material.SurfaceFoam", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "7ca7fc5744b540bdae9815a9d3579b04" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "Material.SurfaceFoam" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "830b6b58c34848f8a751aec0efeb9dac", + "m_Group": { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1868.0, + "y": 344.0, + "width": 126.0, + "height": 118.0 + } + }, + "m_Slots": [ + { + "m_Id": "fddfa1b84a3a4eed92b340e7fae1a68d" + }, + { + "m_Id": "d3a79bec79a7450b949ebddcfc66404a" + }, + { + "m_Id": "689be5cf5f324dab91fac99e20de217e" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "8379e01770e947d1b938745d5e328b8d", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "84deae75749a4d31b086be6a3504d79a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Material.Deformation", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -3.3333396911621095, + "y": 191.3333740234375, + "width": 199.99998474121095, + "height": 42.66668701171875 + } + }, + "m_Slots": [ + { + "m_Id": "9178360eee3d4bb69a06b0f014642fd7" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "Material.Deformation" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "85b5e0514f5249fe91f88d8d3638e9ac", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "85d9b17258a441a49f4bd60bc0722b93", + "m_Id": 2, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "8648ae22bce5405a984bd74dc9e988ab", + "m_Id": 0, + "m_DisplayName": "LargeCurrent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "LargeCurrent", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "868a259edc374b5eaf5fe98f98eeb6d1", + "m_Id": 2, + "m_DisplayName": "Box", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BOX", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "875b25c3b1b54232bebdf94948eae33b", + "m_Group": { + "m_Id": "0ea0002481514a129a34f44249840ec4" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1795.0, + "y": 608.0, + "width": 190.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "27867daa1a9747a5b14cf3081b650ab1" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "4b9b895b65a34b3480b31c809ac035a7" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "89f074a6833f4839bd9e2a0d864a0c7c", + "m_Group": { + "m_Id": "4af2da63fec845f7977ceb8a14dfa873" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1305.333251953125, + "y": 62.666725158691409, + "width": 123.9998779296875, + "height": 35.99999237060547 + } + }, + "m_Slots": [ + { + "m_Id": "6bd8f41c71914711883fbb82dae51c63" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "4674dfa8ddc44a658d9a3c1a12eca498" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TimeNode", + "m_ObjectId": "8a82f3d239894575baf8e4b3df4acd00", + "m_Group": { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + }, + "m_Name": "Time", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2016.0, + "y": 231.0, + "width": 124.0, + "height": 173.0 + } + }, + "m_Slots": [ + { + "m_Id": "4c8bb99f83e0449fa58d6ec72c488eba" + }, + { + "m_Id": "c8eee1059ab1444a941160de41b27e01" + }, + { + "m_Id": "f5fe483e49804e348ba013dd8bbf47fd" + }, + { + "m_Id": "5bc61a665a7b45c79e166f28c6d4f74d" + }, + { + "m_Id": "3cc79404fe954f3d9b3e3cc1cb3a502d" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "8bef8d3b3b574f75bed842ef31093e68", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "8ce9a46457ed4287b1b48bab31e1328c", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.AddNode", + "m_ObjectId": "8d903fc91f0e428396a17eaa23cb2db2", + "m_Group": { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + }, + "m_Name": "Add", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1713.0, + "y": 320.0, + "width": 126.0, + "height": 118.0 + } + }, + "m_Slots": [ + { + "m_Id": "d73b00c1a1d54f0ca4ab9a472277be57" + }, + { + "m_Id": "67ae51a2c78b48ac9aea884758247e65" + }, + { + "m_Id": "eb01cdca2fb14500ae6abf867b1e4f2e" + } + ], + "synonyms": [ + "addition", + "sum", + "plus" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "8e205d9640d54d00af3b273ae008e3df", + "m_Id": 5, + "m_DisplayName": "waveBlend", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "waveBlend", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "8eb78a08640b4ba1b92acae036447eff", + "m_Id": 1, + "m_DisplayName": "X", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "X", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "90b395d0f5034f36befc31849d28ecea", + "m_Id": 2, + "m_DisplayName": "waveLength", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "waveLength", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "912b8414b80e453abedbdae6c3d24767", + "m_Id": 0, + "m_DisplayName": "Amplitude", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Amplitude", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "9178360eee3d4bb69a06b0f014642fd7", + "m_Id": 0, + "m_DisplayName": "Deformation", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Deformation", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "93fe3a5b3b0b418d96785d90694e8131", + "m_Id": 1, + "m_DisplayName": "uv", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "uv", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "953f1239463b46ea9fc76d27c6c86117", + "m_Id": 6, + "m_DisplayName": "waveOffset", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "waveOffset", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "962f860fa85e4fd78df00acb55956210", + "m_Id": 2, + "m_DisplayName": "Elevation", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Elevation", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "97bb507753584770841496692a217241", + "m_Guid": { + "m_GuidSerialized": "acd1d2f4-9327-4b85-bcd8-5f9d9b764e52" + }, + "m_Name": "Remap Max", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Remap Max", + "m_DefaultReferenceName": "_Remap_Max", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": -1.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "98b7ece755184a0a80ef59ebe11fc3d3", + "m_Id": 0, + "m_DisplayName": "Foam Texture", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "9bbbb5bdfaef4e8f93d00b0146de36eb", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "a060650d21ed40d59d3589b618a1de75", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Material.HorizontalDeformation", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "a3051d278cdb49f8bf6393a8987e8dce" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "Material.HorizontalDeformation" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDTarget", + "m_ObjectId": "a259759fcd924df79257def1c2004f2f", + "m_ActiveSubTarget": { + "m_Id": "5eec71032c9f4b9ca4146025732fdf60" + }, + "m_Datas": [ + { + "m_Id": "231f8c5c0ba649eaa090c7d3fb4f128b" + } + ], + "m_CustomEditorGUI": "", + "m_SupportVFX": false, + "m_SupportLineRendering": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "a3051d278cdb49f8bf6393a8987e8dce", + "m_Id": 0, + "m_DisplayName": "Horizontal Deformation", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "HorizontalDeformation", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.KeywordNode", + "m_ObjectId": "a380a34163f241ab8cb27e3cc7c4e602", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Type", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -577.3330688476563, + "y": 220.66671752929688, + "width": 209.33328247070313, + "height": 375.9999084472656 + } + }, + "m_Slots": [ + { + "m_Id": "f4546f70f4d74e31886f259e9862d9cf" + }, + { + "m_Id": "cdd24b4383824d7686c2f4fa7c559f9b" + }, + { + "m_Id": "868a259edc374b5eaf5fe98f98eeb6d1" + }, + { + "m_Id": "72cff813310948b3bf8bae1295dfe3f3" + }, + { + "m_Id": "b14397af89424e9fa191b9ac1f78f40c" + }, + { + "m_Id": "7529790f0283479ca15558bb4edca24c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Keyword": { + "m_Id": "1a4ac0c89ed94a44a71dc03470959d81" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "a399a69e14f94adaa24d98f15969698e", + "m_Id": 0, + "m_DisplayName": "Blend Distance", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVNode", + "m_ObjectId": "a39b56c198de4ee8aa8819864a13512d", + "m_Group": { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + }, + "m_Name": "UV", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1578.0, + "y": 223.0, + "width": 145.0, + "height": 129.0 + } + }, + "m_Slots": [ + { + "m_Id": "ecedfc44d43a4477b97f78f2a57b4a7e" + } + ], + "synonyms": [ + "texcoords", + "coords", + "coordinates" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_OutputChannel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a48ba4f9568747708d510fe39b663dbf", + "m_Id": 1, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "a6384e00050748a0b580de3c4a33b5da", + "m_Id": 0, + "m_DisplayName": "Cubic Blend", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": false, + "m_DefaultValue": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "a93d3d05da944fbda46d30cac8d4943f", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "aa6c60c07bfc40d08dcef7df50081025", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "af4627530f5448ba8a717e7e9ec83d31", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "af4e9eb3b90f413aa3e76e8da6f7c6c3", + "m_Group": { + "m_Id": "0ea0002481514a129a34f44249840ec4" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1337.0, + "y": 768.0, + "width": 136.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "e321b71e21c743b98deebd2d7199ddbe" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "97bb507753584770841496692a217241" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "b14397af89424e9fa191b9ac1f78f40c", + "m_Id": 3, + "m_DisplayName": "Shore Wave", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "SHORE_WAVE", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "b35647f5f7504c8ba5ad0ad533e6e242", + "m_Guid": { + "m_GuidSerialized": "355df46d-931a-4a93-b697-344abacbff2c" + }, + "m_Name": "CurrentMap", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "CurrentMap", + "m_DefaultReferenceName": "_CurrentMap", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "useTexelSize": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "b3e1cb1285d748c4b7ab2fdba7544c7f", + "m_Id": 1, + "m_DisplayName": "In Min Max", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "InMinMax", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 1.0 + }, + "m_DefaultValue": { + "x": -1.0, + "y": 1.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "b48f5cf81cf64bbeb7fe070ae436701c", + "m_Guid": { + "m_GuidSerialized": "1054b75c-24ac-4487-b7a8-9207bc4d6afc" + }, + "m_Name": "Skipped Waves", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Skipped Waves", + "m_DefaultReferenceName": "_Skipped_Waves", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 4.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "b6788ebbdbd1463986178f7c72fc24bc", + "m_Guid": { + "m_GuidSerialized": "0f04629e-d949-494a-8e7a-33526e4d15a6" + }, + "m_Name": "Wave Offset", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Wave Offset", + "m_DefaultReferenceName": "_Wave_Offset", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "b6b455fb25e5468c858e33edea996a2f", + "m_Id": 7, + "m_DisplayName": "breakingRange", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "breakingRange", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "b91cf9031be54b69af1fcac04aad5921", + "m_Group": { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2032.0, + "y": 408.0, + "width": 140.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "da6d794ddb594ce8a523028739729586" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "c65d68d9dcd04a50b9ba458b4e8bb102" + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "bbe0cf3b91824934b16a8cdbcfd51335", + "m_Group": { + "m_Id": "4af2da63fec845f7977ceb8a14dfa873" + }, + "m_Name": "EvaluateBowWaveAmplitude (Custom Function)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1170.0001220703125, + "y": -1.3333066701889039, + "width": 316.6668701171875, + "height": 120.00000762939453 + } + }, + "m_Slots": [ + { + "m_Id": "7a6aeaefadbd4d8287816318fab4106b" + }, + { + "m_Id": "962f860fa85e4fd78df00acb55956210" + }, + { + "m_Id": "f94eb82e0fa6441d8d35fcddcc198d18" + } + ], + "synonyms": [ + "code", + "HLSL" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 0, + "m_FunctionName": "EvaluateBowWaveAmplitude", + "m_FunctionSource": "5ac2732c7d9c3a943ae9b2023d4f440d", + "m_FunctionSourceUsePragmas": true, + "m_FunctionBody": "Enter function body here..." +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "bd262e9f0a8a47ee80b32c2f04d1f7b6", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "bf101db3b1194ddea2ba42170977eda4", + "m_Group": { + "m_Id": "0ea0002481514a129a34f44249840ec4" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1547.0, + "y": 568.0, + "width": 183.0, + "height": 251.0 + } + }, + "m_Slots": [ + { + "m_Id": "fb9213010e08405086eb67d715c67484" + }, + { + "m_Id": "205af13703a04e5791db9b4fc268e8f0" + }, + { + "m_Id": "646cfe497a474a94a9080c6ac28d22a6" + }, + { + "m_Id": "56d8139131734a12bc4d2935836d6205" + }, + { + "m_Id": "8379e01770e947d1b938745d5e328b8d" + }, + { + "m_Id": "8ce9a46457ed4287b1b48bab31e1328c" + }, + { + "m_Id": "254c780343a947cc88f07235b626d617" + }, + { + "m_Id": "f4a21ca9b45746cb862a5aa6d07cf80c" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "bfa8250ec14e40e584f2f871b1b5d5ab", + "m_Guid": { + "m_GuidSerialized": "16e612a5-382b-4431-a18f-6fad3800deed" + }, + "m_Name": "Foam Texture", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Foam Texture", + "m_DefaultReferenceName": "_Foam_Texture", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "useTexelSize": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "c09fb7ec50804583a24619021a4ee5ac", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "c38790565a684e2a9c46c18acf941a23", + "m_Title": "Sphere", + "m_Position": { + "x": -2215.99951171875, + "y": -624.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c41d5a7c121e47d49c6c88fd61c716a3", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2Node", + "m_ObjectId": "c52c12d2257443f5876944c04ee78e59", + "m_Group": { + "m_Id": "c38790565a684e2a9c46c18acf941a23" + }, + "m_Name": "Vector 2", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1922.6666259765625, + "y": -565.333251953125, + "width": 129.3333740234375, + "height": 102.6666259765625 + } + }, + "m_Slots": [ + { + "m_Id": "8eb78a08640b4ba1b92acae036447eff" + }, + { + "m_Id": "35bc88b4bc7347f1bb90fa1b2ef283d7" + }, + { + "m_Id": "c09fb7ec50804583a24619021a4ee5ac" + } + ], + "synonyms": [ + "2", + "v2", + "vec2", + "float2" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Value": { + "x": 0.0, + "y": 0.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "c65d68d9dcd04a50b9ba458b4e8bb102", + "m_Guid": { + "m_GuidSerialized": "d9599e5c-cc72-478f-9993-41f6d302478f" + }, + "m_Name": "Wave Speed", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Wave Speed", + "m_DefaultReferenceName": "_Wave_Speed", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.30000001192092898, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SplitNode", + "m_ObjectId": "c77e151773654d34abe9a265291d6271", + "m_Group": { + "m_Id": "c38790565a684e2a9c46c18acf941a23" + }, + "m_Name": "Split", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2043.333251953125, + "y": -565.333251953125, + "width": 120.6666259765625, + "height": 150.66665649414063 + } + }, + "m_Slots": [ + { + "m_Id": "8bef8d3b3b574f75bed842ef31093e68" + }, + { + "m_Id": "166b4342af444e59b005b08ee20f4ec1" + }, + { + "m_Id": "85d9b17258a441a49f4bd60bc0722b93" + }, + { + "m_Id": "1d6418828a90457eb4db92111b644a20" + }, + { + "m_Id": "1a42a1d45efa468cacbdef8e4a1d6dfc" + } + ], + "synonyms": [ + "separate" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "c8da719855a24ec0aa6448827ae54cb1", + "m_Id": 3, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c8eee1059ab1444a941160de41b27e01", + "m_Id": 1, + "m_DisplayName": "Sine Time", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Sine Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "c9047ba80d57418d891a61f0553c761d", + "m_Id": 0, + "m_DisplayName": "Deep Foam Range", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "cbbf241e49ca45cd9fb1d5fbbdc227e0", + "m_Id": 0, + "m_DisplayName": "DeepFoam", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "DeepFoam", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "cd7bf971e4004061b4769efd04f323b8", + "m_Id": 3, + "m_DisplayName": "Shore Wave", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "SHORE_WAVE", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "cdd24b4383824d7686c2f4fa7c559f9b", + "m_Id": 4, + "m_DisplayName": "Sphere", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "SPHERE", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "ce4bdca364934afdbbb0584e6ac84cf2", + "m_Title": "Shore Wave", + "m_Position": { + "x": -2057.3330078125, + "y": 164.66665649414063 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.BooleanShaderProperty", + "m_ObjectId": "d03e8f2fe93e4dabbfeac917bf74f900", + "m_Guid": { + "m_GuidSerialized": "c2dd101e-d2f9-490d-b69e-a4cec75c269e" + }, + "m_Name": "Cubic Blend", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Cubic Blend", + "m_DefaultReferenceName": "_Cubic_Blend", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d152371369c1476a9ef3a91a3d0c308f", + "m_Id": 0, + "m_DisplayName": "Wave Offset", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "d3a79bec79a7450b949ebddcfc66404a", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "d40cc68877854d42bd5867fb99920f53", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "d4b5754abd3d4969858c9780b1af5fd1", + "m_Group": { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1406.0, + "y": 408.0, + "width": 172.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "c9047ba80d57418d891a61f0553c761d" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "56291a8bba0743c6973377043fb594eb" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "d73b00c1a1d54f0ca4ab9a472277be57", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "da6d794ddb594ce8a523028739729586", + "m_Id": 0, + "m_DisplayName": "Wave Speed", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "dc4b9826fe96462eb93cf52fa20de983", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "de1401b64db84f61ba9fb7bbbbabf0d5", + "m_Id": 0, + "m_DisplayName": "Amplitude", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Amplitude", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "e070d2687a26477390a896caf1d197f5", + "m_Id": 4, + "m_DisplayName": "Sphere", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "SPHERE", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SaturateNode", + "m_ObjectId": "e0f9658f05ab4717843842018a795a0f", + "m_Group": { + "m_Id": "c38790565a684e2a9c46c18acf941a23" + }, + "m_Name": "Saturate", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1322.6666259765625, + "y": -517.3333129882813, + "width": 129.33349609375, + "height": 96.00006103515625 + } + }, + "m_Slots": [ + { + "m_Id": "f103723c6fdd493ea473a98566a469a2" + }, + { + "m_Id": "a93d3d05da944fbda46d30cac8d4943f" + } + ], + "synonyms": [ + "clamp" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "e1dbaa0af8744a2fb28691e359861ff0", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "e28260962266475bb433d980c8b924da", + "m_Group": { + "m_Id": "6fa3b936f3b34768b5cacd1630c42c5f" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1305.9998779296875, + "y": -201.99998474121095, + "width": 155.9998779296875, + "height": 36.0 + } + }, + "m_Slots": [ + { + "m_Id": "a399a69e14f94adaa24d98f15969698e" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "09a6f48279054c88a6e4346a94a11242" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "e2bb4d59e38f4741b6a2e03d4664703a", + "m_Id": 2, + "m_DisplayName": "Box", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BOX", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "e321b71e21c743b98deebd2d7199ddbe", + "m_Id": 0, + "m_DisplayName": "Remap Max", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "e4aa4ef403f84545ab07ed85dbbe1141", + "m_Id": 0, + "m_DisplayName": "Wave Blend", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.RemapNode", + "m_ObjectId": "e4dcb03dc2a54f8bbb0b09580c6f40ee", + "m_Group": { + "m_Id": "0ea0002481514a129a34f44249840ec4" + }, + "m_Name": "Remap", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1039.0, + "y": 592.0, + "width": 186.0, + "height": 142.0 + } + }, + "m_Slots": [ + { + "m_Id": "0bc7e6170db14172972d162741f53d51" + }, + { + "m_Id": "60f38dcc07434ed2931a766cb574a135" + }, + { + "m_Id": "0e17027e00404aec8273afd34731b0ad" + }, + { + "m_Id": "eab0533aae2b4cd0bfca5cdfb9270ca6" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "e8d6adee74ad448da9a84b03e14e19d4", + "m_Group": { + "m_Id": "ce4bdca364934afdbbb0584e6ac84cf2" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1373.0, + "y": 337.0, + "width": 138.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "e4aa4ef403f84545ab07ed85dbbe1141" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "255b427465944111a7381b084e5113d2" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "e9998db43fec43878b72f4de81c5bf2c", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "ea3bcd1107b24044967d73b978fc13cf", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "eab0533aae2b4cd0bfca5cdfb9270ca6", + "m_Id": 3, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "eb01cdca2fb14500ae6abf867b1e4f2e", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "ece91409facb441c84280a48db8f804c", + "m_Group": { + "m_Id": "0ea0002481514a129a34f44249840ec4" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1334.0, + "y": 732.0, + "width": 133.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "483921b97cb4415f8e502a671348112a" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "f6708f4011f548aeb0cb00fdac483fe7" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "ecedfc44d43a4477b97f78f2a57b4a7e", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "edf2e5cb0bb94a63a7b2edf84aac9150", + "m_Group": { + "m_Id": "6fa3b936f3b34768b5cacd1630c42c5f" + }, + "m_Name": "EvaluateBoxAmplitude (Custom Function)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1137.9998779296875, + "y": -265.3332824707031, + "width": 282.66650390625, + "height": 143.99996948242188 + } + }, + "m_Slots": [ + { + "m_Id": "5ebda058a0754fe3896c1792dcb55a1c" + }, + { + "m_Id": "f772d6fb86f6402eb740d59f5c3e6d1a" + }, + { + "m_Id": "15d9d1a1887a45ec9746fb785d500312" + }, + { + "m_Id": "912b8414b80e453abedbdae6c3d24767" + } + ], + "synonyms": [ + "code", + "HLSL" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 0, + "m_FunctionName": "EvaluateBoxAmplitude", + "m_FunctionSource": "5ac2732c7d9c3a943ae9b2023d4f440d", + "m_FunctionSourceUsePragmas": true, + "m_FunctionBody": "Enter function body here..." +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "efd4d82d098b419e9bf3bf5b894b3109", + "m_Id": 0, + "m_DisplayName": "CurrentMap", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "f103723c6fdd493ea473a98566a469a2", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "f3a78674800644a4b313e6de9f9618ef", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "f4546f70f4d74e31886f259e9862d9cf", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "f4a21ca9b45746cb862a5aa6d07cf80c", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "f5fe483e49804e348ba013dd8bbf47fd", + "m_Id": 2, + "m_DisplayName": "Cosine Time", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Cosine Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "f6708f4011f548aeb0cb00fdac483fe7", + "m_Guid": { + "m_GuidSerialized": "801ae54f-8ee6-41f2-a76b-6bd05f88c05c" + }, + "m_Name": "Remap Min", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Remap Min", + "m_DefaultReferenceName": "_Remap_Min", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": -1.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "f772d6fb86f6402eb740d59f5c3e6d1a", + "m_Id": 2, + "m_DisplayName": "BlendRegion", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BlendRegion", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "f94eb82e0fa6441d8d35fcddcc198d18", + "m_Id": 0, + "m_DisplayName": "Amplitude", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Amplitude", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.OneMinusNode", + "m_ObjectId": "f9ff9a3fcf5f41f8862cf70c51c2bb44", + "m_Group": { + "m_Id": "c38790565a684e2a9c46c18acf941a23" + }, + "m_Name": "One Minus", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -985.9999389648438, + "y": -517.3333129882813, + "width": 129.33331298828126, + "height": 96.00006103515625 + } + }, + "m_Slots": [ + { + "m_Id": "18d403691b5f49b88544d1651f0732d7" + }, + { + "m_Id": "aa6c60c07bfc40d08dcef7df50081025" + } + ], + "synonyms": [ + "complement", + "invert", + "opposite" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "fb9213010e08405086eb67d715c67484", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "fddfa1b84a3a4eed92b340e7fae1a68d", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines/Sample Water Decal.shadergraph.meta b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines/Sample Water Decal.shadergraph.meta new file mode 100644 index 00000000000..2558f08246c --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines/Sample Water Decal.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 54ea0dff6767fe540b7b0eb2bccb01e2 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines/Shader Graphs_Sample Water Decal.mat b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines/Shader Graphs_Sample Water Decal.mat new file mode 100644 index 00000000000..c3d7ee508d8 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines/Shader Graphs_Sample Water Decal.mat @@ -0,0 +1,73 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Shader Graphs_Sample Water Decal + m_Shader: {fileID: -6465566751694194690, guid: 54ea0dff6767fe540b7b0eb2bccb01e2, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _AFFECTS_DEFORMATION + - _AFFECTS_LARGE_CURRENT + - _TYPE_TEXTURE + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _CurrentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Deformation_Texture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Foam_Texture: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AffectDeformation: 1 + - _AffectFoam: 0 + - _AffectLargeCurrent: 1 + - _Cubic_Blend: 0 + - _Elevation: 0.2 + - _Remap_Max: 1 + - _Remap_Min: -1 + - _Skipped_Waves: 4 + - _TYPE: 4 + - _Wave_Length: 0.175 + - _Wave_Offset: 0 + - _Wave_Speed: 0.3 + m_Colors: + - _Blend_Distance: {r: 0.1, g: 0.1, b: 0, a: 0} + - _Breaking_Range: {r: 0.4, g: 0.8, b: 0, a: 0} + - _Deep_Foam_Range: {r: 0.3, g: 0.7, b: 0, a: 0} + - _Wave_Blend: {r: 0.45, g: 0.5, b: 0, a: 0} + m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines/Shader Graphs_Sample Water Decal.mat.meta b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines/Shader Graphs_Sample Water Decal.mat.meta new file mode 100644 index 00000000000..8ab04c86a77 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Materials/CurrentWithSplines/Shader Graphs_Sample Water Decal.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ac1471bc6b69f0499dab746b6c429c8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scenes/CurrentWithSplines.unity b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scenes/CurrentWithSplines.unity new file mode 100644 index 00000000000..2cd107296b0 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scenes/CurrentWithSplines.unity @@ -0,0 +1,3683 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 10 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!84 &41950334 +RenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_IsAlphaChannelOptional: 0 + serializedVersion: 6 + m_Width: 384 + m_Height: 128 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthStencilFormat: 90 + m_ColorFormat: 8 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 0 + m_UseDynamicScaleExplicit: 0 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_EnableRandomWrite: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 2 + m_VolumeDepth: 1 + m_ShadowSamplingMode: 2 +--- !u!1 &616523814 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 616523815} + - component: {fileID: 616523817} + - component: {fileID: 616523816} + m_Layer: 0 + m_Name: Reflection Probe Bend + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &616523815 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 616523814} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.22268695, z: -0, w: 0.97489005} + m_LocalPosition: {x: -3.13, y: 4.265727, z: -13.7} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 879231443} + m_LocalEulerAnglesHint: {x: 0, y: 25.734, z: 0} +--- !u!114 &616523816 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 616523814} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0ef8dc2c2eabfa4e8cb77be57a837c0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ProbeSettings: + frustum: + fieldOfViewMode: 1 + fixedValue: 90 + automaticScale: 1 + viewerScale: 1 + type: 0 + mode: 1 + realtimeMode: 1 + timeSlicing: 0 + lighting: + importance: 1 + multiplier: 1 + weight: 1 + lightLayer: 1 + fadeDistance: 10000 + rangeCompressionFactor: 1 + influence: + m_Shape: 0 + m_BoxSize: {x: 56, y: 30, z: 50} + m_BoxBlendDistancePositive: {x: 5, y: 5, z: 5} + m_BoxBlendDistanceNegative: {x: 5, y: 5, z: 5} + m_BoxBlendNormalDistancePositive: {x: 5, y: 5, z: 5} + m_BoxBlendNormalDistanceNegative: {x: 5, y: 5, z: 5} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 + m_EditorAdvancedModeBlendDistancePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_EditorSimplifiedModeBlendDistance: 5 + m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendNormalDistance: 5 + m_EditorAdvancedModeEnabled: 0 + m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} + m_Version: 1 + m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} + m_ObsoleteOffset: {x: 0, y: 0, z: 0} + proxy: + m_Shape: 0 + m_BoxSize: {x: 1, y: 1, z: 1} + m_SphereRadius: 1 + m_CSVersion: 2 + m_ObsoleteSphereInfiniteProjection: 0 + m_ObsoleteBoxInfiniteProjection: 0 + proxySettings: + useInfluenceVolumeAsProxyVolume: 1 + capturePositionProxySpace: {x: 0, y: 0, z: 0} + captureRotationProxySpace: {x: 0, y: 0, z: 0, w: 1} + mirrorPositionProxySpace: {x: 0, y: 0, z: 0} + mirrorRotationProxySpace: {x: 0, y: 0, z: 0, w: 0} + resolutionScalable: + m_Override: 512 + m_UseOverride: 0 + m_Level: 0 + resolution: 0 + cubeResolution: + m_Override: 128 + m_UseOverride: 0 + m_Level: 0 + cameraSettings: + customRenderingSettings: 1 + renderingPathCustomFrameSettings: + bitDatas: + data1: 1266566494682957 + data2: 13799030890350739480 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 + sssCustomDownsampleSteps: 0 + msaaMode: 1 + materialQuality: 0 + renderingPathCustomFrameSettingsOverrideMask: + mask: + data1: 8192 + data2: 34359738368 + bufferClearing: + clearColorMode: 0 + backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} + clearDepth: 1 + volumes: + layerMask: + serializedVersion: 2 + m_Bits: 1 + anchorOverride: {fileID: 0} + frustum: + mode: 0 + aspect: 1 + farClipPlaneRaw: 1000 + nearClipPlaneRaw: 0.3 + fieldOfView: 90 + projectionMatrix: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + culling: + useOcclusionCulling: 1 + cullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + sceneCullingMaskOverride: 0 + invertFaceCulling: 0 + flipYMode: 0 + probeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + defaultFrameSettings: 0 + m_ObsoleteRenderingPath: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + roughReflections: 1 + distanceBasedRoughness: 0 + m_ProbeSettingsOverride: + probe: 0 + camera: + camera: 0 + m_ProxyVolume: {fileID: 0} + m_BakedTexture: {fileID: 0} + m_CustomTexture: {fileID: 0} + m_BakedRenderData: + m_WorldToCameraRHS: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_ProjectionMatrix: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_CapturePosition: {x: 0, y: 0, z: 0} + m_CaptureRotation: {x: 0, y: 0, z: 0, w: 0} + m_FieldOfView: 0 + m_Aspect: 0 + m_CustomRenderData: + m_WorldToCameraRHS: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_ProjectionMatrix: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_CapturePosition: {x: 0, y: 0, z: 0} + m_CaptureRotation: {x: 0, y: 0, z: 0, w: 0} + m_FieldOfView: 0 + m_Aspect: 0 + m_HasValidSHForNormalization: 0 + m_SHForNormalization: + 'sh[ 0]': 0 + 'sh[ 1]': 0 + 'sh[ 2]': 0 + 'sh[ 3]': 0 + 'sh[ 4]': 0 + 'sh[ 5]': 0 + 'sh[ 6]': 0 + 'sh[ 7]': 0 + 'sh[ 8]': 0 + 'sh[ 9]': 0 + 'sh[10]': 0 + 'sh[11]': 0 + 'sh[12]': 0 + 'sh[13]': 0 + 'sh[14]': 0 + 'sh[15]': 0 + 'sh[16]': 0 + 'sh[17]': 0 + 'sh[18]': 0 + 'sh[19]': 0 + 'sh[20]': 0 + 'sh[21]': 0 + 'sh[22]': 0 + 'sh[23]': 0 + 'sh[24]': 0 + 'sh[25]': 0 + 'sh[26]': 0 + m_SHValidForCapturePosition: {x: 0, y: 0, z: 0} + m_SHValidForSourcePosition: {x: 0, y: 0, z: 0} + m_HDProbeVersion: 9 + m_ObsoleteInfiniteProjection: 1 + m_ObsoleteInfluenceVolume: + m_Shape: 0 + m_BoxSize: {x: 10, y: 10, z: 10} + m_BoxBlendDistancePositive: {x: 1, y: 1, z: 1} + m_BoxBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 + m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendDistance: 0 + m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendNormalDistance: 0 + m_EditorAdvancedModeEnabled: 0 + m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} + m_Version: 1 + m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} + m_ObsoleteOffset: {x: 0, y: 0, z: 0} + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + m_ObsoleteMultiplier: 1 + m_ObsoleteWeight: 1 + m_ObsoleteMode: 0 + m_ObsoleteLightLayers: 1 + m_ObsoleteCaptureSettings: + overrides: 0 + clearColorMode: 0 + backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} + clearDepth: 1 + cullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + useOcclusionCulling: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + volumeAnchorOverride: {fileID: 0} + projection: 0 + nearClipPlane: 0.3 + farClipPlane: 1000 + fieldOfView: 90 + orthographicSize: 5 + renderingPath: 0 + shadowDistance: 100 + m_ReflectionProbeVersion: 10 + m_ObsoleteInfluenceShape: 0 + m_ObsoleteInfluenceSphereRadius: 3 + m_ObsoleteBlendDistancePositive: {x: 1, y: 1, z: 1} + m_ObsoleteBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_ObsoleteBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_ObsoleteBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_ObsoleteBoxSideFadePositive: {x: 1, y: 1, z: 1} + m_ObsoleteBoxSideFadeNegative: {x: 1, y: 1, z: 1} +--- !u!215 &616523817 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 616523814} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 2 + m_RefreshMode: 2 + m_TimeSlicingMode: 0 + m_Resolution: 128 + m_UpdateFrequency: 0 + m_BoxSize: {x: 56, y: 30, z: 50} + m_BoxOffset: {x: 0, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 1000 + m_ShadowDistance: 100 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_IntensityMultiplier: 1 + m_BlendDistance: 0 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 1 + m_UseOcclusionCulling: 1 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} +--- !u!1 &664624465 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 664624467} + - component: {fileID: 664624466} + m_Layer: 0 + m_Name: Water Current/Deformer Decal + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &664624466 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 664624465} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e5ede582eab822e4ab05a6a5defb4d9f, type: 3} + m_Name: + m_EditorClassIdentifier: + scaleMode: 0 + regionSize: {x: 384, y: 128} + amplitude: 4 + surfaceFoamDimmer: 1 + deepFoamDimmer: 1 + resolution: {x: 256, y: 256} + updateMode: 1 + material: {fileID: 2100000, guid: 7ac1471bc6b69f0499dab746b6c429c8, type: 2} +--- !u!4 &664624467 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 664624465} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1846865476} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &807039429 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 807039431} + - component: {fileID: 807039430} + m_Layer: 0 + m_Name: Waterfall Foam Generator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &807039430 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 807039429} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0050ecd2d32680645848edd91f37442d, type: 3} + m_Name: + m_EditorClassIdentifier: + scaleMode: 0 + regionSize: {x: 20, y: 15} + amplitude: 2 + surfaceFoamDimmer: 1 + deepFoamDimmer: 1 + resolution: {x: 16, y: 16} + updateMode: 1 + material: {fileID: 2100000, guid: 670243648442e0a428ea430740211ab2, type: 2} + type: 3 + texture: {fileID: 0} + m_Version: 2 +--- !u!4 &807039431 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 807039429} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.9940536, z: -0, w: 0.108891815} + m_LocalPosition: {x: -10.58, y: 0, z: -1.79} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2057688235} + m_LocalEulerAnglesHint: {x: 0, y: 167.497, z: 0} +--- !u!1 &838711648 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 838711650} + - component: {fileID: 838711649} + - component: {fileID: 838711651} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &838711649 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 838711648} + m_Enabled: 1 + serializedVersion: 11 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 130000 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 1 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 4294967295 + m_Lightmapping: 4 + m_LightShadowCasterMode: 2 + m_AreaSize: {x: 0.5, y: 0.5} + m_BounceIntensity: 1 + m_ColorTemperature: 7404 + m_UseColorTemperature: 1 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ForceVisible: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 + m_LightUnit: 2 + m_LuxAtDistance: 1 + m_EnableSpotReflector: 1 +--- !u!4 &838711650 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 838711648} + serializedVersion: 2 + m_LocalRotation: {x: 0.5965104, y: -0.53201133, z: 0.59835696, w: 0.05575243} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 879231443} + m_LocalEulerAnglesHint: {x: 44.683, y: -247.008, z: -126.981} +--- !u!114 &838711651 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 838711648} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} + m_Name: + m_EditorClassIdentifier: + m_PointlightHDType: 0 + m_SpotLightShape: 0 + m_AreaLightShape: 0 + m_EnableSpotReflector: 1 + m_LightUnit: 2 + m_LuxAtDistance: 1 + m_Intensity: 130000 + m_InnerSpotPercent: 0 + m_SpotIESCutoffPercent: 100 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_FadeDistance: 10000 + m_VolumetricFadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 0.5 + m_ShapeHeight: 0.5 + m_AspectRatio: 1 + m_ShapeRadius: 0.025 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 0.99 + m_ApplyRangeAttenuation: 1 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + m_IESPoint: {fileID: 0} + m_IESSpot: {fileID: 0} + m_IncludeForRayTracing: 1 + m_IncludeForPathTracing: 1 + m_AreaLightShadowCone: 120 + m_UseScreenSpaceShadows: 0 + m_InteractsWithSky: 1 + m_AngularDiameter: 0.5 + diameterMultiplerMode: 1 + diameterMultiplier: 1 + diameterOverride: 0.5 + celestialBodyShadingSource: 1 + sunLightOverride: {fileID: 0} + sunColor: {r: 1, g: 1, b: 1, a: 1} + sunIntensity: 130000 + moonPhase: 0.2 + moonPhaseRotation: 0 + earthshine: 1 + flareSize: 2 + flareTint: {r: 1, g: 1, b: 1, a: 1} + flareFalloff: 4 + flareMultiplier: 1 + surfaceTexture: {fileID: 0} + surfaceTint: {r: 1, g: 1, b: 1, a: 1} + m_Distance: 1.5e+11 + m_UseRayTracedShadows: 0 + m_NumRayTracingSamples: 4 + m_FilterTracedShadow: 1 + m_FilterSizeTraced: 16 + m_SunLightConeAngle: 0.5 + m_LightShadowRadius: 0.5 + m_SemiTransparentShadow: 0 + m_ColorShadow: 1 + m_DistanceBasedFiltering: 0 + m_EvsmExponent: 15 + m_EvsmLightLeakBias: 0 + m_EvsmVarianceBias: 0.00001 + m_EvsmBlurPasses: 0 + m_LightlayersMask: -1 + m_LinkShadowLayers: 1 + m_ShadowNearPlane: 0.1 + m_BlockerSampleCount: 24 + m_FilterSampleCount: 16 + m_MinFilterSize: 0.1 + m_DirLightPCSSBlockerSampleCount: 24 + m_DirLightPCSSFilterSampleCount: 16 + m_DirLightPCSSMaxPenumbraSize: 0.56 + m_DirLightPCSSMaxSamplingDistance: 0.5 + m_DirLightPCSSMinFilterSizeTexels: 1.5 + m_DirLightPCSSMinFilterMaxAngularDiameter: 10 + m_DirLightPCSSBlockerSearchAngularDiameter: 12 + m_DirLightPCSSBlockerSamplingClumpExponent: 2 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 0 + m_Level: 2 + m_ShadowDimmer: 1 + m_VolumetricShadowDimmer: 1 + m_ShadowFadeDistance: 10000 + m_UseContactShadow: + m_Override: 0 + m_UseOverride: 1 + m_Level: 0 + m_RayTracedContactShadow: 0 + m_ShadowTint: {r: 0, g: 0, b: 0, a: 1} + m_PenumbraTint: 0 + m_NormalBias: 0.75 + m_SlopeBias: 0.5 + m_ShadowUpdateMode: 0 + m_AlwaysDrawDynamicShadows: 0 + m_UpdateShadowOnLightMovement: 0 + m_CachedShadowTranslationThreshold: 0.01 + m_CachedShadowAngularThreshold: 0.5 + m_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 + m_preserveCachedShadow: 0 + m_OnDemandShadowRenderOnPlacement: 1 + m_ShadowCascadeRatios: + - 0.05 + - 0.2 + - 0.3 + m_ShadowCascadeBorders: + - 0.2 + - 0.2 + - 0.2 + - 0.2 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 0 + m_ShadowPrecision: 0 + useOldInspector: 0 + useVolumetric: 1 + featuresFoldout: 1 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 + m_AreaLightEmissiveMeshLayer: -1 + m_Version: 13 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 +--- !u!1 &879231442 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 879231443} + m_Layer: 0 + m_Name: Lighting + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &879231443 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 879231442} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 838711650} + - {fileID: 1333586065} + - {fileID: 616523815} + - {fileID: 1399800659} + - {fileID: 2023236301} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &974883611 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2023236301} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_RootOrder + value: -1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalRotation.x + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7646506281752422970, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -7646506281752422970, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7646506281752422970, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_RenderingLayerMask + value: 65021 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: 'm_Materials.Array.data[0]' + value: + objectReference: {fileID: 2100000, guid: 31f18f68f11c98c42bebc2a91ad278c5, type: 2} + - target: {fileID: -3721408480043551960, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_Name + value: Ice + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1612045763185126228, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: 'm_Materials.Array.data[0]' + value: + objectReference: {fileID: 2100000, guid: 31f18f68f11c98c42bebc2a91ad278c5, type: 2} + - target: {fileID: 3820968617606807729, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3820968617606807729, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3820968617606807729, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7617364569497090628, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8104102649839008626, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + propertyPath: 'm_Materials.Array.data[0]' + value: + objectReference: {fileID: 2100000, guid: 31f18f68f11c98c42bebc2a91ad278c5, type: 2} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} +--- !u!4 &974883612 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: f3fe4c3936daadc429760555ad405b9a, type: 3} + m_PrefabInstance: {fileID: 974883611} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1006250449 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1006250451} + - component: {fileID: 1006250452} + m_Layer: 0 + m_Name: Water Sample Description + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1006250451 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1006250449} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -15.408934, y: -0.19874167, z: 2.6264312} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1006250452 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1006250449} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 43f37cacaa9726942b97c38d03b617ac, type: 3} + m_Name: + m_EditorClassIdentifier: + headline: Current with Splines + headlineLightColor: {r: 0.066, g: 0.066, b: 0.066, a: 1} + headlineDarkColor: {r: 0.82, g: 0.82, b: 0.82, a: 1} + openLightColor: {r: 0.086, g: 0.427, b: 0.792, a: 1} + openDarkColor: {r: 0.478, g: 0.658, b: 0.933, a: 1} + highlightLightColor: {r: 0.6, g: 0.4, b: 0, a: 1} + highlightDarkColor: {r: 1, g: 0.89, b: 0.45, a: 1} + codeLightColor: {r: 0.76, g: 0.41, b: 0, a: 1} + codeDarkColor: {r: 0.91, g: 0.57, b: 0.17, a: 1} + SamplesDescriptionsJson: {fileID: 4900000, guid: b3991fc1e1f3c794ba845394d5ad1811, type: 3} + samplesPrefabs: [] + PresentationMode: 2 + enableSelectButton: 0 + currentIndex: 0 + currentPrefab: {fileID: 0} + requiredSettingsSO: {fileID: 11400000, guid: 633cf8ce1756ef641a560e1512b73e4f, type: 2} + gameobjectSamplesName: {fileID: 0} + gameobjectSamplesDescription: {fileID: 0} + gameViewCamera: {fileID: 0} +--- !u!1 &1203974984 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1203974986} + - component: {fileID: 1203974985} + m_Layer: 0 + m_Name: Decal Waterfall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1203974985 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1203974984} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f19d9143a39eb3b46bc4563e9889cfbd, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 2100000, guid: 92f2a3578727a5d4aa4b5a11eb9708e5, type: 2} + m_DrawDistance: 1000 + m_FadeScale: 0.9 + m_StartAngleFade: 180 + m_EndAngleFade: 180 + m_UVScale: {x: 1, y: 1} + m_UVBias: {x: 0, y: 0} + m_AffectsTransparency: 1 + m_TransparentTextureResolution: + m_Override: 256 + m_UseOverride: 1 + m_Level: 0 + m_DecalLayerMask: 512 + m_ScaleMode: 0 + m_Offset: {x: 0, y: 0, z: 0} + m_Size: {x: 8, y: 7, z: 5} + m_FadeFactor: 1 + m_Version: 3 +--- !u!4 &1203974986 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1203974984} + serializedVersion: 2 + m_LocalRotation: {x: 0.29501218, y: 0.64476776, z: -0.2988744, w: 0.63868344} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2057688235} + m_LocalEulerAnglesHint: {x: 49.663, y: 90.488, z: -0.119} +--- !u!84 &1218118351 +RenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_IsAlphaChannelOptional: 0 + serializedVersion: 6 + m_Width: 384 + m_Height: 128 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthStencilFormat: 90 + m_ColorFormat: 8 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 0 + m_UseDynamicScaleExplicit: 0 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_EnableRandomWrite: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 2 + m_VolumeDepth: 1 + m_ShadowSamplingMode: 2 +--- !u!1 &1333586064 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1333586065} + - component: {fileID: 1333586067} + - component: {fileID: 1333586066} + m_Layer: 0 + m_Name: Reflection Probe Start + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1333586065 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1333586064} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: 0.22268695, z: -0, w: 0.97489005} + m_LocalPosition: {x: 36.3, y: 4.265727, z: 7.4000006} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 879231443} + m_LocalEulerAnglesHint: {x: 0, y: 25.734, z: 0} +--- !u!114 &1333586066 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1333586064} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0ef8dc2c2eabfa4e8cb77be57a837c0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ProbeSettings: + frustum: + fieldOfViewMode: 1 + fixedValue: 90 + automaticScale: 1 + viewerScale: 1 + type: 0 + mode: 1 + realtimeMode: 1 + timeSlicing: 0 + lighting: + importance: 1 + multiplier: 1 + weight: 1 + lightLayer: 1 + fadeDistance: 10000 + rangeCompressionFactor: 1 + influence: + m_Shape: 0 + m_BoxSize: {x: 100, y: 30, z: 50} + m_BoxBlendDistancePositive: {x: 5, y: 5, z: 5} + m_BoxBlendDistanceNegative: {x: 5, y: 5, z: 5} + m_BoxBlendNormalDistancePositive: {x: 5, y: 5, z: 5} + m_BoxBlendNormalDistanceNegative: {x: 5, y: 5, z: 5} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 + m_EditorAdvancedModeBlendDistancePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_EditorSimplifiedModeBlendDistance: 5 + m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendNormalDistance: 5 + m_EditorAdvancedModeEnabled: 0 + m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} + m_Version: 1 + m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} + m_ObsoleteOffset: {x: 0, y: 0, z: 0} + proxy: + m_Shape: 0 + m_BoxSize: {x: 1, y: 1, z: 1} + m_SphereRadius: 1 + m_CSVersion: 2 + m_ObsoleteSphereInfiniteProjection: 0 + m_ObsoleteBoxInfiniteProjection: 0 + proxySettings: + useInfluenceVolumeAsProxyVolume: 1 + capturePositionProxySpace: {x: 0, y: 0, z: 0} + captureRotationProxySpace: {x: 0, y: 0, z: 0, w: 1} + mirrorPositionProxySpace: {x: 0, y: 0, z: 0} + mirrorRotationProxySpace: {x: 0, y: 0, z: 0, w: 0} + resolutionScalable: + m_Override: 512 + m_UseOverride: 0 + m_Level: 0 + resolution: 0 + cubeResolution: + m_Override: 128 + m_UseOverride: 0 + m_Level: 0 + cameraSettings: + customRenderingSettings: 1 + renderingPathCustomFrameSettings: + bitDatas: + data1: 1266566494682957 + data2: 13799030890350739480 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 + sssCustomDownsampleSteps: 0 + msaaMode: 1 + materialQuality: 0 + renderingPathCustomFrameSettingsOverrideMask: + mask: + data1: 8192 + data2: 34359738368 + bufferClearing: + clearColorMode: 0 + backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} + clearDepth: 1 + volumes: + layerMask: + serializedVersion: 2 + m_Bits: 1 + anchorOverride: {fileID: 0} + frustum: + mode: 0 + aspect: 1 + farClipPlaneRaw: 1000 + nearClipPlaneRaw: 0.3 + fieldOfView: 90 + projectionMatrix: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + culling: + useOcclusionCulling: 1 + cullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + sceneCullingMaskOverride: 0 + invertFaceCulling: 0 + flipYMode: 0 + probeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + defaultFrameSettings: 0 + m_ObsoleteRenderingPath: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + roughReflections: 1 + distanceBasedRoughness: 0 + m_ProbeSettingsOverride: + probe: 0 + camera: + camera: 0 + m_ProxyVolume: {fileID: 0} + m_BakedTexture: {fileID: 0} + m_CustomTexture: {fileID: 0} + m_BakedRenderData: + m_WorldToCameraRHS: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_ProjectionMatrix: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_CapturePosition: {x: 0, y: 0, z: 0} + m_CaptureRotation: {x: 0, y: 0, z: 0, w: 0} + m_FieldOfView: 0 + m_Aspect: 0 + m_CustomRenderData: + m_WorldToCameraRHS: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_ProjectionMatrix: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_CapturePosition: {x: 0, y: 0, z: 0} + m_CaptureRotation: {x: 0, y: 0, z: 0, w: 0} + m_FieldOfView: 0 + m_Aspect: 0 + m_HasValidSHForNormalization: 0 + m_SHForNormalization: + 'sh[ 0]': 0 + 'sh[ 1]': 0 + 'sh[ 2]': 0 + 'sh[ 3]': 0 + 'sh[ 4]': 0 + 'sh[ 5]': 0 + 'sh[ 6]': 0 + 'sh[ 7]': 0 + 'sh[ 8]': 0 + 'sh[ 9]': 0 + 'sh[10]': 0 + 'sh[11]': 0 + 'sh[12]': 0 + 'sh[13]': 0 + 'sh[14]': 0 + 'sh[15]': 0 + 'sh[16]': 0 + 'sh[17]': 0 + 'sh[18]': 0 + 'sh[19]': 0 + 'sh[20]': 0 + 'sh[21]': 0 + 'sh[22]': 0 + 'sh[23]': 0 + 'sh[24]': 0 + 'sh[25]': 0 + 'sh[26]': 0 + m_SHValidForCapturePosition: {x: 0, y: 0, z: 0} + m_SHValidForSourcePosition: {x: 0, y: 0, z: 0} + m_HDProbeVersion: 9 + m_ObsoleteInfiniteProjection: 1 + m_ObsoleteInfluenceVolume: + m_Shape: 0 + m_BoxSize: {x: 10, y: 10, z: 10} + m_BoxBlendDistancePositive: {x: 1, y: 1, z: 1} + m_BoxBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 + m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendDistance: 0 + m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendNormalDistance: 0 + m_EditorAdvancedModeEnabled: 0 + m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} + m_Version: 1 + m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} + m_ObsoleteOffset: {x: 0, y: 0, z: 0} + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + m_ObsoleteMultiplier: 1 + m_ObsoleteWeight: 1 + m_ObsoleteMode: 0 + m_ObsoleteLightLayers: 1 + m_ObsoleteCaptureSettings: + overrides: 0 + clearColorMode: 0 + backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} + clearDepth: 1 + cullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + useOcclusionCulling: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + volumeAnchorOverride: {fileID: 0} + projection: 0 + nearClipPlane: 0.3 + farClipPlane: 1000 + fieldOfView: 90 + orthographicSize: 5 + renderingPath: 0 + shadowDistance: 100 + m_ReflectionProbeVersion: 10 + m_ObsoleteInfluenceShape: 0 + m_ObsoleteInfluenceSphereRadius: 3 + m_ObsoleteBlendDistancePositive: {x: 1, y: 1, z: 1} + m_ObsoleteBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_ObsoleteBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_ObsoleteBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_ObsoleteBoxSideFadePositive: {x: 1, y: 1, z: 1} + m_ObsoleteBoxSideFadeNegative: {x: 1, y: 1, z: 1} +--- !u!215 &1333586067 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1333586064} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 2 + m_RefreshMode: 2 + m_TimeSlicingMode: 0 + m_Resolution: 128 + m_UpdateFrequency: 0 + m_BoxSize: {x: 100, y: 30, z: 50} + m_BoxOffset: {x: 0, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 1000 + m_ShadowDistance: 100 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_IntensityMultiplier: 1 + m_BlendDistance: 0 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 1 + m_UseOcclusionCulling: 1 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} +--- !u!1 &1379027767 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1379027770} + - component: {fileID: 1379027769} + - component: {fileID: 1379027768} + m_Layer: 0 + m_Name: VFX_WaterfallGroundSplash + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!73398921 &1379027768 +VFXRenderer: + serializedVersion: 1 + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1379027767} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!2083052967 &1379027769 +VisualEffect: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1379027767} + m_Enabled: 1 + m_Asset: {fileID: 8926484042661614526, guid: 93449e04b5d72ce49bfa863ed698a8c0, type: 3} + m_InitialEventName: OnPlay + m_InitialEventNameOverriden: 0 + m_StartSeed: 0 + m_ResetSeedOnPlay: 1 + m_AllowInstancing: 1 + m_ResourceVersion: 1 + m_PropertySheet: + m_Float: + m_Array: [] + m_Vector2f: + m_Array: [] + m_Vector3f: + m_Array: [] + m_Vector4f: + m_Array: + - m_Value: {x: 1, y: 1, z: 1, w: 1} + m_Name: Color + m_Overridden: 1 + m_Uint: + m_Array: [] + m_Int: + m_Array: [] + m_Matrix4x4f: + m_Array: [] + m_AnimationCurve: + m_Array: [] + m_Gradient: + m_Array: [] + m_NamedObject: + m_Array: [] + m_Bool: + m_Array: [] +--- !u!4 &1379027770 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1379027767} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: -0.37, y: -2.26, z: 0.051874876} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2057688235} + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 0} +--- !u!1 &1399800658 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1399800659} + - component: {fileID: 1399800661} + - component: {fileID: 1399800660} + m_Layer: 0 + m_Name: Reflection Probe End + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1399800659 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1399800658} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0.22212046, z: -0, w: 0.9750192} + m_LocalPosition: {x: -44.6, y: 4.265727, z: 0.1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 879231443} + m_LocalEulerAnglesHint: {x: 0, y: -25.667, z: 0} +--- !u!114 &1399800660 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1399800658} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0ef8dc2c2eabfa4e8cb77be57a837c0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ProbeSettings: + frustum: + fieldOfViewMode: 1 + fixedValue: 90 + automaticScale: 1 + viewerScale: 1 + type: 0 + mode: 1 + realtimeMode: 1 + timeSlicing: 0 + lighting: + importance: 1 + multiplier: 1 + weight: 1 + lightLayer: 1 + fadeDistance: 10000 + rangeCompressionFactor: 1 + influence: + m_Shape: 0 + m_BoxSize: {x: 70.4, y: 30, z: 30} + m_BoxBlendDistancePositive: {x: 5, y: 5, z: 5} + m_BoxBlendDistanceNegative: {x: 5, y: 5, z: 5} + m_BoxBlendNormalDistancePositive: {x: 5, y: 5, z: 5} + m_BoxBlendNormalDistanceNegative: {x: 5, y: 5, z: 5} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 + m_EditorAdvancedModeBlendDistancePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_EditorSimplifiedModeBlendDistance: 5 + m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendNormalDistance: 5 + m_EditorAdvancedModeEnabled: 0 + m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} + m_Version: 1 + m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} + m_ObsoleteOffset: {x: 0, y: 0, z: 0} + proxy: + m_Shape: 0 + m_BoxSize: {x: 1, y: 1, z: 1} + m_SphereRadius: 1 + m_CSVersion: 2 + m_ObsoleteSphereInfiniteProjection: 0 + m_ObsoleteBoxInfiniteProjection: 0 + proxySettings: + useInfluenceVolumeAsProxyVolume: 1 + capturePositionProxySpace: {x: 0, y: 0, z: 0} + captureRotationProxySpace: {x: 0, y: 0, z: 0, w: 1} + mirrorPositionProxySpace: {x: 0, y: 0, z: 0} + mirrorRotationProxySpace: {x: 0, y: 0, z: 0, w: 0} + resolutionScalable: + m_Override: 512 + m_UseOverride: 0 + m_Level: 0 + resolution: 0 + cubeResolution: + m_Override: 128 + m_UseOverride: 0 + m_Level: 0 + cameraSettings: + customRenderingSettings: 1 + renderingPathCustomFrameSettings: + bitDatas: + data1: 1266566494682957 + data2: 13799030890350739480 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 + sssCustomDownsampleSteps: 0 + msaaMode: 1 + materialQuality: 0 + renderingPathCustomFrameSettingsOverrideMask: + mask: + data1: 8192 + data2: 34359738368 + bufferClearing: + clearColorMode: 0 + backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} + clearDepth: 1 + volumes: + layerMask: + serializedVersion: 2 + m_Bits: 1 + anchorOverride: {fileID: 0} + frustum: + mode: 0 + aspect: 1 + farClipPlaneRaw: 1000 + nearClipPlaneRaw: 0.3 + fieldOfView: 90 + projectionMatrix: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + culling: + useOcclusionCulling: 1 + cullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + sceneCullingMaskOverride: 0 + invertFaceCulling: 0 + flipYMode: 0 + probeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + defaultFrameSettings: 0 + m_ObsoleteRenderingPath: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + roughReflections: 1 + distanceBasedRoughness: 0 + m_ProbeSettingsOverride: + probe: 0 + camera: + camera: 0 + m_ProxyVolume: {fileID: 0} + m_BakedTexture: {fileID: 0} + m_CustomTexture: {fileID: 0} + m_BakedRenderData: + m_WorldToCameraRHS: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_ProjectionMatrix: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_CapturePosition: {x: 0, y: 0, z: 0} + m_CaptureRotation: {x: 0, y: 0, z: 0, w: 0} + m_FieldOfView: 0 + m_Aspect: 0 + m_CustomRenderData: + m_WorldToCameraRHS: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_ProjectionMatrix: + e00: 0 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 0 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 0 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 0 + m_CapturePosition: {x: 0, y: 0, z: 0} + m_CaptureRotation: {x: 0, y: 0, z: 0, w: 0} + m_FieldOfView: 0 + m_Aspect: 0 + m_HasValidSHForNormalization: 0 + m_SHForNormalization: + 'sh[ 0]': 0 + 'sh[ 1]': 0 + 'sh[ 2]': 0 + 'sh[ 3]': 0 + 'sh[ 4]': 0 + 'sh[ 5]': 0 + 'sh[ 6]': 0 + 'sh[ 7]': 0 + 'sh[ 8]': 0 + 'sh[ 9]': 0 + 'sh[10]': 0 + 'sh[11]': 0 + 'sh[12]': 0 + 'sh[13]': 0 + 'sh[14]': 0 + 'sh[15]': 0 + 'sh[16]': 0 + 'sh[17]': 0 + 'sh[18]': 0 + 'sh[19]': 0 + 'sh[20]': 0 + 'sh[21]': 0 + 'sh[22]': 0 + 'sh[23]': 0 + 'sh[24]': 0 + 'sh[25]': 0 + 'sh[26]': 0 + m_SHValidForCapturePosition: {x: 0, y: 0, z: 0} + m_SHValidForSourcePosition: {x: 0, y: 0, z: 0} + m_HDProbeVersion: 9 + m_ObsoleteInfiniteProjection: 1 + m_ObsoleteInfluenceVolume: + m_Shape: 0 + m_BoxSize: {x: 10, y: 10, z: 10} + m_BoxBlendDistancePositive: {x: 1, y: 1, z: 1} + m_BoxBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 + m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendDistance: 0 + m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendNormalDistance: 0 + m_EditorAdvancedModeEnabled: 0 + m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} + m_Version: 1 + m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} + m_ObsoleteOffset: {x: 0, y: 0, z: 0} + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + m_ObsoleteMultiplier: 1 + m_ObsoleteWeight: 1 + m_ObsoleteMode: 0 + m_ObsoleteLightLayers: 1 + m_ObsoleteCaptureSettings: + overrides: 0 + clearColorMode: 0 + backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} + clearDepth: 1 + cullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + useOcclusionCulling: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + volumeAnchorOverride: {fileID: 0} + projection: 0 + nearClipPlane: 0.3 + farClipPlane: 1000 + fieldOfView: 90 + orthographicSize: 5 + renderingPath: 0 + shadowDistance: 100 + m_ReflectionProbeVersion: 10 + m_ObsoleteInfluenceShape: 0 + m_ObsoleteInfluenceSphereRadius: 3 + m_ObsoleteBlendDistancePositive: {x: 1, y: 1, z: 1} + m_ObsoleteBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_ObsoleteBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_ObsoleteBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_ObsoleteBoxSideFadePositive: {x: 1, y: 1, z: 1} + m_ObsoleteBoxSideFadeNegative: {x: 1, y: 1, z: 1} +--- !u!215 &1399800661 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1399800658} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 2 + m_RefreshMode: 2 + m_TimeSlicingMode: 0 + m_Resolution: 128 + m_UpdateFrequency: 0 + m_BoxSize: {x: 70.4, y: 30, z: 30} + m_BoxOffset: {x: 0, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 1000 + m_ShadowDistance: 100 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_IntensityMultiplier: 1 + m_BlendDistance: 0 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 1 + m_UseOcclusionCulling: 1 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} +--- !u!1 &1708415518 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1708415521} + - component: {fileID: 1708415520} + - component: {fileID: 1708415519} + m_Layer: 0 + m_Name: SplineContainer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1708415519 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1708415518} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d32de00c844000b4ca559a5d0c18888d, type: 3} + m_Name: + m_EditorClassIdentifier: + splineContainer: {fileID: 1708415520} + computeShader: {fileID: 7200000, guid: 39dcf63f954a6ce41bdb928155be5e94, type: 3} + waterSurface: {fileID: 1846865475} + waterDecalMaterial: {fileID: 2100000, guid: 7ac1471bc6b69f0499dab746b6c429c8, type: 2} + splineWidth: 8 + splineBlendWidth: 8 + searchStepsPerCurve: 16 + resolution: {x: 384, y: 128} + currentMapBlurSize: 4 + heightMapBlurSize: 0 + heightMapMinMax: {x: 0.5, y: 1} + currentMap: {fileID: 41950334} + heightMap: {fileID: 1218118351} +--- !u!114 &1708415520 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1708415518} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dab5c7d4c32e743048dfca98e2d5914f, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Spline: + m_EditModeType: 1 + m_Knots: [] + m_MetaData: [] + m_Closed: 0 + m_IntData: + m_Data: [] + m_FloatData: + m_Data: [] + m_Float4Data: + m_Data: [] + m_ObjectData: + m_Data: [] + m_Splines: + - m_EditModeType: 1 + m_Knots: + - Position: + x: 81 + y: 1.53 + z: -14 + TangentIn: + x: -0 + y: -0 + z: -6.131355 + TangentOut: + x: 0 + y: 0 + z: 6.131355 + Rotation: + value: + x: 0 + y: -0.5095963 + z: -0 + w: 0.8604136 + - Position: + x: 41.07 + y: 1.53 + z: 7.75 + TangentIn: + x: 0 + y: 0 + z: -8.547042 + TangentOut: + x: -0.83553696 + y: 0 + z: 18.799816 + Rotation: + value: + x: 0 + y: -0.49364328 + z: 0 + w: 0.86966455 + - Position: + x: -2.09 + y: 1.53 + z: 20.1 + TangentIn: + x: 0 + y: 0 + z: -7.3792887 + TangentOut: + x: 0 + y: 0 + z: 8.840817 + Rotation: + value: + x: 0 + y: 0.81771904 + z: 0 + w: -0.57561755 + - Position: + x: -0.64 + y: 1.53 + z: 0 + TangentIn: + x: -0.000000059604645 + y: -8.326673e-17 + z: -2.700861 + TangentOut: + x: 0.000000029802322 + y: -2.7755576e-17 + z: 2.700862 + Rotation: + value: + x: -0.000000001088076 + y: 0.97277695 + z: -2.5921115e-10 + w: 0.23174366 + - Position: + x: -2.7 + y: 1.53 + z: -14.58 + TangentIn: + x: 0 + y: 0 + z: -3.5046532 + TangentOut: + x: 0 + y: 0 + z: 7.009306 + Rotation: + value: + x: 0 + y: 0.75549734 + z: 0 + w: -0.6551517 + - Position: + x: -12.77 + y: 1.53 + z: -7.58 + TangentIn: + x: 0 + y: 0 + z: -4.669084 + TangentOut: + x: 0 + y: 0 + z: 4.669084 + Rotation: + value: + x: 0 + y: -0.041558888 + z: -0 + w: 0.99913603 + - Position: + x: -21.69 + y: 1.53 + z: 3.9 + TangentIn: + x: 0 + y: 0 + z: -3.8008068 + TangentOut: + x: 0 + y: 0 + z: 2.484643 + Rotation: + value: + x: -4.710275e-16 + y: -0.70710665 + z: 4.7102766e-16 + w: 0.7071069 + - Position: + x: -25.04 + y: -2.47 + z: 4.4 + TangentIn: + x: 0.00000011920929 + y: 0 + z: -1.253312 + TangentOut: + x: 0 + y: 0 + z: 3.3294804 + Rotation: + value: + x: -0.000000004061571 + y: -0.75687504 + z: 0.0000000035071552 + w: 0.6535596 + - Position: + x: -38.7 + y: -2.47 + z: 1.8 + TangentIn: + x: -0.00000071525574 + y: 0 + z: -2.9365127 + TangentOut: + x: 0 + y: 0 + z: 5.1472836 + Rotation: + value: + x: 0 + y: 0.8593869 + z: 0 + w: -0.51132584 + - Position: + x: -56.9 + y: -2.47 + z: -7.6 + TangentIn: + x: -0 + y: -0 + z: -3.3556192 + TangentOut: + x: 0 + y: 0 + z: 3.3556192 + Rotation: + value: + x: 0 + y: 0.83913094 + z: 0 + w: -0.5439295 + m_MetaData: + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + m_Closed: 0 + m_IntData: + m_Data: [] + m_FloatData: + m_Data: [] + m_Float4Data: + m_Data: [] + m_ObjectData: + m_Data: [] + - m_EditModeType: 1 + m_Knots: + - Position: + x: -63.2 + y: -2.47 + z: -14.6 + TangentIn: + x: 0 + y: 0 + z: -1.640122 + TangentOut: + x: 0 + y: 0 + z: 1.640122 + Rotation: + value: + x: 0 + y: 0.9467375 + z: 0 + w: -0.3220063 + - Position: + x: -76.4 + y: -2.47 + z: -32.7 + TangentIn: + x: 0.004135132 + y: -0.06000042 + z: -9.124531 + TangentOut: + x: 0 + y: 0 + z: 1.640122 + Rotation: + value: + x: 0 + y: 0.99739033 + z: 0 + w: -0.07219762 + m_MetaData: + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + m_Closed: 0 + m_IntData: + m_Data: [] + m_FloatData: + m_Data: [] + m_Float4Data: + m_Data: [] + m_ObjectData: + m_Data: [] + - m_EditModeType: 1 + m_Knots: + - Position: + x: -63 + y: -2.47 + z: -4.4 + TangentIn: + x: 0 + y: 0 + z: -1.640122 + TangentOut: + x: 0 + y: 0 + z: 1.640122 + Rotation: + value: + x: 0 + y: 0.7904107 + z: 0 + w: -0.6125773 + - Position: + x: -75.4 + y: -2.47 + z: 7.1 + TangentIn: + x: 0 + y: 0 + z: -9.128529 + TangentOut: + x: 0 + y: 0 + z: 1.640122 + Rotation: + value: + x: 0 + y: 0.15933704 + z: 0 + w: 0.9872242 + m_MetaData: + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + m_Closed: 0 + m_IntData: + m_Data: [] + m_FloatData: + m_Data: [] + m_Float4Data: + m_Data: [] + m_ObjectData: + m_Data: [] + - m_EditModeType: 1 + m_Knots: + - Position: + x: -12.6 + y: 1.5 + z: 0.5 + TangentIn: + x: 0 + y: 0 + z: -1.640122 + TangentOut: + x: 0 + y: 0 + z: 1.640122 + Rotation: + value: + x: 0 + y: 0 + z: 0 + w: 1 + - Position: + x: -15.69 + y: 1.53 + z: 8.88 + TangentIn: + x: 0 + y: 0 + z: -5.336665 + TangentOut: + x: 0 + y: 0 + z: 5.336665 + Rotation: + value: + x: 0 + y: -0.4215466 + z: -0 + w: 0.90680677 + - Position: + x: -18.93 + y: 1.53 + z: 6.07 + TangentIn: + x: 0 + y: 0 + z: -1.640122 + TangentOut: + x: 0 + y: 0 + z: 1.640122 + Rotation: + value: + x: 0 + y: 0.97978354 + z: 0 + w: 0.20006068 + m_MetaData: + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + m_Closed: 0 + m_IntData: + m_Data: [] + m_FloatData: + m_Data: [] + m_Float4Data: + m_Data: [] + m_ObjectData: + m_Data: [] + - m_EditModeType: 1 + m_Knots: + - Position: + x: -14 + y: 1.53 + z: -12.05 + TangentIn: + x: 0 + y: 0 + z: -1.640122 + TangentOut: + x: 0 + y: 0 + z: 1.640122 + Rotation: + value: + x: 0 + y: 0.4140357 + z: 0 + w: -0.91026074 + - Position: + x: -18.5 + y: 1.53 + z: -2.1 + TangentIn: + x: 0 + y: 0 + z: -3.2962105 + TangentOut: + x: 0 + y: 0 + z: 5 + Rotation: + value: + x: 0 + y: 0.49926025 + z: 0 + w: 0.8664521 + m_MetaData: + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + m_Closed: 0 + m_IntData: + m_Data: [] + m_FloatData: + m_Data: [] + m_Float4Data: + m_Data: [] + m_ObjectData: + m_Data: [] + - m_EditModeType: 1 + m_Knots: + - Position: + x: -26.83 + y: -2.47 + z: -0.02 + TangentIn: + x: 0 + y: 0 + z: -1.640122 + TangentOut: + x: 0 + y: 0 + z: 1.640122 + Rotation: + value: + x: 0 + y: 0.9986447 + z: 0 + w: 0.05204754 + - Position: + x: -31.83 + y: -2.47 + z: -3.39 + TangentIn: + x: 0 + y: 0 + z: -5.2830286 + TangentOut: + x: 0 + y: 0 + z: 5 + Rotation: + value: + x: 0 + y: -0.48476845 + z: -0 + w: 0.87464255 + m_MetaData: + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + m_Closed: 0 + m_IntData: + m_Data: [] + m_FloatData: + m_Data: [] + m_Float4Data: + m_Data: [] + m_ObjectData: + m_Data: [] + - m_EditModeType: 1 + m_Knots: + - Position: + x: -26.63 + y: -2.47 + z: 6.17 + TangentIn: + x: 0 + y: 0 + z: -1.640122 + TangentOut: + x: 0 + y: 0 + z: 1.640122 + Rotation: + value: + x: 0 + y: -0.31525302 + z: 0 + w: -0.94900775 + - Position: + x: -31.69 + y: -2.47 + z: 9.83 + TangentIn: + x: 0 + y: 0 + z: -9.935095 + TangentOut: + x: 0 + y: 0 + z: 5 + Rotation: + value: + x: 0 + y: 0.8687076 + z: 0 + w: -0.4953252 + m_MetaData: + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + m_Closed: 0 + m_IntData: + m_Data: [] + m_FloatData: + m_Data: [] + m_Float4Data: + m_Data: [] + m_ObjectData: + m_Data: [] + - m_EditModeType: 1 + m_Knots: + - Position: + x: 14.3 + y: 1.5 + z: 14.9 + TangentIn: + x: 0 + y: 0 + z: -1.640122 + TangentOut: + x: 0 + y: 0 + z: 1.640122 + Rotation: + value: + x: 0 + y: 0.70710677 + z: 0 + w: -0.70710677 + - Position: + x: -1.78 + y: 1.53 + z: 8.56 + TangentIn: + x: 0 + y: 0 + z: -9.935095 + TangentOut: + x: 0 + y: 0 + z: 5 + Rotation: + value: + x: 0.000000063664565 + y: 0.9896662 + z: 0.00000003630059 + w: 0.14339066 + - Position: + x: 1.53 + y: 1.53 + z: -0.93 + TangentIn: + x: 0 + y: 0 + z: -5.0000014 + TangentOut: + x: 0 + y: 0 + z: 5.0000014 + Rotation: + value: + x: 0.031933974 + y: 0.99518037 + z: -0.0059802406 + w: 0.092523254 + m_MetaData: + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + m_Closed: 0 + m_IntData: + m_Data: [] + m_FloatData: + m_Data: [] + m_Float4Data: + m_Data: [] + m_ObjectData: + m_Data: [] + - m_EditModeType: 1 + m_Knots: + - Position: + x: -90.9 + y: -2.47 + z: -11.5 + TangentIn: + x: 0 + y: 0 + z: -1.640122 + TangentOut: + x: 0 + y: 0 + z: 1.640122 + Rotation: + value: + x: 0 + y: 0.7071066 + z: 0 + w: 0.70710695 + - Position: + x: -81.1 + y: -2.47 + z: -11.5 + TangentIn: + x: 0 + y: 0 + z: -9.935095 + TangentOut: + x: 0 + y: 0 + z: 5 + Rotation: + value: + x: 0 + y: 0.70710677 + z: 0 + w: 0.70710677 + m_MetaData: + - Mode: 4 + Tension: 0.5 + - Mode: 4 + Tension: 0.5 + m_Closed: 0 + m_IntData: + m_Data: [] + m_FloatData: + m_Data: [] + m_Float4Data: + m_Data: [] + m_ObjectData: + m_Data: [] + m_Knots: + m_KnotsLink: [] +--- !u!4 &1708415521 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1708415518} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1780871017 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1780871020} + - component: {fileID: 1780871019} + - component: {fileID: 1780871018} + - component: {fileID: 1780871021} + - component: {fileID: 1780871022} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1780871018 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1780871017} + m_Enabled: 1 +--- !u!20 &1780871019 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1780871017} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 1 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 10000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1780871020 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1780871017} + serializedVersion: 2 + m_LocalRotation: {x: 0.10482194, y: 0.827186, z: -0.16453749, w: 0.5269756} + m_LocalPosition: {x: -40, y: 10, z: 9.5} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 22.5, y: 115, z: 0} +--- !u!114 &1780871021 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1780871017} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} + m_Name: + m_EditorClassIdentifier: + clearColorMode: 0 + backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} + clearDepth: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + volumeAnchorOverride: {fileID: 0} + antialiasing: 2 + SMAAQuality: 2 + dithering: 0 + stopNaNs: 0 + taaSharpenStrength: 0.5 + TAAQuality: 1 + taaSharpenMode: 0 + taaRingingReduction: 0 + taaHistorySharpening: 0.35 + taaAntiFlicker: 0.5 + taaMotionVectorRejection: 0 + taaAntiHistoryRinging: 0 + taaBaseBlendFactor: 0.875 + taaJitterScale: 1 + physicalParameters: + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + flipYMode: 0 + xrRendering: 1 + fullscreenPassthrough: 0 + allowDynamicResolution: 0 + customRenderingSettings: 0 + invertFaceCulling: 0 + probeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + hasPersistentHistory: 0 + screenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + screenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + allowDeepLearningSuperSampling: 1 + deepLearningSuperSamplingUseCustomQualitySettings: 0 + deepLearningSuperSamplingQuality: 0 + deepLearningSuperSamplingUseCustomAttributes: 0 + deepLearningSuperSamplingUseOptimalSettings: 1 + deepLearningSuperSamplingSharpening: 0 + allowFidelityFX2SuperResolution: 1 + fidelityFX2SuperResolutionUseCustomQualitySettings: 0 + fidelityFX2SuperResolutionQuality: 0 + fidelityFX2SuperResolutionUseCustomAttributes: 0 + fidelityFX2SuperResolutionUseOptimalSettings: 1 + fidelityFX2SuperResolutionEnableSharpening: 0 + fidelityFX2SuperResolutionSharpening: 0 + fsrOverrideSharpness: 0 + fsrSharpness: 0.92 + exposureTarget: {fileID: 0} + materialMipBias: 0 + m_RenderingPathCustomFrameSettings: + bitDatas: + data1: 1266566494682957 + data2: 13763000992746405912 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 + sssCustomDownsampleSteps: 0 + msaaMode: 1 + materialQuality: 0 + renderingPathCustomFrameSettingsOverrideMask: + mask: + data1: 0 + data2: 0 + defaultFrameSettings: 0 + m_Version: 9 + m_ObsoleteRenderingPath: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 +--- !u!114 &1780871022 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1780871017} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6dac9292e94438546aa9801a7d4cbfd1, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1846865474 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1846865476} + - component: {fileID: 1846865475} + m_Layer: 0 + m_Name: River + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1846865475 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1846865474} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d8f6fd535518f5540b4bcc3099582f77, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 3 + decalLayerMask: 1 + lightLayerMask: 1 + largeBand0FadeToggle: 1 + largeBand1FadeToggle: 1 + ripplesFadeToggle: 1 + surfaceType: 0 + geometryType: 3 + meshRenderers: + - {fileID: 0} + timeMultiplier: 1 + scriptInteractions: 0 + cpuEvaluateRipples: 0 + customMaterial: {fileID: 2100000, guid: 8ffe55eafff896b439db9f8dbf8ddde6, type: 2} + startSmoothness: 0.95 + endSmoothness: 0.85 + smoothnessFadeStart: 100 + smoothnessFadeDistance: 500 + tessellation: 1 + maxTessellationFactor: 3 + tessellationFactorFadeStart: 150 + tessellationFactorFadeRange: 1850 + refractionColor: {r: 0, g: 0.74715114, b: 0.8387991, a: 1} + maxRefractionDistance: 2 + absorptionDistance: 3 + scatteringColor: {r: 0, g: 0.13286825, b: 0.17064494, a: 1} + ambientScattering: 0.7 + heightScattering: 0.2 + displacementScattering: 0.1 + directLightTipScattering: 0.6 + directLightBodyScattering: 0.6 + maximumHeightOverride: 5 + caustics: 1 + causticsIntensity: 0.5 + causticsPlaneBlendDistance: 2 + causticsResolution: 512 + causticsBand: 2 + virtualPlaneDistance: 3 + causticsTilingFactor: 1 + causticsDirectionalShadow: 1 + causticsDirectionalShadowDimmer: 0 + renderingLayerMask: 512 + debugMode: 3 + waterMaskDebugMode: 0 + waterCurrentDebugMode: 1 + currentDebugMultiplier: 10 + waterFoamDebugMode: 0 + underWater: 1 + volumeBounds: {fileID: 0} + volumeDepth: 50 + volumeHeight: 5 + volumePrority: 0 + absorptionDistanceMultiplier: 4 + underWaterAmbientProbeContribution: 1 + underWaterScatteringColorMode: 1 + underWaterScatteringColor: {r: 0, g: 0.26999992, b: 0.2299999, a: 1} + underWaterRefraction: 0 + decalRegionSize: {x: 384, y: 128} + decalRegionAnchor: {fileID: 1846865476} + supportLargeCurrent: 1 + largeCurrentRes: 512 + largeCurrentSpeedValue: 3 + largeCurrentMap: {fileID: 0} + largeCurrentRegionExtent: {x: 200, y: 64} + largeCurrentRegionOffset: {x: 0, y: 0} + largeCurrentMapInfluence: 1 + supportRipplesCurrent: 1 + ripplesCurrentRes: 512 + ripplesCurrentSpeedValue: 0 + ripplesCurrentMap: {fileID: 2800000, guid: efe0a53d680cc1a44a3932ddb563054f, type: 3} + ripplesCurrentRegionExtent: {x: 200, y: 64} + ripplesCurrentRegionOffset: {x: 0, y: 0} + ripplesCurrentMapInfluence: 1 + deformation: 1 + deformationRes: 512 + foam: 1 + foamResolution: 512 + foamPersistenceMultiplier: 1 + foamCurrentInfluence: 0.6 + foamColor: {r: 1, g: 1, b: 1, a: 1} + foamTextureTiling: 0.1 + foamSmoothness: 0.3 + simulationFoamAmount: 0.7 + supportSimulationFoamMask: 1 + simulationFoamMask: {fileID: 2800000, guid: 79be5d2ed3f9b7a49b34f77f8b94b558, type: 3} + simulationFoamMaskExtent: {x: 150, y: 120} + simulationFoamMaskOffset: {x: 0, y: 0} + simulationFoamWindCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 10 + outSlope: 10 + tangentMode: 34 + weightedMode: 0 + inWeight: 0 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.11977959 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 34 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + repetitionSize: 250 + largeOrientationValue: 0 + largeWindSpeed: 10 + largeChaos: 0.33 + largeBand0Multiplier: 0.75 + largeBand0FadeMode: 1 + largeBand0FadeStart: 150 + largeBand0FadeDistance: 300 + largeBand1Multiplier: 0.8 + largeBand1FadeMode: 1 + largeBand1FadeStart: 300 + largeBand1FadeDistance: 800 + ripples: 1 + ripplesMotionMode: 0 + ripplesOrientationValue: 180 + ripplesWindSpeed: 8 + ripplesChaos: 0.33 + ripplesFadeMode: 1 + ripplesFadeStart: 50 + ripplesFadeDistance: 200 + simulationMask: 1 + maskRes: 512 + waterMask: {fileID: 2800000, guid: 6bd96986519b61d41b02322773f5a9ab, type: 3} + waterMaskRemap: {x: 0.48449892, y: 0.8018144} + waterMaskExtent: {x: 150, y: 120} + waterMaskOffset: {x: 0, y: 0} +--- !u!4 &1846865476 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1846865474} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 10, y: -2, z: 10} + m_LocalScale: {x: 384, y: 1, z: 128} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 664624467} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1862284147 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1862284149} + - component: {fileID: 1862284148} + m_Layer: 0 + m_Name: Volume + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1862284148 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1862284147} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: 00f15ac3fd2edf347afb896c5e608293, type: 2} +--- !u!4 &1862284149 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1862284147} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2023236300 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2023236301} + m_Layer: 0 + m_Name: Geometry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2023236301 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2023236300} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 974883612} + m_Father: {fileID: 879231443} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2057688234 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2057688235} + m_Layer: 0 + m_Name: Waterfall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2057688235 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2057688234} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -24.46, y: 0, z: 3.82} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1203974986} + - {fileID: 807039431} + - {fileID: 1379027770} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1006250451} + - {fileID: 1780871020} + - {fileID: 1862284149} + - {fileID: 879231443} + - {fileID: 2057688235} + - {fileID: 1708415521} + - {fileID: 1846865476} diff --git a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/022-ShadowCaster-CheckBoxUpgrade.unity.meta b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scenes/CurrentWithSplines.unity.meta similarity index 74% rename from Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/022-ShadowCaster-CheckBoxUpgrade.unity.meta rename to Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scenes/CurrentWithSplines.unity.meta index b31a6ef40f7..3cbfb7f1e1a 100644 --- a/Tests/SRPTests/Projects/UniversalGraphicsTest_2D/Assets/Scenes/022-ShadowCaster-CheckBoxUpgrade.unity.meta +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scenes/CurrentWithSplines.unity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f4628d82797e1154dadbb7bd871ab8b3 +guid: f4423909f80698d42bd0478e0ef6947e DefaultImporter: externalObjects: {} userData: diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scenes/Scene Resources/CurrentWithSplinesDescription.json b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scenes/Scene Resources/CurrentWithSplinesDescription.json new file mode 100644 index 00000000000..d8e089fd8ca --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scenes/Scene Resources/CurrentWithSplinesDescription.json @@ -0,0 +1,31 @@ +{ + "introduction": + """Welcome to the Water System Samples. + The WaterSystem allows you to add water to your scenes. + + This scene is similar to the Glacier scene but focuses on the live edition of a current map and a deformation map using Unity's Spline package. + + To make sure the project is set up properly, use the HDRP Asset Settings Helper buttons at the top of this component, otherwise some features might not be visible. + + In addition, for this scene to work, you need to install the spline package by selecting the SplineContainer gameobject and clicking "Check and install spline package" button (or by using the package manager). + + The project uses the Mask and Current Water Decal workflow. Make sure it is enabled in the Graphics settings first. + +

Water Surface Debug mode

+ +• For debugging purposes, this scene loads directly with the water surface current debug mode. This allows you to directly see the effect when modifying any of the splines in the SplineContainer gameobject. +• To go back to water rendering, select the River gameobject and in the Miscelaneous foldout at the bottom of the component, select "None" for the Debug mode parameter. + +

Spline To Texture

+ +• The SplineContainer gameobject has a SplineToTexture component where the spline is converted into usable maps. +• To be able to do live editing of the current and deformation maps, we need to pass each curve of the splines to the SplineToFlowMap Compute Shader using a Compute Buffer. +• Simply put, for each texture to generate, we iterate through each pixel to find the closest matching point on any of the splines. +• By evaluating the position and tangent of the closest point, we can calculate a color for the current pixel. +• The Spline Width and Spline Blend Width parameters help to calculate up to which distance the spline has an effect and controls the falloff of the effect. +• Lastly, to avoid blocky artifacts, a blur pass is done in the direction of the current to smooth out the result. In this example, the deformation map is not blurred because it specifically needs a steep dropoff at the waterfall. +• The resulting maps are directly set on a Water Decal material to ensure that any spline modification is reflected live. +• When satisfied, you should use the "Save on Disk" buttons on the SplineContainer gameobject and assign them manually in the material to avoid paying the cost of the live modification at runtime. +• As always, those maps should be imported in linear mode (sRGB unchecked) and Non-Power of 2 unchecked as well.""", + "samples": [] +} \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scenes/Scene Resources/CurrentWithSplinesDescription.json.meta b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scenes/Scene Resources/CurrentWithSplinesDescription.json.meta new file mode 100644 index 00000000000..3d676f733f0 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scenes/Scene Resources/CurrentWithSplinesDescription.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b3991fc1e1f3c794ba845394d5ad1811 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines.meta b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines.meta new file mode 100644 index 00000000000..28b58916988 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab48985a0ca07954c937165e2bf1a886 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplinePackageDefineAssembly.asmdef b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplinePackageDefineAssembly.asmdef new file mode 100644 index 00000000000..a0dae883499 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplinePackageDefineAssembly.asmdef @@ -0,0 +1,26 @@ +{ + "name": "NewAssembly", + "rootNamespace": "UnityEngine.Rendering", + "references": [ + "GUID:d8b63aba1907145bea998dd612889d6b", + "GUID:21d1eb854b91ade49bc69a263d12bee2", + "GUID:e43142fc3fec6554980dde6126631f1d", + "GUID:457756d89b35d2941b3e7b37b4ece6f1", + "GUID:78bd2ddd6e276394a9615c203e574844" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": false, + "defineConstraints": [], + "versionDefines": [ + { + "name": "com.unity.splines", + "expression": "2.7.2", + "define": "SPLINE_PACKAGE_INSTALLED" + } + ], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplinePackageDefineAssembly.asmdef.meta b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplinePackageDefineAssembly.asmdef.meta new file mode 100644 index 00000000000..0a4e6ac6d89 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplinePackageDefineAssembly.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7bf965b23a740b743b18891935f6fac1 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToFlowMap.compute b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToFlowMap.compute new file mode 100644 index 00000000000..2056b42f732 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToFlowMap.compute @@ -0,0 +1,283 @@ +#pragma kernel FillWithNeutral +#pragma kernel GenerateCurrent +#pragma kernel GenerateHeight +#pragma kernel MotionBlur + +RWTexture2D result; +RWTexture2D currentMap; +StructuredBuffer curvesData; + +float4 WaterSurfaceLocalScale; +float4 WaterSurfacePosition; +float4 resolution; +float splineWidth; +int curvesCount; +float splineBlendWidth; +float stepsPerCurve; +float blurSize; +float4 neutralColor; + +float3 centerBounds; +float3 extentsBounds; +float3 maxBounds; +float3 minBounds; +float3 sizeBounds; +float2 minMaxHeight; + +struct HLSLCurve +{ + float3 P0, P1, P2, P3; +}; + +struct Bounds +{ + float3 center, extents, max, min, size; +}; + +float Map(float s, float a1, float a2, float b1, float b2) +{ + return b1 + (s - a1) * (b2 - b1) / (a2 - a1); +} + +float InverseLerp(float A, float B, float T) +{ + return (T - A) / (B - A); +} + +Bounds GetBounds(float3 center, float3 extents, float3 max, float3 min, float3 size) +{ + Bounds b; + b.center = center; + b.extents = extents; + b.max = max; + b.min = min; + b.size = size; + return b; +} + +HLSLCurve GetCurve(int index) +{ + HLSLCurve curve; + curve.P0 = curvesData[index * 4 + 0].xyz; + curve.P1 = curvesData[index * 4 + 1].xyz; + curve.P2 = curvesData[index * 4 + 2].xyz; + curve.P3 = curvesData[index * 4 + 3].xyz; + return curve; +} + +float3 EvaluatePosition(HLSLCurve curve, float t) +{ + t = saturate(t); + float t2 = t * t; + float t3 = t2 * t; + float3 position = + curve.P0 * (-1 * t3 + 3 * t2 - 3 * t + 1) + + curve.P1 * (3 * t3 - 6 * t2 + 3 * t) + + curve.P2 * (-3 * t3 + 3 * t2) + + curve.P3 * (t3); + + return position; +} + +float3 EvaluateTangent(HLSLCurve curve, float t) +{ + t = saturate(t); + float t2 = t * t; + + float3 tangent = + curve.P0 * (-3 * t2 + 6 * t - 3) + + curve.P1 * (9 * t2 - 12 * t + 3) + + curve.P2 * (-9 * t2 + 6 * t) + + curve.P3 * (3 * t2); + + return tangent; +} + +float Evaluate(in float3 position, in float stepsPerCurve, out float3 splinePosition, out float3 splineTangent) +{ + splinePosition = 0; + splineTangent = 0; + int curveIndex = 0; + float positionAlongCurve = 0; + + float3 bestSplinePosition = 0; + int bestCurveIndex = 0; + float bestPositionAlongCurve = 0; + + float sqrDistance = 1e20; + float bestSqrDistance = sqrDistance; + + float i_incr = 1.0 / stepsPerCurve; + + HLSLCurve curve; + + for (int c = 0; c < curvesCount; c++) + { + curve = GetCurve(c); + positionAlongCurve = 0; + for (int i = 0; i < stepsPerCurve; i++) + { + splinePosition = EvaluatePosition(curve, positionAlongCurve); + sqrDistance = pow((splinePosition.x - position.x), 2) + pow((splinePosition.z - position.z), 2); + + if (sqrDistance < bestSqrDistance) + { + bestSqrDistance = sqrDistance; + + bestSplinePosition = splinePosition; + bestCurveIndex = c; + bestPositionAlongCurve = positionAlongCurve; + } + + positionAlongCurve += i_incr; + } + } + + splinePosition = bestSplinePosition; + curveIndex = bestCurveIndex; + positionAlongCurve = bestPositionAlongCurve; + splineTangent = EvaluateTangent(GetCurve(curveIndex), positionAlongCurve); + + return sqrt(bestSqrDistance); +} + +[numthreads(8, 8, 1)] +void FillWithNeutral(uint3 id : SV_DispatchThreadID) +{ + result[id.xy] = neutralColor; +} + +[numthreads(8, 8, 1)] +void GenerateHeight(uint3 id : SV_DispatchThreadID) +{ + Bounds b = GetBounds(centerBounds, extentsBounds, maxBounds, minBounds, sizeBounds); + float amplitude = b.size.y; + float ratioMaxMin = saturate(abs(b.max.y) / abs(b.min.y)); + float ratioMinMax = saturate(abs(b.min.y) / abs(b.max.y)); + + float maxAmplitude = max(abs(b.min.y), abs(b.max.y)); + + float2 chunk = float2(1.0 / resolution.x, 1.0 / resolution.y); + + int i = id.x; + int j = id.y; + float2 uv = float2(i, j); + + // We put ourselves in the middle of the pixel + float2 pixel = float2(i + 0.5, j + 0.5); // [0.5, resolution + 0.5] + float2 normalizedPixelPosition = pixel * chunk; // [0,1] + + float2 waterSurface2DScale = float2(WaterSurfaceLocalScale.x, WaterSurfaceLocalScale.z); + float2 currentPixelOffset = normalizedPixelPosition * waterSurface2DScale; // [0, waterSurfaceScale] + + float2 waterSurfacePosition2DWS = float2(WaterSurfacePosition.x, WaterSurfacePosition.z) - waterSurface2DScale / 2; + float2 currentPixelPosition2DWS = waterSurfacePosition2DWS + currentPixelOffset; + + // We assume we are around the vertical 0 position, but we could use the mean height of the spline. + float3 currentPosition = float3(currentPixelPosition2DWS.x, 0, currentPixelPosition2DWS.y); + + float3 pos = float3(0, 0, 0); + float3 tan = float3(0, 0, 0); + float distance = Evaluate(currentPosition, stepsPerCurve, pos, tan); + + float yNormalized = Map(pos.y, b.min.y, b.max.y, minMaxHeight.x, minMaxHeight.y); + float4 c = yNormalized.xxxx; + + if (distance < splineWidth) + { + result[uv.xy] = c; + } + else if (distance < (splineBlendWidth + splineWidth)) + { + float lerpFactor = saturate(InverseLerp(splineWidth, (splineBlendWidth + splineWidth), distance)); + float4 baseColor = result[uv.xy]; + result[uv.xy] = lerp(c, baseColor, lerpFactor); + } + else + { + // Do nothing since we are outside the influence of the spline here + } +} + +[numthreads(8,8,1)] +void GenerateCurrent(uint3 id : SV_DispatchThreadID) +{ + float2 chunk = float2(1.0 / resolution.x, 1.0 / resolution.y); + + int i = id.x; + int j = id.y; + float2 uv = float2(i, j); + + // We put ourselves in the middle of the pixel + float2 pixel = float2(i + 0.5, j + 0.5); // [0.5, resolution + 0.5] + float2 normalizedPixelPosition = pixel * chunk; // [0,1] + + float2 waterSurface2DScale = float2(WaterSurfaceLocalScale.x, WaterSurfaceLocalScale.z); + float2 currentPixelOffset = normalizedPixelPosition * waterSurface2DScale; // [0, waterSurfaceScale] + + float2 waterSurfacePosition2DWS = float2(WaterSurfacePosition.x, WaterSurfacePosition.z) - waterSurface2DScale / 2; + float2 currentPixelPosition2DWS = waterSurfacePosition2DWS + currentPixelOffset; + + // We assume we are around the vertical 0 position, but we could use the mean height of the spline. + float3 currentPosition = float3(currentPixelPosition2DWS.x, 0, currentPixelPosition2DWS.y); + + float3 pos = float3(0, 0, 0); + float3 tan = float3(0, 0, 0); + float distance = Evaluate(currentPosition, stepsPerCurve, pos, tan); + + float3 tanNormalized = normalize(tan); + + float4 c = float4((tanNormalized.x / 2) + 0.5, (tanNormalized.z / 2) + 0.5, 1, 1); + if (distance < splineWidth) + { + result[uv.xy] = float4(c.x, c.y, c.z, 1); + } + else if (distance < (splineBlendWidth + splineWidth)) + { + float lerpFactor = saturate(InverseLerp(splineWidth, (splineBlendWidth + splineWidth), distance)); + float4 baseColor = result[uv.xy]; + result[uv.xy] = lerp(c, baseColor, lerpFactor); + } + else + { + // Do nothing since we are outside the influence of the spline here + } + +} + +[numthreads(8, 8, 1)] +void MotionBlur(uint3 id : SV_DispatchThreadID) +{ + float2 defaultDirection = float2(1, 0); + int x = id.x; + int y = id.y; + + float current = x / (resolution.x); + float4 direction = currentMap[float2(x, y)]; + float2 blurDirection = float2(2 * (direction.r - 0.5), 2 * (direction.g - 0.5)); + + float4 blurredColor = float4(0, 0, 0, 0); + float totalWeight = 0; + + // Apply the blur in the specified direction + for (int i = -blurSize; i <= blurSize; i++) + { + float2 offset = normalize(blurDirection) * i; + int sampleX = clamp(x + offset.x, 0, resolution.x - 1); + int sampleY = clamp(y + offset.y, 0, resolution.y - 1); + + float weight = exp(-i * i / (2 * blurSize * blurSize)); // Gaussian distribution + blurredColor += result[float2(sampleX, sampleY)] * weight; + totalWeight += weight; + } + + // Normalize the blurred color + blurredColor /= totalWeight; + blurredColor.a = direction.a; + + // Set the blurred pixel in the result texture + // We don't blur if we are outside the curve + if (direction.a > 0) + result[float2(x, y)] = blurredColor; + +} diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToFlowMap.compute.meta b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToFlowMap.compute.meta new file mode 100644 index 00000000000..c02e9e51019 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToFlowMap.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 39dcf63f954a6ce41bdb928155be5e94 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTexture.cs b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTexture.cs new file mode 100644 index 00000000000..03108aa8971 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTexture.cs @@ -0,0 +1,446 @@ +using System.IO; +using Unity.Mathematics; +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering.HighDefinition; +using UnityEditor.PackageManager.Requests; +using UnityEditor.PackageManager; +#if SPLINE_PACKAGE_INSTALLED + using UnityEditor.Splines; + using UnityEngine.Splines; +#endif + +[ExecuteInEditMode] +public class SplineToTexture : MonoBehaviour +{ +#if SPLINE_PACKAGE_INSTALLED + public SplineContainer splineContainer; +#endif + public ComputeShader computeShader; + public WaterSurface waterSurface; + public Material waterDecalMaterial; + public float splineWidth = 20; + public float splineBlendWidth = 5; + public int searchStepsPerCurve = 8; + public Vector2Int resolution = new Vector2Int(256,256); + public int currentMapBlurSize = 8; + public int heightMapBlurSize = 8; + public Vector2 heightMapMinMax = new Vector2(0, 1); + + public RenderTexture currentMap = null; + public RenderTexture heightMap = null; + + private int currentHandle = -1; + private int heightHandle = -1; + private int blurHandle = -1; + private int fillWithNeutralHandle = -1; + + private bool isInitialized = false; +#if SPLINE_PACKAGE_INSTALLED + private Bounds highestBounds = new Bounds(); +#endif + + private int curvesCount = 0; + ComputeBuffer buffer; + float4[] array; + + void OnEnable() + { + Init(); + } + + void HookCallbacks() + { +#if SPLINE_PACKAGE_INSTALLED + if (splineContainer != null) + foreach (Spline spline in splineContainer.Splines) + EditorSplineUtility.AfterSplineWasModified += OnAfterSplineWasModified; +#endif + } + + void UnhookCallbacks() + { +#if SPLINE_PACKAGE_INSTALLED + if (splineContainer != null) + foreach (Spline spline in splineContainer.Splines) + EditorSplineUtility.AfterSplineWasModified -= OnAfterSplineWasModified; +#endif + } + + void OnDisable() + { + isInitialized = false; + UnhookCallbacks(); + } + +#if SPLINE_PACKAGE_INSTALLED + private void OnAfterSplineWasModified(Spline spline) + { + Refresh(); + } +#endif + + void Init() + { +#if SPLINE_PACKAGE_INSTALLED + if (splineContainer == null) + splineContainer = this.GetComponent(); +#endif + + HookCallbacks(); + InitRenderTexture(); + InitComputeBuffer(GetCurveCount()); + + isInitialized = true; + + Refresh(); + } + + private int GetCurveCount() + { + // This is to avoid creating a zero length compute buffer when there's no spline package installed. + int c = 1; +#if SPLINE_PACKAGE_INSTALLED + for (int i = 0; i < splineContainer.Splines.Count; i++) + c += splineContainer[i].GetCurveCount(); +#endif + return c; + } + + + + private void InitComputeBuffer(int count) + { + // *16 because there's 4 vector4 per curve. + buffer = new ComputeBuffer(count, sizeof(float) * 16); + + // *4 because there's 4 float4 to define a curve; + array = new float4[count * 4]; + } + + private void InitRenderTexture(bool current = true, bool height = true) + { + if (current) + { + if (currentMap != null) + currentMap.Release(); + + currentMap = new RenderTexture(resolution.x, resolution.y, 16, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear); + currentMap.enableRandomWrite = true; + currentMap.Create(); + } + + + if (height) + { + if (heightMap != null) + heightMap.Release(); + + heightMap = new RenderTexture(resolution.x, resolution.y, 16, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear); + heightMap.enableRandomWrite = true; + heightMap.Create(); + } + + } + + void Refresh() + { + if(!isInitialized) return; + + if (currentMap != null) + { + if (currentMap.width != resolution.x || currentMap.height != resolution.y) + InitRenderTexture(true, false); + } + + if (heightMap != null) + { + if (heightMap.width != resolution.x || heightMap.height != resolution.y) + InitRenderTexture(false, true); + } + + UpdateSpline(); + RunCompute(); + } + + void Update() + { + waterDecalMaterial?.SetTexture("_CurrentMap", currentMap); + waterDecalMaterial?.SetTexture("_Deformation_Texture", heightMap); + + // Uncomment this to update everyframe + Refresh(); + } + + private void UpdateSpline() + { + int count = GetCurveCount(); + if (count != curvesCount) + { + curvesCount = count; + InitComputeBuffer(curvesCount); + } +#if SPLINE_PACKAGE_INSTALLED + int currentIndex = 0; + // For each spline + for (int i = 0; i < splineContainer.Splines.Count; i++) + { + var spline = splineContainer[i]; + int currentCurveCount = spline.GetCurveCount(); + for (int j = 0; j < currentCurveCount; j++) + { + var curve = spline.GetCurve(j); + + array[currentIndex + 0] = (Vector4)(Vector3)curve.P0; + array[currentIndex + 1] = (Vector4)(Vector3)curve.P1; + array[currentIndex + 2] = (Vector4)(Vector3)curve.P2; + array[currentIndex + 3] = (Vector4)(Vector3)curve.P3; + currentIndex += 4; + } + if(buffer == null) + Debug.Log("buffer is null"); + if(array == null) + Debug.Log("array is null"); + + buffer.SetData(array); + } + + // This is for heightMap only + float amplitudeOfTheSteepestSpline = 0; + highestBounds = new Bounds(); + foreach (Spline spline in splineContainer.Splines) + { + Bounds b = spline.GetBounds(); + + float amplitude = b.max.y - b.min.y; + if (amplitude > amplitudeOfTheSteepestSpline) + { + amplitudeOfTheSteepestSpline = amplitude; + highestBounds = b; + } + } +#endif + } + + public void RunCompute() + { + + if (computeShader != null) + { + if(fillWithNeutralHandle < 0) + fillWithNeutralHandle = computeShader.FindKernel("FillWithNeutral"); + if (currentHandle < 0) + currentHandle = computeShader.FindKernel("GenerateCurrent"); + if (heightHandle < 0) + heightHandle = computeShader.FindKernel("GenerateHeight"); + if (blurHandle < 0) + blurHandle = computeShader.FindKernel("MotionBlur"); + + if (currentMap == null || heightMap == null) + InitRenderTexture(); + + // Fill with neutral kernel + // First, a neutral color is set on each texture, #FF80FF for current map + computeShader.SetVector("neutralColor", new Vector4(1, 0.5f, 1, 0)); + computeShader.SetTexture(fillWithNeutralHandle, "result", currentMap); + computeShader.Dispatch(fillWithNeutralHandle, resolution.x / 8, resolution.y / 8, 1); + +#if SPLINE_PACKAGE_INSTALLED + // Generate Current kernel + // We need to pass all those information to this pass for the compute shader to be able to match the correct position and scale. + // Then, for each texture to generate, we iterate through each pixel to find the closest matching point on any of the splines. + // By evaluating the position and tangent of the closest point, we can calculate a color for the current pixel. + + computeShader.SetVector("WaterSurfaceLocalScale", waterSurface != null ? waterSurface.transform.localScale : Vector3.one); + computeShader.SetVector("WaterSurfacePosition", waterSurface != null ? waterSurface.transform.position : Vector3.zero); + computeShader.SetVector("resolution", new Vector4(resolution.x, resolution.y, 0, 0)); + computeShader.SetFloat("curvesCount", curvesCount); + computeShader.SetFloat("splineWidth", splineWidth); + computeShader.SetFloat("splineBlendWidth", splineBlendWidth); + computeShader.SetFloat("stepsPerCurve", searchStepsPerCurve); + computeShader.SetBuffer(currentHandle, "curvesData", buffer); + computeShader.SetTexture(currentHandle, "result", currentMap); + computeShader.Dispatch(currentHandle, resolution.x / 8, resolution.y / 8, 1); + + + // Directional Blur kernel + // Lastly, to avoid blocky artifacts, a blur pass is done in the direction of the current to smooth out the result. + if (currentMapBlurSize > 0) + { + computeShader.SetFloat("blurSize", currentMapBlurSize); + computeShader.SetTexture(blurHandle, "currentMap", currentMap); + computeShader.SetTexture(blurHandle, "result", currentMap); + computeShader.Dispatch(blurHandle, resolution.x / 8, resolution.y / 8, 1); + } +#endif + // Fill with neutral kernel + // First, a neutral color is set on each texture, #808080 for height map map + computeShader.SetVector("neutralColor", new Vector4(0.5f, 0.5f, 0.5f, 0.5f)); + computeShader.SetTexture(fillWithNeutralHandle, "result", heightMap); + computeShader.Dispatch(fillWithNeutralHandle, resolution.x / 8, resolution.y / 8, 1); + +#if SPLINE_PACKAGE_INSTALLED + // Generate height kernel + // We need to pass all those information to this pass for the compute shader to be able to match the correct position and scale. + // Then, for each texture to generate, we iterate through each pixel to find the closest matching point on any of the splines. + // By evaluating the position and tangent of the closest point, we can calculate a color for the current pixel. + + computeShader.SetVector("centerBounds", highestBounds.center); + computeShader.SetVector("extentsBounds", highestBounds.extents); + computeShader.SetVector("maxBounds", highestBounds.max); + computeShader.SetVector("minBounds", highestBounds.min); + computeShader.SetVector("sizeBounds", highestBounds.size); + computeShader.SetVector("minMaxHeight", heightMapMinMax); + computeShader.SetBuffer(heightHandle, "curvesData", buffer); + computeShader.SetTexture(heightHandle, "result", heightMap); + computeShader.Dispatch(heightHandle, resolution.x / 8, resolution.y / 8, 1); + + // Directional Blur kernel + // Lastly, to avoid blocky artifacts, a blur pass is done in the direction of the current to smooth out the result. + // In this example, the deformation map is not blurred because it specifically needs a steep dropoff at the waterfall. + if (heightMapBlurSize > 0) + { + computeShader.SetFloat("blurSize", heightMapBlurSize); + computeShader.SetTexture(blurHandle, "currentMap", currentMap); + computeShader.SetTexture(blurHandle, "result", heightMap); + computeShader.Dispatch(blurHandle, resolution.x / 8, resolution.y / 8, 1); + } +#endif + } + } + public void OpenDialogAndSaveCurrentMap() + { + var path = EditorUtility.SaveFilePanel("Save current map", "","currentMap","png"); + if (path.Length != 0) + SaveTextureOnDisk(currentMap, path); + } + + public void OpenDialogAndSaveHeightMap() + { + var path = EditorUtility.SaveFilePanel("Save height map", "", "heightMap", "png"); + if (path.Length != 0) + SaveTextureOnDisk(heightMap, path); + } + + public static void SaveTextureOnDisk(RenderTexture renderTexture, string path) + { + Texture2D tex = ToTexture2D(renderTexture); + var bytesHeight = tex.EncodeToPNG(); + File.WriteAllBytes(path, bytesHeight); + AssetDatabase.Refresh(); + } + + public static Texture2D ToTexture2D(RenderTexture rTex) + { + Texture2D tex = new Texture2D(rTex.width, rTex.height, TextureFormat.ARGB32, false, true); + // ReadPixels looks at the active RenderTexture. + RenderTexture.active = rTex; + tex.ReadPixels(new Rect(0, 0, rTex.width, rTex.height), 0, 0); + tex.Apply(); + return tex; + } + + // This move the spline knots so that the spline gameobject is at the origin with a scale of 1 to simplify the calculations. + public void ApplyScaleAndPosition() + { +#if SPLINE_PACKAGE_INSTALLED + foreach (Spline spline in splineContainer.Splines) + { + + BezierKnot[] array = spline.ToArray(); + + // Apply Scale + for (int i = 0; i < array.Length; i++) + { + array[i].Position *= this.transform.localScale; + array[i].TangentIn *= this.transform.localScale; + array[i].TangentOut *= this.transform.localScale; + } + + // Apply position + for (int i = 0; i < array.Length; i++) + { + array[i].Position += new float3(this.transform.position.x, this.transform.position.y, this.transform.position.z); + } + + spline.Clear(); + for (int i = 0; i < array.Length; i++) + spline.Add(array[i]); + + } + + this.transform.position = Vector3.zero; + this.transform.localScale = Vector3.one; +#endif + } + + void OnValidate() + { + if (splineWidth < 0) + splineWidth = 0; + + if (splineBlendWidth < 0) + splineBlendWidth = 0; + + if (searchStepsPerCurve < 0) + searchStepsPerCurve = 0; + + if (resolution.x < 0) + resolution.x = 0; + + if (resolution.y < 0) + resolution.y = 0; + + if (currentMapBlurSize < 0) + currentMapBlurSize = 0; + + if (heightMapBlurSize < 0) + heightMapBlurSize = 0; + + if (heightMapBlurSize < 0) + heightMapBlurSize = 0; + + heightMapMinMax.x = Mathf.Clamp01(heightMapMinMax.x); + heightMapMinMax.y = Mathf.Clamp01(heightMapMinMax.y); + + if (currentMap != null) + { + if (currentMap.width != resolution.x || currentMap.height != resolution.y) + InitRenderTexture(true, false); + } + + if (heightMap != null) + { + if (heightMap.width != resolution.x || heightMap.height != resolution.y) + InitRenderTexture(false, true); + } + + if (isInitialized) + Refresh(); + } + + // This is to ensure the script is called every update in Edit Mode. + void OnDrawGizmos() + { + +#if UNITY_EDITOR + // Ensure continuous Update calls. + if (!Application.isPlaying) + { + UnityEditor.EditorApplication.QueuePlayerLoopUpdate(); + UnityEditor.SceneView.RepaintAll(); + } +#endif + } + + void OnDestroy() + { + currentMap?.Release(); + heightMap?.Release(); + buffer?.Dispose(); + + UnhookCallbacks(); + } +} + + diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTexture.cs.meta b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTexture.cs.meta new file mode 100644 index 00000000000..fd6774dbe65 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTexture.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: d32de00c844000b4ca559a5d0c18888d \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTextureEditor.cs b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTextureEditor.cs new file mode 100644 index 00000000000..08fef838207 --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTextureEditor.cs @@ -0,0 +1,91 @@ +#if UNITY_EDITOR +using static UnityEngine.GraphicsBuffer; +using UnityEditor.PackageManager.Requests; +using UnityEditor.PackageManager; +using UnityEditor; +using UnityEngine; + +[CustomEditor(typeof(SplineToTexture))] +public class SplineToTextureEditor : Editor +{ + private const string splinePackageName = "com.unity.splines"; + private static ListRequest listRequest; + private static AddRequest addRequest; + + public override void OnInspectorGUI() + { + base.DrawDefaultInspector(); + + var baker = (target as SplineToTexture); + + if (GUILayout.Button("Check and Install Spline Package")) + CheckAndInstallSplinePackage(); + + if (GUILayout.Button("Save Current Map On Disk")) + baker.OpenDialogAndSaveCurrentMap(); + + if (GUILayout.Button("Save Height Map On Disk")) + baker.OpenDialogAndSaveHeightMap(); + + if (GUILayout.Button("Apply Transform")) + baker.ApplyScaleAndPosition(); + + } + + private static void CheckAndInstallSplinePackage() + { + listRequest = Client.List(true); // Fetches the list of all packages + EditorApplication.update += OnListRequestProgress; + } + + private static void OnListRequestProgress() + { + if (listRequest.IsCompleted) + { + EditorApplication.update -= OnListRequestProgress; + + if (listRequest.Status == StatusCode.Success) + { + bool isSplineInstalled = false; + foreach (var package in listRequest.Result) + { + if (package.name == splinePackageName) + { + isSplineInstalled = true; + Debug.Log($"Spline package is already installed (version: {package.version})."); + break; + } + } + + if (!isSplineInstalled) + { + Debug.Log("Spline package is not installed. Installing..."); + addRequest = Client.Add(splinePackageName); + EditorApplication.update += OnAddRequestProgress; + } + } + else if (listRequest.Status >= StatusCode.Failure) + { + Debug.LogError($"Failed to list packages: {listRequest.Error.message}"); + } + } + } + + private static void OnAddRequestProgress() + { + if (addRequest.IsCompleted) + { + EditorApplication.update -= OnAddRequestProgress; + + if (addRequest.Status == StatusCode.Success) + { + Debug.Log($"Successfully installed {addRequest.Result.displayName} (version: {addRequest.Result.version})."); + } + else if (addRequest.Status >= StatusCode.Failure) + { + Debug.LogError($"Failed to install package: {addRequest.Error.message}"); + } + } + } +} +#endif \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTextureEditor.cs.meta b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTextureEditor.cs.meta new file mode 100644 index 00000000000..f234d7f28fa --- /dev/null +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/CurrentWithSplines/SplineToTextureEditor.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 100d6c014f01ef94786b04fca9a276bb \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/PlayerMovement.cs b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/PlayerMovement.cs index 17b41aacb97..ea0c9a597ef 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/PlayerMovement.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/PlayerMovement.cs @@ -1,15 +1,11 @@ -#if (ENABLE_INPUT_SYSTEM && INPUT_SYSTEM_INSTALLED) -#define USE_INPUT_SYSTEM -#endif - -#if USE_INPUT_SYSTEM -using UnityEngine.InputSystem; -#endif - using System.Collections; using System.Collections.Generic; using UnityEngine; +#if ENABLE_INPUT_SYSTEM +using UnityEngine.InputSystem; +#endif + public class PlayerMovement : MonoBehaviour { public CharacterController controller; @@ -31,7 +27,7 @@ public class PlayerMovement : MonoBehaviour Vector3 velocity; bool isGrounded; -#if USE_INPUT_SYSTEM +#if ENABLE_INPUT_SYSTEM InputAction movement; InputAction jump; @@ -64,7 +60,7 @@ void Update() float z; bool jumpPressed = false; -#if USE_INPUT_SYSTEM +#if ENABLE_INPUT_SYSTEM var delta = movement.ReadValue(); x = -delta.x; z = -delta.y; diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/SpawnRandomBeachBall.cs b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/SpawnRandomBeachBall.cs index 75ecea89dec..83b1d6c397d 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/SpawnRandomBeachBall.cs +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Scripts/SpawnRandomBeachBall.cs @@ -1,6 +1,9 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +#if ENABLE_INPUT_SYSTEM +using UnityEngine.InputSystem; +#endif using UnityEngine.Rendering.HighDefinition; public class SpawnRandomBeachBall : MonoBehaviour @@ -15,8 +18,15 @@ public class SpawnRandomBeachBall : MonoBehaviour // Update is called once per frame void Update() { - - if(Input.GetKeyDown(KeyCode.Space)) + bool spacePressed = false; +#if ENABLE_INPUT_SYSTEM + spacePressed = Keyboard.current[Key.Space].isPressed; +#else + spacePressed = Input.GetKeyDown(KeyCode.Space); +#endif + + + if (spacePressed) { if ((Time.realtimeSinceStartup - lastBeachBallSpawnedTime) >= TimeBtwnEachBall) { diff --git a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Settings/River Volume Profile.asset b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Settings/River Volume Profile.asset index d75ad0e09b9..b9c1aa2e1d7 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Settings/River Volume Profile.asset +++ b/Packages/com.unity.render-pipelines.high-definition/Samples~/WaterSamples/Settings/River Volume Profile.asset @@ -1028,7 +1028,7 @@ MonoBehaviour: m_Value: 0 depthBufferThickness: m_OverrideState: 1 - m_Value: 0.05 + m_Value: 0.01 screenFadeDistance: m_OverrideState: 0 m_Value: 0.25 diff --git a/Packages/com.unity.render-pipelines.high-definition/package.json b/Packages/com.unity.render-pipelines.high-definition/package.json index c04ee9d714c..f9c1c271451 100644 --- a/Packages/com.unity.render-pipelines.high-definition/package.json +++ b/Packages/com.unity.render-pipelines.high-definition/package.json @@ -83,7 +83,7 @@ }, { "displayName": "Water Samples", - "description": "Add a set of examples using the Water System, showcasing various environements using all the features of the system.", + "description": "Add a set of examples using the Water System, showcasing various environments using all the features of the system.", "path": "Samples~/WaterSamples", "dependencies": [ "com.unity.render-pipelines.high-definition/Samples~/Common", diff --git a/Packages/com.unity.render-pipelines.universal-config/Documentation~/index.md b/Packages/com.unity.render-pipelines.universal-config/Documentation~/index.md index 0210e7df3e2..d0d572ceb49 100644 --- a/Packages/com.unity.render-pipelines.universal-config/Documentation~/index.md +++ b/Packages/com.unity.render-pipelines.universal-config/Documentation~/index.md @@ -2,5 +2,5 @@ The Universal Render Pipeline (URP) uses this package to control the settings of some of its features. If you want to use this package to configure URP, you must link it as a local package. -* For information on how to set up and use the URP Config package, see [URP Config](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html?subfolder=/manual/URP-Config-Package.html). -* For documentation on URP itself, see [URP documentation](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html). +* For information on how to set up and use the URP Config package, see [URP Config](https://docs.unity3d.com/Manual/urp/URP-Config-Package.html). +* For documentation on URP itself, see [URP documentation](https://docs.unity3d.com/Manual/urp/urp-introduction.html). diff --git a/Packages/com.unity.render-pipelines.universal/.buginfo b/Packages/com.unity.render-pipelines.universal/.buginfo index b5c92da4460..fbfaf8ddc5a 100644 --- a/Packages/com.unity.render-pipelines.universal/.buginfo +++ b/Packages/com.unity.render-pipelines.universal/.buginfo @@ -1,15 +1,20 @@ old: - area: Universal RP + area: SRP Foundation -Workflow: +settings: when: path: - ^.*Volume?.*$ - ^.*GlobalSettings?.*$ - ^.*AdditionalLight?.*$ - - ^.*Camera?.*$ - ^.*ContextualMenuDispatcher?.*$ - area: SRP Workflow + area: SRP Settings + +camera: + when: + path: + - ^.*Camera?.*$ + area: Camera Tools: when: diff --git a/Packages/com.unity.render-pipelines.universal/Documentation~/index.md b/Packages/com.unity.render-pipelines.universal/Documentation~/index.md index 560b37449bb..277835b0898 100644 --- a/Packages/com.unity.render-pipelines.universal/Documentation~/index.md +++ b/Packages/com.unity.render-pipelines.universal/Documentation~/index.md @@ -3,6 +3,6 @@ uid: urp-index --- # Universal Render Pipeline (URP) scripting reference -The [scripting API](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/api/index.html) documentation is available on this website. +The [scripting API](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html?subfolder=/api/index.html) documentation is available on this website. -The user guide for URP in Unity 6 is in the [Unity Manual](https://docs.unity3d.com/6000.0/Documentation/Manual/urp/urp-introduction.html). +The user guide for URP in Unity 6 is in the [Unity Manual](https://docs.unity3d.com/6000.2/Documentation/Manual/urp/urp-introduction.html). diff --git a/Packages/com.unity.render-pipelines.universal/Editor/2D/Light2DEditor.cs b/Packages/com.unity.render-pipelines.universal/Editor/2D/Light2DEditor.cs index ce5455b587e..3ffcd626687 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/2D/Light2DEditor.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/2D/Light2DEditor.cs @@ -49,12 +49,6 @@ protected override void SetShape(ScriptablePath shapeEditor, SerializedObject se } } - private struct ToggleFoldoutResult - { - public bool foldoutState; - public bool toggleState; - } - private static class Styles { public static readonly GUIContent InnerOuterSpotAngle = EditorGUIUtility.TrTextContent("Inner / Outer Spot Angle", "Adjusts the inner / outer angles of this light to change the angle ranges of this Spot Light’s beam."); @@ -191,10 +185,8 @@ private void AnalyticsTrackChanges(SerializedObject serializedObject) } } - private ToggleFoldoutResult DrawHeaderFoldoutWithToggle(GUIContent title, bool foldoutState, bool toggleState, string documentationURL = "") + private void DrawHeaderFoldoutWithToggle(GUIContent title, SavedBool foldoutState, SerializedProperty toggleState, string documentationURL = "") { - ToggleFoldoutResult foldoutResult = new ToggleFoldoutResult(); - const float height = 17f; var backgroundRect = GUILayoutUtility.GetRect(0, 0); float xMin = backgroundRect.xMin; @@ -204,13 +196,18 @@ private ToggleFoldoutResult DrawHeaderFoldoutWithToggle(GUIContent title, bool f labelRect.xMin += 16f; labelRect.xMax -= 20f; - foldoutResult.toggleState = GUI.Toggle(labelRect, toggleState, " "); // Needs a space because the checkbox won't have a proper outline if we don't make a space here - foldoutResult.foldoutState = CoreEditorUtils.DrawHeaderFoldout("", foldoutState); - labelRect.xMin += 20; - EditorGUI.LabelField(labelRect, title, EditorStyles.boldLabel); + bool newToggleState = GUI.Toggle(labelRect, toggleState.boolValue, " "); // Needs a space because the checkbox won't have a proper outline if we don't make a space here + bool newFoldoutState = CoreEditorUtils.DrawHeaderFoldout("", foldoutState.value); + + if (newToggleState != toggleState.boolValue) + toggleState.boolValue = newToggleState; + if (newFoldoutState != foldoutState.value) + foldoutState.value = newFoldoutState; - return foldoutResult; + + labelRect.xMin += 20; + EditorGUI.LabelField(labelRect, title, EditorStyles.boldLabel); } void OnEnable() @@ -317,7 +314,10 @@ void OnDestroy() void DrawBlendingGroup() { CoreEditorUtils.DrawSplitter(false); - m_BlendingSettingsFoldout.value = CoreEditorUtils.DrawHeaderFoldout(Styles.blendingSettingsFoldout, m_BlendingSettingsFoldout.value); + bool foldoutState = CoreEditorUtils.DrawHeaderFoldout(Styles.blendingSettingsFoldout, m_BlendingSettingsFoldout.value); + if (foldoutState != m_BlendingSettingsFoldout.value) + m_BlendingSettingsFoldout.value = foldoutState; + if (m_BlendingSettingsFoldout.value) { if (!m_AnyBlendStyleEnabled) @@ -334,9 +334,7 @@ void DrawShadowsGroup() { CoreEditorUtils.DrawSplitter(false); - ToggleFoldoutResult result = DrawHeaderFoldoutWithToggle(Styles.shadowsSettingsFoldout, m_ShadowsSettingsFoldout.value, m_ShadowsEnabled.boolValue); - m_ShadowsEnabled.boolValue = result.toggleState; - m_ShadowsSettingsFoldout.value = result.foldoutState; + DrawHeaderFoldoutWithToggle(Styles.shadowsSettingsFoldout, m_ShadowsSettingsFoldout, m_ShadowsEnabled); if (m_ShadowsSettingsFoldout.value) { @@ -354,9 +352,8 @@ void DrawVolumetricGroup() { CoreEditorUtils.DrawSplitter(false); - ToggleFoldoutResult result = DrawHeaderFoldoutWithToggle(Styles.volumetricSettingsFoldout, m_VolumetricSettingsFoldout.value, m_VolumetricEnabled.boolValue); - m_VolumetricSettingsFoldout.value = result.foldoutState; - m_VolumetricEnabled.boolValue = result.toggleState; + DrawHeaderFoldoutWithToggle(Styles.volumetricSettingsFoldout, m_VolumetricSettingsFoldout, m_VolumetricEnabled); + if (m_VolumetricSettingsFoldout.value) { EditorGUI.indentLevel++; @@ -375,7 +372,10 @@ void DrawVolumetricGroup() void DrawNormalMapGroup() { CoreEditorUtils.DrawSplitter(false); - m_NormalMapsSettingsFoldout.value = CoreEditorUtils.DrawHeaderFoldout(Styles.normalMapsSettingsFoldout, m_NormalMapsSettingsFoldout.value); + bool foldoutState = CoreEditorUtils.DrawHeaderFoldout(Styles.normalMapsSettingsFoldout, m_NormalMapsSettingsFoldout.value); + if (foldoutState != m_NormalMapsSettingsFoldout.value) + m_NormalMapsSettingsFoldout.value = foldoutState; + if (m_NormalMapsSettingsFoldout.value) { EditorGUILayout.PropertyField(m_NormalMapQuality, Styles.generalNormalMapLightQuality); diff --git a/Packages/com.unity.render-pipelines.universal/Editor/2D/ShaderGraph/Targets/UniversalSpriteCustomLitSubTarget.cs b/Packages/com.unity.render-pipelines.universal/Editor/2D/ShaderGraph/Targets/UniversalSpriteCustomLitSubTarget.cs index 9bc26816a6d..80800e8501d 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/2D/ShaderGraph/Targets/UniversalSpriteCustomLitSubTarget.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/2D/ShaderGraph/Targets/UniversalSpriteCustomLitSubTarget.cs @@ -294,6 +294,7 @@ static class SpriteLitIncludes public static IncludeCollection Lit = new IncludeCollection { // Pre-graph + { CoreIncludes.FogPregraph }, { CoreIncludes.CorePregraph }, { CoreIncludes.ShaderGraphPregraph }, { kSpriteCore2D, IncludeLocation.Pregraph }, @@ -319,6 +320,7 @@ static class SpriteLitIncludes public static IncludeCollection Forward = new IncludeCollection { // Pre-graph + { CoreIncludes.FogPregraph }, { CoreIncludes.CorePregraph }, { CoreIncludes.ShaderGraphPregraph }, { kSpriteCore2D, IncludeLocation.Pregraph }, diff --git a/Packages/com.unity.render-pipelines.universal/Editor/2D/ShaderGraph/Targets/UniversalSpriteLitSubTarget.cs b/Packages/com.unity.render-pipelines.universal/Editor/2D/ShaderGraph/Targets/UniversalSpriteLitSubTarget.cs index 299d52e2e0b..9a501535081 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/2D/ShaderGraph/Targets/UniversalSpriteLitSubTarget.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/2D/ShaderGraph/Targets/UniversalSpriteLitSubTarget.cs @@ -315,6 +315,7 @@ static class SpriteLitIncludes public static IncludeCollection Lit = new IncludeCollection { // Pre-graph + { CoreIncludes.FogPregraph }, { CoreIncludes.CorePregraph }, { CoreIncludes.ShaderGraphPregraph }, { k2DLightingUtil, IncludeLocation.Pregraph }, @@ -342,6 +343,7 @@ static class SpriteLitIncludes public static IncludeCollection Forward = new IncludeCollection { // Pre-graph + { CoreIncludes.FogPregraph }, { CoreIncludes.CorePregraph }, { CoreIncludes.ShaderGraphPregraph }, { kSpriteCore2D, IncludeLocation.Pregraph }, diff --git a/Packages/com.unity.render-pipelines.universal/Editor/2D/ShaderGraph/Targets/UniversalSpriteUnlitSubTarget.cs b/Packages/com.unity.render-pipelines.universal/Editor/2D/ShaderGraph/Targets/UniversalSpriteUnlitSubTarget.cs index 05db215272a..84a6dd96ab1 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/2D/ShaderGraph/Targets/UniversalSpriteUnlitSubTarget.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/2D/ShaderGraph/Targets/UniversalSpriteUnlitSubTarget.cs @@ -232,6 +232,7 @@ static class SpriteUnlitIncludes public static IncludeCollection Unlit = new IncludeCollection { // Pre-graph + { CoreIncludes.FogPregraph }, { CoreIncludes.CorePregraph }, { CoreIncludes.ShaderGraphPregraph }, { kSpriteCore2D, IncludeLocation.Pregraph }, diff --git a/Packages/com.unity.render-pipelines.universal/Editor/Analytics/PostProcessDataAnalytics.cs b/Packages/com.unity.render-pipelines.universal/Editor/Analytics/PostProcessDataAnalytics.cs index a6c16adff55..f22bee1af1a 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/Analytics/PostProcessDataAnalytics.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/Analytics/PostProcessDataAnalytics.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using UnityEditor.Build; using UnityEditor.Build.Reporting; -using UnityEngine; using UnityEngine.Analytics; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; @@ -15,6 +14,7 @@ class PostProcessDataAnalytics : IPostprocessBuildWithReport const int k_MaxEventsPerHour = 1000; const int k_MaxNumberOfElements = 1000; const string k_VendorKey = "unity.universal"; + const string k_EventName = "uURPPostProcessAsset"; // SCHEMA: com.unity3d.data.schemas.editor.analytics.uURPPostProcessAsset_v1 // TAXONOMY : editor.analytics.uURPPostProcessAsset.v1 @@ -81,6 +81,7 @@ static bool TryGatherPostProcessDataIncludedInBuild(List tmp) var guid = AssetDatabase.GUIDFromAssetPath(assetPath).ToString(); output.Add((field.Name, guid)); } + return output; } @@ -93,20 +94,19 @@ public static PropertyToGUIDs[] ExtractData(List postProcessDat private static Dictionary CreateDictionaryWithDefaults() { - var defaultPostProcessData = ScriptableObject.CreateInstance(); - ResourceReloader.ReloadAllNullIn(defaultPostProcessData, UniversalRenderPipelineAsset.packagePath); + var defaultShaderResources = GraphicsSettings.GetRenderPipelineSettings(); + var defaultTextureResources = GraphicsSettings.GetRenderPipelineSettings(); Dictionary output = new(); + void AddDefaultsToDictionary(Dictionary dictionary, List<(string property, string guid)> list) { foreach (var item in list) - dictionary.Add(item.property, - new PropertyToGUIDs() { propertyName = item.property, defaultGUID = item.guid }); + dictionary.Add(item.property, new PropertyToGUIDs { propertyName = item.property, defaultGUID = item.guid }); } - AddDefaultsToDictionary(output, GetPropertyGUIDs(defaultPostProcessData.shaders)); - AddDefaultsToDictionary(output, GetPropertyGUIDs(defaultPostProcessData.textures)); - ScriptableObject.DestroyImmediate(defaultPostProcessData); + AddDefaultsToDictionary(output, GetPropertyGUIDs(defaultShaderResources)); + AddDefaultsToDictionary(output, GetPropertyGUIDs(defaultTextureResources)); return output; } @@ -163,6 +163,7 @@ public static IAnalytic.DataList GatherDataToBeSent(PropertyToGUI usage = Usage.ModifiedForTheProject.ToString() }); } + break; default: tmp.Add(new AnalyticsData() @@ -172,6 +173,7 @@ public static IAnalytic.DataList GatherDataToBeSent(PropertyToGUI }); break; } + uniques.Clear(); } @@ -198,9 +200,10 @@ static void SendUniversalEvent() } public int callbackOrder { get; } + public void OnPostprocessBuild(BuildReport report) { SendUniversalEvent(); } } -} +} \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Editor/BuildProcessors/GraphicsSettingsStrippers/ScreenSpaceAmbientOcclusionStripper.cs b/Packages/com.unity.render-pipelines.universal/Editor/BuildProcessors/GraphicsSettingsStrippers/ScreenSpaceAmbientOcclusionStripper.cs new file mode 100644 index 00000000000..39382a64fa4 --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Editor/BuildProcessors/GraphicsSettingsStrippers/ScreenSpaceAmbientOcclusionStripper.cs @@ -0,0 +1,63 @@ +using UnityEditor.Rendering.Universal; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace UnityEditor.Rendering +{ + class ScreenSpaceAmbientOcclusionDynamicResourcesStripper : IRenderPipelineGraphicsSettingsStripper + { + public bool active => URPBuildData.instance.buildingPlayerForUniversalRenderPipeline; + + public bool CanRemoveSettings(ScreenSpaceAmbientOcclusionDynamicResources resources) + { + if (GraphicsSettings.TryGetRenderPipelineSettings(out var urpShaderStrippingSettings) && !urpShaderStrippingSettings.stripUnusedVariants) + return false; + + foreach (var urpAssetForBuild in URPBuildData.instance.renderPipelineAssets) + { + foreach (var rendererData in urpAssetForBuild.m_RendererDataList) + { + if (rendererData is not UniversalRendererData) + continue; + + foreach (var rendererFeature in rendererData.rendererFeatures) + { + if (rendererFeature is ScreenSpaceAmbientOcclusion { isActive: true } occlusion + && occlusion.settings.AOMethod == ScreenSpaceAmbientOcclusionSettings.AOMethodOptions.BlueNoise) + return false; + } + } + } + + return true; + } + } + + class ScreenSpaceAmbientOcclusionPersistentResourcesStripper : IRenderPipelineGraphicsSettingsStripper + { + public bool active => URPBuildData.instance.buildingPlayerForUniversalRenderPipeline; + + public bool CanRemoveSettings(ScreenSpaceAmbientOcclusionPersistentResources resources) + { + if (GraphicsSettings.TryGetRenderPipelineSettings(out var urpShaderStrippingSettings) && !urpShaderStrippingSettings.stripUnusedVariants) + return false; + + foreach (var urpAssetForBuild in URPBuildData.instance.renderPipelineAssets) + { + foreach (var rendererData in urpAssetForBuild.m_RendererDataList) + { + if (rendererData is not UniversalRendererData) + continue; + + foreach (var rendererFeature in rendererData.rendererFeatures) + { + if (rendererFeature is ScreenSpaceAmbientOcclusion { isActive: true }) + return false; + } + } + } + + return true; + } + } +} \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Editor/BuildProcessors/GraphicsSettingsStrippers/ScreenSpaceAmbientOcclusionStripper.cs.meta b/Packages/com.unity.render-pipelines.universal/Editor/BuildProcessors/GraphicsSettingsStrippers/ScreenSpaceAmbientOcclusionStripper.cs.meta new file mode 100644 index 00000000000..0017e52e48b --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Editor/BuildProcessors/GraphicsSettingsStrippers/ScreenSpaceAmbientOcclusionStripper.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d1195c569e7940f897cc1c8677d24104 +timeCreated: 1738841463 \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Editor/BuildProcessors/URPBuildDataValidator.cs b/Packages/com.unity.render-pipelines.universal/Editor/BuildProcessors/URPBuildDataValidator.cs index c5d0cf4a0cc..0e661c23705 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/BuildProcessors/URPBuildDataValidator.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/BuildProcessors/URPBuildDataValidator.cs @@ -22,6 +22,22 @@ private static void ValidateRenderPipelineAssetsAreAtLastVersion(List renderPipelineAssets) + { + bool supportsDynamicBatching = false; + foreach (var urpPipelineAsset in renderPipelineAssets) + { + if (urpPipelineAsset.supportsDynamicBatching) + { + supportsDynamicBatching = true; + break; + } + } + + PlayerSettings.SetDynamicBatchingForPlatform(EditorUserBuildSettings.activeBuildTarget, supportsDynamicBatching); + } + private static void ValidateRenderPipelineGlobalSettings(UniversalRenderPipelineGlobalSettings globalSettingsInstance, StringBuilder failures) { if (globalSettingsInstance == null) @@ -44,6 +60,7 @@ public static bool IsProjectValidForBuilding(BuildReport report, out string mess ValidateRenderPipelineAssetsAreAtLastVersion(URPBuildData.instance.renderPipelineAssets, failures); ValidateRenderPipelineGlobalSettings(UniversalRenderPipelineGlobalSettings.Ensure(), failures); + ValidateDynamicBatchingSettings(URPBuildData.instance.renderPipelineAssets); string allFailures = failures.ToString(); diff --git a/Packages/com.unity.render-pipelines.universal/Editor/Decal/DecalProjectorEditor.cs b/Packages/com.unity.render-pipelines.universal/Editor/Decal/DecalProjectorEditor.cs index cf7b308e277..29b3ee2ccb6 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/Decal/DecalProjectorEditor.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/Decal/DecalProjectorEditor.cs @@ -183,7 +183,7 @@ private void OnEnable() m_Offset.FindPropertyRelative("z"), }; m_FadeFactor = serializedObject.FindProperty("m_FadeFactor"); - m_RenderingLayerMask = serializedObject.FindProperty("m_DecalLayerMask"); + m_RenderingLayerMask = serializedObject.FindProperty("m_RenderingLayerMask"); ReinitSavedRatioSizePivotPosition(); } @@ -630,7 +630,7 @@ public override void OnInspectorGUI() MaterialFieldWithButton(m_MaterialProperty, k_MaterialContent); materialChanged = EditorGUI.EndChangeCheck(); - EditorUtils.DrawRenderingLayerMask(m_RenderingLayerMask, k_RenderingLayerMaskContent); + EditorGUILayout.PropertyField(m_RenderingLayerMask, k_RenderingLayerMaskContent); foreach (var target in targets) { diff --git a/Packages/com.unity.render-pipelines.universal/Editor/EditorUtils.cs b/Packages/com.unity.render-pipelines.universal/Editor/EditorUtils.cs index 7f4c99d463a..5155c10fb43 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/EditorUtils.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/EditorUtils.cs @@ -68,16 +68,5 @@ internal static void QualitySettingsHelpBox(string message, MessageType type, Un CoreEditorUtils.Highlight(currentPipeline.name, propertyPath, HighlightSearchMode.Identifier); }); } - - internal static void DrawRenderingLayerMask(SerializedProperty property, GUIContent style) - { - var renderingLayer = property.uintValue; - - EditorGUI.BeginChangeCheck(); - renderingLayer = EditorGUILayout.RenderingLayerMaskField(style, renderingLayer); - - if (EditorGUI.EndChangeCheck()) - property.uintValue = renderingLayer; - } } } diff --git a/Packages/com.unity.render-pipelines.universal/Editor/Lighting/UniversalRenderPipelineLightUI.Drawers.cs b/Packages/com.unity.render-pipelines.universal/Editor/Lighting/UniversalRenderPipelineLightUI.Drawers.cs index 09cf52fd686..7500ea52b6d 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/Lighting/UniversalRenderPipelineLightUI.Drawers.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/Lighting/UniversalRenderPipelineLightUI.Drawers.cs @@ -272,10 +272,7 @@ static void DrawRenderingContent(UniversalRenderPipelineSerializedLight serializ { EditorGUI.BeginChangeCheck(); GUI.enabled = UniversalRenderPipeline.asset.useRenderingLayers; - EditorUtils.DrawRenderingLayerMask( - serializedLight.renderingLayers, - UniversalRenderPipeline.asset.useRenderingLayers ? Styles.RenderingLayers : Styles.RenderingLayersDisabled - ); + EditorGUILayout.PropertyField(serializedLight.renderingLayers, UniversalRenderPipeline.asset.useRenderingLayers ? Styles.RenderingLayers : Styles.RenderingLayersDisabled); GUI.enabled = true; if (EditorGUI.EndChangeCheck()) { @@ -376,6 +373,11 @@ static void DrawShadowsContent(UniversalRenderPipelineSerializedLight serialized { EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(serializedLight.customShadowLayers, Styles.customShadowLayers); + if (serializedLight.customShadowLayers.boolValue) + { + using (new EditorGUI.IndentLevelScope()) + EditorGUILayout.PropertyField(serializedLight.shadowRenderingLayers, Styles.ShadowLayer); + } // Undo the changes in the light component because the SyncLightAndShadowLayers will change the value automatically when link is ticked if (EditorGUI.EndChangeCheck()) { @@ -389,20 +391,6 @@ static void DrawShadowsContent(UniversalRenderPipelineSerializedLight serialized SyncLightAndShadowLayers(serializedLight, serializedLight.renderingLayers); } } - - if (serializedLight.customShadowLayers.boolValue) - { - using (new EditorGUI.IndentLevelScope()) - { - EditorGUI.BeginChangeCheck(); - EditorUtils.DrawRenderingLayerMask(serializedLight.shadowRenderingLayers, Styles.ShadowLayer); - if (EditorGUI.EndChangeCheck()) - { - serializedLight.settings.light.renderingLayerMask = serializedLight.shadowRenderingLayers.intValue; - serializedLight.Apply(); - } - } - } } } } diff --git a/Packages/com.unity.render-pipelines.universal/Editor/Lighting/UniversalRenderPipelineSerializedLight.cs b/Packages/com.unity.render-pipelines.universal/Editor/Lighting/UniversalRenderPipelineSerializedLight.cs index 649dad2a993..0d37e0a0d41 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/Lighting/UniversalRenderPipelineSerializedLight.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/Lighting/UniversalRenderPipelineSerializedLight.cs @@ -67,9 +67,9 @@ public UniversalRenderPipelineSerializedLight(SerializedObject serializedObject, lightCookieSizeProp = serializedAdditionalDataObject.FindProperty("m_LightCookieSize"); lightCookieOffsetProp = serializedAdditionalDataObject.FindProperty("m_LightCookieOffset"); - renderingLayers = serializedAdditionalDataObject.FindProperty("m_RenderingLayers"); + renderingLayers = serializedAdditionalDataObject.FindProperty("m_RenderingLayersMask"); customShadowLayers = serializedAdditionalDataObject.FindProperty("m_CustomShadowLayers"); - shadowRenderingLayers = serializedAdditionalDataObject.FindProperty("m_ShadowRenderingLayers"); + shadowRenderingLayers = serializedAdditionalDataObject.FindProperty("m_ShadowRenderingLayersMask"); settings.ApplyModifiedProperties(); } diff --git a/Packages/com.unity.render-pipelines.universal/Editor/Overrides/.buginfo b/Packages/com.unity.render-pipelines.universal/Editor/Overrides/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/Overrides/.buginfo +++ b/Packages/com.unity.render-pipelines.universal/Editor/Overrides/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Editor/PostProcessDataEditor.cs b/Packages/com.unity.render-pipelines.universal/Editor/PostProcessDataEditor.cs index 3dea7338e42..c837cbc51d2 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/PostProcessDataEditor.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/PostProcessDataEditor.cs @@ -34,9 +34,7 @@ public override void OnInspectorGUI() if (GUILayout.Button("Reload All")) { var resources = target as PostProcessData; - resources.shaders = null; - resources.textures = null; - ResourceReloader.ReloadAllNullIn(target, UniversalRenderPipelineAsset.packagePath); + resources.Reset(); } } diff --git a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/FullScreenPassRendererFeatureEditor.cs b/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/FullScreenPassRendererFeatureEditor.cs index d8fccb87677..92691710b72 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/FullScreenPassRendererFeatureEditor.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/FullScreenPassRendererFeatureEditor.cs @@ -1,85 +1,88 @@ using System.Collections.Generic; -using UnityEditor; -using UnityEditor.Rendering; using UnityEngine; +using UnityEngine.Rendering.Universal; -/// -/// Custom editor for FullScreenPassRendererFeature class responsible for drawing unavailable by default properties -/// such as custom drop down items and additional properties. -/// -[CustomEditor(typeof(FullScreenPassRendererFeature))] -public class FullScreenPassRendererFeatureEditor : Editor +namespace UnityEditor.Rendering.Universal { - private SerializedProperty m_InjectionPointProperty; - private SerializedProperty m_RequirementsProperty; - private SerializedProperty m_FetchColorBufferProperty; - private SerializedProperty m_BindDepthStencilAttachmentProperty; - private SerializedProperty m_PassMaterialProperty; - private SerializedProperty m_PassIndexProperty; - - private static readonly GUIContent k_InjectionPointGuiContent = new GUIContent("Injection Point", "Specifies where in the frame this pass will be injected."); - private static readonly GUIContent k_RequirementsGuiContent = new GUIContent("Requirements", "A mask of URP internal textures that will need to be generated and bound for sampling.\n\nNote that 'Color' here corresponds to '_CameraOpaqueTexture' so most of the time you will want to use the 'Fetch Color Buffer' option instead."); - private static readonly GUIContent k_FetchColorBufferGuiContent = new GUIContent("Fetch Color Buffer", "Enable this if the assigned material will need to sample the active color target. The active color will be bound to the '_BlitTexture' shader property for sampling. Note that this will introduce an internal color copy pass."); - private static readonly GUIContent k_BindDepthStencilAttachmentGuiContent = new GUIContent("Bind Depth-Stencil", "Enable this to bind the active camera's depth-stencil attachment to the framebuffer (only use this if depth-stencil ops are used by the assigned material as this could have a performance impact)."); - private static readonly GUIContent k_PassMaterialGuiContent = new GUIContent("Pass Material", "The material used to render the full screen pass."); - private static readonly GUIContent k_PassGuiContent = new GUIContent("Pass", "The name of the shader pass to use from the assigned material."); - - private void OnEnable() - { - m_InjectionPointProperty = serializedObject.FindProperty("injectionPoint"); - m_RequirementsProperty = serializedObject.FindProperty("requirements"); - m_FetchColorBufferProperty = serializedObject.FindProperty("fetchColorBuffer"); - m_BindDepthStencilAttachmentProperty = serializedObject.FindProperty("bindDepthStencilAttachment"); - m_PassMaterialProperty = serializedObject.FindProperty("passMaterial"); - m_PassIndexProperty = serializedObject.FindProperty("passIndex"); - } - /// - /// Implementation for a custom inspector + /// Custom editor for FullScreenPassRendererFeature class responsible for drawing unavailable by default properties + /// such as custom drop down items and additional properties. /// - public override void OnInspectorGUI() + [UnityEngine.Scripting.APIUpdating.MovedFrom("")] + [CustomEditor(typeof(FullScreenPassRendererFeature))] + public class FullScreenPassRendererFeatureEditor : Editor { - var currentFeature = target as FullScreenPassRendererFeature; + private SerializedProperty m_InjectionPointProperty; + private SerializedProperty m_RequirementsProperty; + private SerializedProperty m_FetchColorBufferProperty; + private SerializedProperty m_BindDepthStencilAttachmentProperty; + private SerializedProperty m_PassMaterialProperty; + private SerializedProperty m_PassIndexProperty; - if (currentFeature.passMaterial == null || currentFeature.passIndex >= currentFeature.passMaterial.passCount) - currentFeature.passIndex = 0; + private static readonly GUIContent k_InjectionPointGuiContent = new GUIContent("Injection Point", "Specifies where in the frame this pass will be injected."); + private static readonly GUIContent k_RequirementsGuiContent = new GUIContent("Requirements", "A mask of URP internal textures that will need to be generated and bound for sampling.\n\nNote that 'Color' here corresponds to '_CameraOpaqueTexture' so most of the time you will want to use the 'Fetch Color Buffer' option instead."); + private static readonly GUIContent k_FetchColorBufferGuiContent = new GUIContent("Fetch Color Buffer", "Enable this if the assigned material will need to sample the active color target. The active color will be bound to the '_BlitTexture' shader property for sampling. Note that this will introduce an internal color copy pass."); + private static readonly GUIContent k_BindDepthStencilAttachmentGuiContent = new GUIContent("Bind Depth-Stencil", "Enable this to bind the active camera's depth-stencil attachment to the framebuffer (only use this if depth-stencil ops are used by the assigned material as this could have a performance impact)."); + private static readonly GUIContent k_PassMaterialGuiContent = new GUIContent("Pass Material", "The material used to render the full screen pass."); + private static readonly GUIContent k_PassGuiContent = new GUIContent("Pass", "The name of the shader pass to use from the assigned material."); - EditorGUILayout.PropertyField(m_InjectionPointProperty, k_InjectionPointGuiContent); - EditorGUILayout.PropertyField(m_RequirementsProperty, k_RequirementsGuiContent); - EditorGUILayout.PropertyField(m_FetchColorBufferProperty, k_FetchColorBufferGuiContent); - EditorGUILayout.PropertyField(m_BindDepthStencilAttachmentProperty, k_BindDepthStencilAttachmentGuiContent); - EditorGUILayout.PropertyField(m_PassMaterialProperty, k_PassMaterialGuiContent); - - if (AdvancedProperties.BeginGroup()) + private void OnEnable() { - DrawMaterialPassProperty(currentFeature); + m_InjectionPointProperty = serializedObject.FindProperty("injectionPoint"); + m_RequirementsProperty = serializedObject.FindProperty("requirements"); + m_FetchColorBufferProperty = serializedObject.FindProperty("fetchColorBuffer"); + m_BindDepthStencilAttachmentProperty = serializedObject.FindProperty("bindDepthStencilAttachment"); + m_PassMaterialProperty = serializedObject.FindProperty("passMaterial"); + m_PassIndexProperty = serializedObject.FindProperty("passIndex"); } - AdvancedProperties.EndGroup(); - serializedObject.ApplyModifiedProperties(); - } + /// + /// Implementation for a custom inspector + /// + public override void OnInspectorGUI() + { + var currentFeature = target as FullScreenPassRendererFeature; - private void DrawMaterialPassProperty(FullScreenPassRendererFeature feature) - { - List selectablePasses; - bool isMaterialValid = feature.passMaterial != null; - selectablePasses = isMaterialValid ? GetPassIndexStringEntries(feature) : new List() {"No material"}; + if (currentFeature.passMaterial == null || currentFeature.passIndex >= currentFeature.passMaterial.passCount) + currentFeature.passIndex = 0; - // If material is invalid 0'th index is selected automatically, so it stays on "No material" entry - // It is invalid index, but FullScreenPassRendererFeature wont execute until material is valid - m_PassIndexProperty.intValue = EditorGUILayout.Popup(k_PassGuiContent, m_PassIndexProperty.intValue, selectablePasses.ToArray()); - } + EditorGUILayout.PropertyField(m_InjectionPointProperty, k_InjectionPointGuiContent); + EditorGUILayout.PropertyField(m_RequirementsProperty, k_RequirementsGuiContent); + EditorGUILayout.PropertyField(m_FetchColorBufferProperty, k_FetchColorBufferGuiContent); + EditorGUILayout.PropertyField(m_BindDepthStencilAttachmentProperty, k_BindDepthStencilAttachmentGuiContent); + EditorGUILayout.PropertyField(m_PassMaterialProperty, k_PassMaterialGuiContent); - private static List GetPassIndexStringEntries(FullScreenPassRendererFeature component) - { - List passIndexEntries = new List(); - for (int i = 0; i < component.passMaterial.passCount; ++i) + if (AdvancedProperties.BeginGroup()) + { + DrawMaterialPassProperty(currentFeature); + } + AdvancedProperties.EndGroup(); + + serializedObject.ApplyModifiedProperties(); + } + + private void DrawMaterialPassProperty(FullScreenPassRendererFeature feature) { - // "Name of a pass (index)" - "PassAlpha (1)" - string entry = $"{component.passMaterial.GetPassName(i)} ({i})"; - passIndexEntries.Add(entry); + List selectablePasses; + bool isMaterialValid = feature.passMaterial != null; + selectablePasses = isMaterialValid ? GetPassIndexStringEntries(feature) : new List() {"No material"}; + + // If material is invalid 0'th index is selected automatically, so it stays on "No material" entry + // It is invalid index, but FullScreenPassRendererFeature wont execute until material is valid + m_PassIndexProperty.intValue = EditorGUILayout.Popup(k_PassGuiContent, m_PassIndexProperty.intValue, selectablePasses.ToArray()); } - return passIndexEntries; + private static List GetPassIndexStringEntries(FullScreenPassRendererFeature component) + { + List passIndexEntries = new List(); + for (int i = 0; i < component.passMaterial.passCount; ++i) + { + // "Name of a pass (index)" - "PassAlpha (1)" + string entry = $"{component.passMaterial.GetPassName(i)} ({i})"; + passIndexEntries.Add(entry); + } + + return passIndexEntries; + } } } diff --git a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewPostProcessRendererFeature.cs.txt b/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewPostProcessRendererFeature.cs.txt index 7779aa5ce68..60a7ebe1f67 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewPostProcessRendererFeature.cs.txt +++ b/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewPostProcessRendererFeature.cs.txt @@ -3,43 +3,31 @@ using UnityEngine.Rendering; using UnityEngine.Rendering.RenderGraphModule; using UnityEngine.Rendering.Universal; -// This is the script template for creating a ScriptableRendererFeature meant for a post-processing effect -// -// To see how this feature is made to work with on a custom VolumeComponent observe the "AddRenderPasses" and "ExecuteMainPass" methods -// -// For a general guide on how to create custom ScriptableRendererFeatures see the following URP documentation page: -// https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html?subfolder=/manual/renderer-features/create-custom-renderer-feature.html +// Create a Scriptable Renderer Feature that implements a post-processing effect when the camera is inside a custom volume. +// For more information about creating scriptable renderer features, refer to https://docs.unity3d.com/Manual/urp/customizing-urp.html public sealed class #FEATURE_TYPE# : ScriptableRendererFeature { #region FEATURE_FIELDS - // * The material used to render the post-processing effect - // * The 'SerializeField' attribute makes sure that the private material reference we assign in the "Create" method - // while in the editor will be serialised and the referenced material will be included in the player build - // * To not clutter the renderer feature UI we're keeping this field hidden, but if you'd like to be able to change - // the material in the editor UI you could just make this field public and remove the current attributes + // Declare the material used to render the post-processing effect. + // Add a [SerializeField] attribute so Unity serializes the property and includes it in builds. [SerializeField] [HideInInspector] private Material m_Material; - // The user defined ScriptableRenderPass that is responsible for the actual rendering of the effect + // Declare the render pass that renders the effect. private CustomPostRenderPass m_FullScreenPass; #endregion #region FEATURE_METHODS + // Override the Create method. + // Unity calls this method when the Scriptable Renderer Feature loads for the first time, and when you change a property. public override void Create() { #if UNITY_EDITOR - // * This assigns a material asset reference while in the editor and the "[SerializeField]" attribute on the - // private `m_Material` field will make sure that the referenced material will be included in player builds - // * Alternatively, you could create a material from the shader at runtime e.g.: - // 'm_Material = new Material(m_Shader);' - // In this case for the shader referenced by 'm_Shader' to be included in builds you will have to either: - // 1) Assign 'm_Shader = Shader.Find("Shader Graphs/FullscreenInvertColors")' behind UNITY_EDITOR only and make sure 'm_Shader' is a "[SerializedField]" - // 2) Or add "Shader Graphs/FullscreenInvertColors" to the "Always Included Shaders List" under "ProjectSettings"-> "Graphics" -> "Shader Settings" - // and call 'm_Shader = Shader.Find("Shader Graphs/FullscreenInvertColors")' outside of the UNITY_EDITOR section + // Assign a material asset to m_Material in the Unity Editor. if (m_Material == null) m_Material = UnityEditor.AssetDatabase.LoadAssetAtPath("Packages/com.unity.render-pipelines.universal/Runtime/Materials/FullscreenInvertColors.mat"); #endif @@ -48,87 +36,63 @@ public sealed class #FEATURE_TYPE# : ScriptableRendererFeature m_FullScreenPass = new CustomPostRenderPass(name, m_Material); } - // Here you can inject one or multiple render passes in the renderer. - // This method is called when setting up the renderer once per-camera. + // Override the AddRenderPasses method to inject passes into the renderer. Unity calls AddRenderPasses once per camera. public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) { - // Skip rendering if m_Material or the pass instance are null for whatever reason + // Skip rendering if m_Material or the pass instance are null. if (m_Material == null || m_FullScreenPass == null) return; - // This check makes sure to not render the effect to reflection probes or preview cameras as post-processing is typically not desired there + // Skip rendering if the target is a Reflection Probe or a preview camera. if (renderingData.cameraData.cameraType == CameraType.Preview || renderingData.cameraData.cameraType == CameraType.Reflection) return; - // You can control the rendering of your feature using custom post-processing VolumeComponents - // - // E.g. when controlling rendering with a VolumeComponent you will typically want to skip rendering as an optimization when the component - // has settings which would make it imperceptible (e.g. the implementation of IsActive() might return false when some "intensity" value is 0). - // - // N.B. if your volume component type is actually defined in C# it is unlikely that VolumeManager would return a "null" instance of it as - // GlobalSettings should always contain an instance of all VolumeComponents in the project even if if they're not overriden in the scene + // Skip rendering if the camera is outside the custom volume. #VOLUME_TYPE# myVolume = VolumeManager.instance.stack?.GetComponent<#VOLUME_TYPE#>(); if (myVolume == null || !myVolume.IsActive()) return; - // Here you specify at which part of the frame the effect will execute - // - // When creating post-processing effects you will almost always want to use on of the following injection points: - // BeforeRenderingTransparents - in cases you want your effect to be visible behind transparent objects - // BeforeRenderingPostProcessing - in cases where your effect is supposed to run before the URP post-processing stack - // AfterRenderingPostProcessing - in cases where your effect is supposed to run after the URP post-processing stack, but before FXAA, upscaling or color grading + // Specify when the effect will execute during the frame. + // For a post-processing effect, the injection point is usually BeforeRenderingTransparents, BeforeRenderingPostProcessing, or AfterRenderingPostProcessing. + // For more information, refer to https://docs.unity3d.com/Manual/urp/customize/custom-pass-injection-points.html m_FullScreenPass.renderPassEvent = RenderPassEvent.AfterRenderingPostProcessing; - // You can specify if your effect needs scene depth, normals, motion vectors or a downscaled opaque color as input - // - // You specify them as a mask e.g. ScriptableRenderPassInput.Normals | ScriptableRenderPassInput.Motion and URP - // will either reuse these if they've been generated earlier in the frame or will add passes to generate them. - // - // The inputs will get bound as global shader texture properties and can be sampled in the shader using using the following: - // * Depth - use "SampleSceneDepth" after including "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareNormalsTexture.hlsl" - // * Normal - use "SampleSceneNormals" after including "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareNormalsTexture.hlsl" - // * Opaque Scene Color - use "SampleSceneColor" after including "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareOpaqueTexture.hlsl". - // Note that "OpaqueSceneColor" is a texture containing a possibly downscaled copy of the framebuffer from before rendering transparent objects which - // should not be your first choice when wanting to do a post-processing effect, for that this template will copy the active texture for sampling which is more expensive - // * Motion Vectors - you currently need to declare and sample the texture as follows: - // TEXTURE2D_X(_MotionVectorTexture); - // ... - // LOAD_TEXTURE2D_X_LOD(_MotionVectorTexture, pixelCoords, 0).xy - // - // N.B. when using the FullScreenPass Shader Graph target you should simply use the "URP Sample Buffer" node which will handle the above for you + // Specify that the effect doesn't need scene depth, normals, motion vectors, or the color texture as input. m_FullScreenPass.ConfigureInput(ScriptableRenderPassInput.None); + // Add the render pass to the renderer. renderer.EnqueuePass(m_FullScreenPass); } protected override void Dispose(bool disposing) { - // We dispose the pass we created to free the resources it might be holding onto + // Free the resources the render pass uses. m_FullScreenPass.Dispose(); } #endregion + // Create the custom render pass. private class CustomPostRenderPass : ScriptableRenderPass { #region PASS_FIELDS - // The material used to render the post-processing effect + // Declare the material used to render the post-processing effect. private Material m_Material; - // The handle to the temporary color copy texture (only used in the non-render graph path) + // Declare a texture to use as a temporary color copy. This texture is used only in the Compatibility Mode path. private RTHandle m_CopiedColor; - // The property block used to set additional properties for the material + // Declare a property block to set additional properties for the material. private static MaterialPropertyBlock s_SharedPropertyBlock = new MaterialPropertyBlock(); - // This constant is meant to showcase how to create a copy color pass that is needed for most post-processing effects + // Declare a property that enables or disables the render pass that samples the color texture. private static readonly bool kSampleActiveColor = true; - // This constant is meant to showcase how you can add dept-stencil support to your main pass + // Declare a property that adds or removes depth-stencil support. private static readonly bool kBindDepthStencilAttachment = false; - // Creating some shader properties in advance as this is slightly more efficient than referencing them by string + // Create shader properties in advance, which is more efficient than referencing them by string. private static readonly int kBlitTexturePropertyId = Shader.PropertyToID("_BlitTexture"); private static readonly int kBlitScaleBiasPropertyId = Shader.PropertyToID("_BlitScaleBias"); @@ -136,55 +100,55 @@ public sealed class #FEATURE_TYPE# : ScriptableRendererFeature public CustomPostRenderPass(string passName, Material material) { + // Add a profiling sampler. profilingSampler = new ProfilingSampler(passName); + + // Assign the material to the render pass. m_Material = material; - // * The 'requiresIntermediateTexture' field needs to be set to 'true' when a ScriptableRenderPass intends to sample - // the active color buffer - // * This will make sure that URP will not apply the optimization of rendering the entire frame to the write-only backbuffer, - // but will instead render to intermediate textures that can be sampled, which is typically needed for post-processing + // To make sure the render pass can sample the active color buffer, set URP to render to intermediate textures instead of directly to the backbuffer. requiresIntermediateTexture = kSampleActiveColor; } #region PASS_SHARED_RENDERING_CODE - // This method contains the shared rendering logic for doing the temporary color copy pass (used by both the non-render graph and render graph paths) + // Add a command to create the temporary color copy texture. + // This method is used in both the render graph system path and the Compatibility Mode path. private static void ExecuteCopyColorPass(RasterCommandBuffer cmd, RTHandle sourceTexture) { Blitter.BlitTexture(cmd, sourceTexture, new Vector4(1, 1, 0, 0), 0.0f, false); } - // This method contains the shared rendering logic for doing the main post-processing pass (used by both the non-render graph and render graph paths) + // Add commands to render the effect. + // This method is used in both the render graph system path and the Compatibility Mode path. private static void ExecuteMainPass(RasterCommandBuffer cmd, RTHandle sourceTexture, Material material) { + // Clear the material properties. s_SharedPropertyBlock.Clear(); if(sourceTexture != null) s_SharedPropertyBlock.SetTexture(kBlitTexturePropertyId, sourceTexture); - // This uniform needs to be set for user materials with shaders relying on core Blit.hlsl to work as expected + // Set the scale and bias so shaders that use Blit.hlsl work correctly. s_SharedPropertyBlock.SetVector(kBlitScaleBiasPropertyId, new Vector4(1, 1, 0, 0)); - // USING A CUSTOM VOLUME COMPONENT: - // - // To control the rendering of your effect using a custom VolumeComponent you can set the material's properties - // based on the blended values of your VolumeComponent by querying them with the core VolumeManager API e.g.: + // Set the material properties based on the blended values of the custom volume. + // For more information, refer to https://docs.unity3d.com/Manual/urp/post-processing/custom-post-processing-with-volume.html #VOLUME_TYPE# myVolume = VolumeManager.instance.stack?.GetComponent<#VOLUME_TYPE#>(); if (myVolume != null) s_SharedPropertyBlock.SetFloat("_Intensity", myVolume.intensity.value); + // Draw to the current render target. cmd.DrawProcedural(Matrix4x4.identity, material, 0, MeshTopology.Triangles, 3, 1, s_SharedPropertyBlock); } - // This method is used to get the descriptor used for creating the temporary color copy texture that will enable the main pass to sample the screen color + // Get the texture descriptor needed to create the temporary color copy texture. + // This method is used in both the render graph system path and the Compatibility Mode path. private static RenderTextureDescriptor GetCopyPassTextureDescriptor(RenderTextureDescriptor desc) { - // Unless 'desc.bindMS = true' for an MSAA texture a resolve pass will be inserted before it is bound for sampling. - // Since our main pass shader does not expect to sample an MSAA target we will leave 'bindMS = false'. - // If the camera target has MSAA enabled an MSAA resolve will still happen before our copy-color pass but - // with this change we will avoid an unnecessary MSAA resolve before our main pass. + // Avoid an unnecessary multisample anti-aliasing (MSAA) resolve before the main render pass. desc.msaaSamples = 1; - // This avoids copying the depth buffer tied to the current descriptor as the main pass in this example does not use it + // Avoid copying the depth buffer, as the main pass render in this example doesn't use depth. desc.depthBufferBits = (int)DepthBits.None; return desc; @@ -194,35 +158,36 @@ public sealed class #FEATURE_TYPE# : ScriptableRendererFeature #region PASS_NON_RENDER_GRAPH_PATH - // This method is called before executing the render pass (non-render graph path only). - // It can be used to configure render targets and their clear state. Also to create temporary render target textures. - // When empty this render pass will render to the active camera render target. - // You should never call CommandBuffer.SetRenderTarget. Instead call ConfigureTarget and ConfigureClear. - // The render pipeline will ensure target setup and clearing happens in a performant manner. - [System.Obsolete("This rendering path is for compatibility mode only (when Render Graph is disabled). Use Render Graph API instead.", false)] + // Override the OnCameraSetup method to configure render targets and their clear states, and create temporary render target textures. + // Unity calls this method before executing the render pass. + // This method is used only in the Compatibility Mode path. + // Use ConfigureTarget or ConfigureClear in this method. Don't use CommandBuffer.SetRenderTarget. + [System.Obsolete("This rendering path works in Compatibility Mode only, which is deprecated. Use the render graph API instead.", false)] public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData) { - // This ScriptableRenderPass manages its own RenderTarget. - // ResetTarget here so that ScriptableRenderer's active attachment can be invalidated when processing this ScriptableRenderPass. + // Reset the render target to default. ResetTarget(); - // This allocates our intermediate texture for the non-RG path and makes sure it's reallocated if some settings on the camera target change (e.g. resolution) + // Allocate a temporary texture, and reallocate it if there's a change to camera settings, for example resolution. if (kSampleActiveColor) RenderingUtils.ReAllocateHandleIfNeeded(ref m_CopiedColor, GetCopyPassTextureDescriptor(renderingData.cameraData.cameraTargetDescriptor), name: "_CustomPostPassCopyColor"); } - // Here you can implement the rendering logic (non-render graph path only). - // Use ScriptableRenderContext to issue drawing commands or execute command buffers - // https://docs.unity3d.com/ScriptReference/Rendering.ScriptableRenderContext.html - // You don't have to call ScriptableRenderContext.submit, the render pipeline will call it at specific points in the pipeline. - [System.Obsolete("This rendering path is for compatibility mode only (when Render Graph is disabled). Use Render Graph API instead.", false)] + // Override the Execute method to implement the rendering logic. Use ScriptableRenderContext to issue drawing commands or execute command buffers. + // You don't need to call ScriptableRenderContext.Submit. + // This method is used only in the Compatibility Mode path. + [System.Obsolete("This rendering path works in Compatibility Mode only, which is deprecated. Use the render graph API instead.", false)] public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) { + + // Get the camera data and command buffer. ref var cameraData = ref renderingData.cameraData; var cmd = CommandBufferPool.Get(); + // Add a profiling sampler. using (new ProfilingScope(cmd, profilingSampler)) { + // Create a command buffer to execute the render pass. RasterCommandBuffer rasterCmd = CommandBufferHelpers.GetRasterCommandBuffer(cmd); if (kSampleActiveColor) { @@ -230,25 +195,32 @@ public sealed class #FEATURE_TYPE# : ScriptableRendererFeature ExecuteCopyColorPass(rasterCmd, cameraData.renderer.cameraColorTargetHandle); } + // Set the render target based on the depth-stencil attachment. if(kBindDepthStencilAttachment) CoreUtils.SetRenderTarget(cmd, cameraData.renderer.cameraColorTargetHandle, cameraData.renderer.cameraDepthTargetHandle); else CoreUtils.SetRenderTarget(cmd, cameraData.renderer.cameraColorTargetHandle); + // Execute the main render pass. ExecuteMainPass(rasterCmd, kSampleActiveColor ? m_CopiedColor : null, m_Material); } + // Execute the command buffer. context.ExecuteCommandBuffer(cmd); cmd.Clear(); + // Release the command buffer. CommandBufferPool.Release(cmd); } - // Cleanup any allocated resources that were created during the execution of this render pass (non-render graph path only) + // Free the resources the camera uses. + // This method is used only in the Compatibility Mode path. public override void OnCameraCleanup(CommandBuffer cmd) { } + // Free the resources the texture uses. + // This method is used only in the Compatibility Mode path. public void Dispose() { m_CopiedColor?.Release(); @@ -258,13 +230,15 @@ public sealed class #FEATURE_TYPE# : ScriptableRendererFeature #region PASS_RENDER_GRAPH_PATH - // The custom copy color pass data that will be passed at render graph execution to the lambda we set with "SetRenderFunc" during render graph setup + // Declare the resource the copy render pass uses. + // This method is used only in the render graph system path. private class CopyPassData { public TextureHandle inputTexture; } - // The custom main pass data that will be passed at render graph execution to the lambda we set with "SetRenderFunc" during render graph setup + // Declare the resources the main render pass uses. + // This method is used only in the render graph system path. private class MainPassData { public Material material; @@ -281,26 +255,23 @@ public sealed class #FEATURE_TYPE# : ScriptableRendererFeature ExecuteMainPass(context.cmd, data.inputTexture.IsValid() ? data.inputTexture : null, data.material); } - // Here you can implement the rendering logic for the render graph path - // The implementation diverges from the non-rendergraph path because we don't need a copy here when sampling the active color. However, this means that every pixel needs to be written in your material, a partial write (eg using stencil) will not be visually correct and requires a copy first. + // Override the RecordRenderGraph method to implement the rendering logic. + // This method is used only in the render graph system path. public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { + + // Get the resources the pass uses. UniversalResourceData resourcesData = frameData.Get(); UniversalCameraData cameraData = frameData.Get(); - // Below is an example of a typical post-processing effect which samples from the current color - // Feel free modify/rename/add additional or remove the existing passes based on the needs of your custom post-processing effect - + // Sample from the current color texture. using (var builder = renderGraph.AddRasterRenderPass(passName, out var passData, profilingSampler)) { passData.material = m_Material; TextureHandle destination; - // GPU graphics pipelines don't allow to sample the texture bound as the active color target, ie the cameraColor cannot both be an input and the render target. - // Before, this required us to first copy the cameraColor to then blit back to it while sampling from the copy. Now that we have the ContextContainer, we can swap the cameraColor to - // another (temp) resource so that the next pass uses the temp resource. We don't need the copy anymore. However, this only works if you are writing to every - // pixel of the frame, a partial write will need the copy first to add to the existing content. See FullScreenPassRendererFeature.cs for an example. + // Copy cameraColor to a temporary texture, if the kSampleActiveColor property is set to true. if (kSampleActiveColor) { var cameraColorDesc = renderGraph.GetTextureDesc(resourcesData.cameraColor); @@ -310,7 +281,7 @@ public sealed class #FEATURE_TYPE# : ScriptableRendererFeature destination = renderGraph.CreateTexture(cameraColorDesc); passData.inputTexture = resourcesData.cameraColor; - //If you use framebuffer fetch in your material then you need to use builder.SetInputAttachment. If the pass can be merged then this will reduce GPU bandwidth usage / power consumption and improve GPU performance. + // If you use framebuffer fetch in your material, use builder.SetInputAttachment to reduce GPU bandwidth usage and power consumption. builder.UseTexture(passData.inputTexture, AccessFlags.Read); } else @@ -319,15 +290,19 @@ public sealed class #FEATURE_TYPE# : ScriptableRendererFeature passData.inputTexture = TextureHandle.nullHandle; } + + // Set the render graph to render to the temporary texture. builder.SetRenderAttachment(destination, 0, AccessFlags.Write); - // This branch is currently not taken, but if your pass needed the depth and/or stencil buffer to be bound this is how you would do it + // Bind the depth-stencil buffer. + // This is a demonstration. The code isn't used in the example. if (kBindDepthStencilAttachment) builder.SetRenderAttachmentDepth(resourcesData.activeDepthTexture, AccessFlags.Write); + // Set the render method. builder.SetRenderFunc((MainPassData data, RasterGraphContext context) => ExecuteMainPass(data, context)); - //Swap cameraColor to the new temp resource (destination) for the next pass + // Set cameraColor to the new temporary texture so the next render pass can use it. You don't need to blit to and from cameraColor if you use the render graph system. if (kSampleActiveColor) { resourcesData.cameraColor = destination; diff --git a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewPostProcessTemplateDropdownItems.cs b/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewPostProcessTemplateDropdownItems.cs index 6229c228745..463beb07c96 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewPostProcessTemplateDropdownItems.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewPostProcessTemplateDropdownItems.cs @@ -62,7 +62,7 @@ public override void Action(int instanceId, string userPath, string resourceFile } } - [MenuItem("Assets/Create/Rendering/URP Post-processing Effect (Renderer Feature with Volume)", priority = CoreUtils.Sections.section4 + CoreUtils.Priorities.assetsCreateRenderingMenuPriority)] + [MenuItem("Assets/Create/Scripting/URP Post-process Volume Scripts", priority = UnityEngine.Rendering.CoreUtils.Priorities.scriptingPriority + 1)] static void MenuCreateCustomPostProcessVolumeRendererFeature() { Texture2D icon = EditorGUIUtility.IconContent("cs Script Icon").image as Texture2D; diff --git a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewPostProcessVolumeComponent.cs.txt b/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewPostProcessVolumeComponent.cs.txt index aefa570c1eb..5790c598ef2 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewPostProcessVolumeComponent.cs.txt +++ b/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewPostProcessVolumeComponent.cs.txt @@ -2,37 +2,35 @@ using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; -// This defines a custom VolumeComponent to be used with the Core VolumeFramework -// (see core API docs https://docs.unity3d.com/Packages/com.unity.render-pipelines.core@latest/index.html?subfolder=/api/UnityEngine.Rendering.VolumeComponent.html) -// (see URP docs https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html?subfolder=/manual/Volumes.html) -// -// After implementing this class you can: -// * Tweak the default values for this VolumeComponent in the URP GlobalSettings -// * Add overrides for this VolumeComponent to any local or global scene volume profiles -// (see URP docs https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html?subfolder=/manual/Volume-Profile.html) -// (see URP docs https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html?subfolder=/manual/VolumeOverrides.html) -// * Access the blended values of this VolumeComponent from your ScriptableRenderPasses or scripts using the VolumeManager API -// (see core API docs https://docs.unity3d.com/Packages/com.unity.render-pipelines.core@latest/index.html?subfolder=/api/UnityEngine.Rendering.VolumeManager.html) -// * Override the values for this volume per-camera by placing a VolumeProfile in a dedicated layer and setting the camera's "Volume Mask" to that layer -// -// Things to keep in mind: -// * Be careful when renaming, changing types or removing public fields to not break existing instances of this class (note that this class inherits from ScriptableObject so the same serialization rules apply) -// * The 'IPostProcessComponent' interface adds the 'IsActive()' method, which is currently not strictly necessary and is for your own convenience -// * It is recommended to only expose fields that are expected to change. Fields which are constant such as shaders, materials or LUT textures -// should likely be in AssetBundles or referenced by serialized fields of your custom ScriptableRendererFeatures on used renderers so they would not get stripped during builds +// Defines a custom Volume Override component that controls the intensity of the URP Post-processing effect on a Scriptable Renderer Feature. +// For more information about the VolumeComponent API, refer to https://docs.unity3d.com/Packages/com.unity.render-pipelines.core@17.2/api/UnityEngine.Rendering.VolumeComponent.html + +// Add the Volume Override to the list of available Volume Override components in the Volume Profile. [VolumeComponentMenu("Post-processing Custom/#DISPLAY_NAME#")] + +// If the related Scriptable Renderer Feature doesn't exist, display a warning about adding it to the renderer. [VolumeRequiresRendererFeatures(typeof(#FEATURE_TYPE#))] + +// Make the Volume Override active in the Universal Render Pipeline. [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))] + +// Create the Volume Override by inheriting from VolumeComponent public sealed class #VOLUME_TYPE# : VolumeComponent, IPostProcessComponent { + // Set the name of the volume component in the list in the Volume Profile. public #VOLUME_TYPE#() { displayName = "#DISPLAY_NAME#"; } + // Create a property to control the intesity of the effect, with a tooltip description. + // You can set the default value in the project-wide Graphics settings window. For more information, refer to https://docs.unity3d.com/Manual/urp/urp-global-settings.html + // You can override the value in a local or global volume. For more information, refer to https://docs.unity3d.com/Manual/urp/volumes-landing-page.html + // To access the value in a script, refer to the VolumeManager API: https://docs.unity3d.com/Packages/com.unity.render-pipelines.core@latest/index.html?subfolder=/api/UnityEngine.Rendering.VolumeManager.html [Tooltip("Enter the description for the property that is shown when hovered")] public ClampedFloatParameter intensity = new ClampedFloatParameter(1f, 0f, 1f); + // Optional: Implement the IsActive() method of the IPostProcessComponent interface, and get the intensity value. public bool IsActive() { return intensity.GetValue() > 0.0f; diff --git a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewRendererFeatureDropdownItem.cs b/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewRendererFeatureDropdownItem.cs deleted file mode 100644 index 57fdce66224..00000000000 --- a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewRendererFeatureDropdownItem.cs +++ /dev/null @@ -1,17 +0,0 @@ -using UnityEditor.Rendering.Universal.Internal; -using UnityEngine.Rendering; - -namespace UnityEditor.Rendering.Universal -{ - internal static class NewRendererFeatureDropdownItem - { - static readonly string defaultNewClassName = "CustomRenderPassFeature.cs"; - - [MenuItem("Assets/Create/Rendering/URP Renderer Feature", priority = CoreUtils.Sections.section3 + CoreUtils.Priorities.assetsCreateRenderingMenuPriority)] - internal static void CreateNewRendererFeature() - { - string templatePath = AssetDatabase.GUIDToAssetPath(ResourceGuid.rendererTemplate); - ProjectWindowUtil.CreateScriptAssetFromTemplateFile(templatePath, defaultNewClassName); - } - } -} diff --git a/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates.meta b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates.meta new file mode 100644 index 00000000000..6e4b5c4c44e --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3c76ead915a5d4c3190e62adcb063092 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/ScriptTemplates.cs b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/ScriptTemplates.cs new file mode 100644 index 00000000000..107754550af --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/ScriptTemplates.cs @@ -0,0 +1,19 @@ +namespace UnityEditor.Rendering.Universal +{ + internal static class ScriptTemplates + { + internal const string ScriptTemplatePath = "Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/"; + + [MenuItem("Assets/Create/Shader/URP Unlit Shader", priority = 0)] + static void CreateUnlitURPShader() + { + ProjectWindowUtil.CreateScriptAssetFromTemplateFile($"{ScriptTemplatePath}UnlitURP.txt", "NewUnlitUniversalRenderPipelineShader.shader"); + } + + [MenuItem("Assets/Create/Scripting/URP Renderer Feature Script", priority = UnityEngine.Rendering.CoreUtils.Priorities.scriptingPriority)] + internal static void CreateNewRendererFeature() + { + ProjectWindowUtil.CreateScriptAssetFromTemplateFile($"{ScriptTemplatePath}ScriptableRendererFeature.txt", "NewURPRenderFeature.cs"); + } + } +} diff --git a/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/ScriptTemplates.cs.meta b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/ScriptTemplates.cs.meta new file mode 100644 index 00000000000..6fa45fcb447 --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/ScriptTemplates.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: be08ea2d1e97b4edfb6c3b9eb27db748 \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewRendererFeature.cs.txt b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/ScriptableRendererFeature.txt similarity index 64% rename from Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewRendererFeature.cs.txt rename to Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/ScriptableRendererFeature.txt index c8a3395b74a..9c5999f283d 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewRendererFeature.cs.txt +++ b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/ScriptableRendererFeature.txt @@ -1,3 +1,4 @@ +using System; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; @@ -5,18 +6,56 @@ using UnityEngine.Rendering.RenderGraphModule; public class #SCRIPTNAME# : ScriptableRendererFeature { - class CustomRenderPass : ScriptableRenderPass + [SerializeField] #SCRIPTNAME#Settings settings; + #SCRIPTNAME#Pass m_ScriptablePass; + + /// + public override void Create() + { + m_ScriptablePass = new #SCRIPTNAME#Pass(settings); + + // Configures where the render pass should be injected. + m_ScriptablePass.renderPassEvent = RenderPassEvent.AfterRenderingOpaques; + + // Requests URP resources as inputs, URP will ensure copies of these attachments are available for sampling before executing the render pass. + m_ScriptablePass.ConfigureInput(ScriptableRenderPassInput.Color | ScriptableRenderPassInput.Depth); + } + + // Here you can inject one or multiple render passes in the renderer. + // This method is called when setting up the renderer once per-camera. + public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) { + renderer.EnqueuePass(m_ScriptablePass); + } + + // Use this class to pass around settings from the feature to the pass + [Serializable] + public class #SCRIPTNAME#Settings + { + #NOTRIM# + } + + class #SCRIPTNAME#Pass : ScriptableRenderPass + { + readonly #SCRIPTNAME#Settings settings; + + public #SCRIPTNAME#Pass(#SCRIPTNAME#Settings settings) + { + this.settings = settings; + } + // This class stores the data needed by the RenderGraph pass. // It is passed as a parameter to the delegate function that executes the RenderGraph pass. private class PassData { + #NOTRIM# } // This static method is passed as the RenderFunc delegate to the RenderGraph render pass. // It is used to execute draw commands. static void ExecutePass(PassData data, RasterGraphContext context) { + #NOTRIM# } // RecordRenderGraph is where the RenderGraph handle can be accessed, through which render passes can be added to the graph. @@ -40,7 +79,7 @@ public class #SCRIPTNAME# : ScriptableRendererFeature // Eg: // builder.UseTexture(sourceTexture); // TextureHandle destination = UniversalRenderer.CreateRenderGraphTexture(renderGraph, cameraData.cameraTargetDescriptor, "Destination Texture", false); - + // This sets the render target of the pass to the active color texture. Change it to your own render target as needed. builder.SetRenderAttachment(resourceData.activeColorTexture, 0); @@ -48,48 +87,5 @@ public class #SCRIPTNAME# : ScriptableRendererFeature builder.SetRenderFunc((PassData data, RasterGraphContext context) => ExecutePass(data, context)); } } - - // NOTE: This method is part of the compatibility rendering path, please use the Render Graph API above instead. - // This method is called before executing the render pass. - // It can be used to configure render targets and their clear state. Also to create temporary render target textures. - // When empty this render pass will render to the active camera render target. - // You should never call CommandBuffer.SetRenderTarget. Instead call ConfigureTarget and ConfigureClear. - // The render pipeline will ensure target setup and clearing happens in a performant manner. - public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData) - { - } - - // NOTE: This method is part of the compatibility rendering path, please use the Render Graph API above instead. - // Here you can implement the rendering logic. - // Use ScriptableRenderContext to issue drawing commands or execute command buffers - // https://docs.unity3d.com/ScriptReference/Rendering.ScriptableRenderContext.html - // You don't have to call ScriptableRenderContext.submit, the render pipeline will call it at specific points in the pipeline. - public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) - { - } - - // NOTE: This method is part of the compatibility rendering path, please use the Render Graph API above instead. - // Cleanup any allocated resources that were created during the execution of this render pass. - public override void OnCameraCleanup(CommandBuffer cmd) - { - } - } - - CustomRenderPass m_ScriptablePass; - - /// - public override void Create() - { - m_ScriptablePass = new CustomRenderPass(); - - // Configures where the render pass should be injected. - m_ScriptablePass.renderPassEvent = RenderPassEvent.AfterRenderingOpaques; - } - - // Here you can inject one or multiple render passes in the renderer. - // This method is called when setting up the renderer once per-camera. - public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) - { - renderer.EnqueuePass(m_ScriptablePass); } } diff --git a/Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewRendererFeature.cs.txt.meta b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/ScriptableRendererFeature.txt.meta similarity index 100% rename from Packages/com.unity.render-pipelines.universal/Editor/RendererFeatures/NewRendererFeature.cs.txt.meta rename to Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/ScriptableRendererFeature.txt.meta diff --git a/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/UnlitURP.txt b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/UnlitURP.txt new file mode 100644 index 00000000000..b01e5a3abee --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/UnlitURP.txt @@ -0,0 +1,58 @@ +Shader "Custom/#SCRIPTNAME#" +{ + Properties + { + [MainColor] _BaseColor("Base Color", Color) = (1, 1, 1, 1) + [MainTexture] _BaseMap("Base Map", 2D) = "white" + } + + SubShader + { + Tags { "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" } + + Pass + { + HLSLPROGRAM + + #pragma vertex vert + #pragma fragment frag + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + + struct Attributes + { + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionHCS : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + TEXTURE2D(_BaseMap); + SAMPLER(sampler_BaseMap); + + CBUFFER_START(UnityPerMaterial) + half4 _BaseColor; + float4 _BaseMap_ST; + CBUFFER_END + + Varyings vert(Attributes IN) + { + Varyings OUT; + OUT.positionHCS = TransformObjectToHClip(IN.positionOS.xyz); + OUT.uv = TRANSFORM_TEX(IN.uv, _BaseMap); + return OUT; + } + + half4 frag(Varyings IN) : SV_Target + { + half4 color = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, IN.uv) * _BaseColor; + return color; + } + ENDHLSL + } + } +} diff --git a/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/UnlitURP.txt.meta b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/UnlitURP.txt.meta new file mode 100644 index 00000000000..2186adceecb --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Editor/ScriptTemplates/UnlitURP.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4796721ff66d641078403679f98f5dbb +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.render-pipelines.universal/Editor/Settings/.buginfo b/Packages/com.unity.render-pipelines.universal/Editor/Settings/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/Settings/.buginfo +++ b/Packages/com.unity.render-pipelines.universal/Editor/Settings/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Editor/ShaderBuildPreprocessor.cs b/Packages/com.unity.render-pipelines.universal/Editor/ShaderBuildPreprocessor.cs index 635cdc138f3..1c5eea9b97c 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/ShaderBuildPreprocessor.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/ShaderBuildPreprocessor.cs @@ -603,11 +603,9 @@ internal static ShaderFeatures GetSupportedShaderFeaturesFromRenderers( if (rendererDataArray[rendererIndex] == null) continue; - // Get feature requirements from the renderer - // Always create a separate Renderer as we can be in a situation where there's no RP and they will not be disposed later on - ScriptableRenderer renderer = rendererDataArray[rendererIndex].InternalCreateRenderer(); + // Get feature requirements from the renderer data ScriptableRendererData rendererData = rendererDataArray[rendererIndex]; - RendererRequirements rendererRequirements = GetRendererRequirements(ref urpAsset, ref renderer, ref rendererData); + RendererRequirements rendererRequirements = GetRendererRequirements(ref urpAsset, ref rendererData); // Get & add Supported features from renderers used for Scriptable Stripping and prefiltering. ShaderFeatures rendererShaderFeatures = GetSupportedShaderFeaturesFromRenderer(ref rendererRequirements, ref rendererData, ref ssaoRendererFeatures, ref containsForwardRenderer, urpAssetShaderFeatures); @@ -617,13 +615,10 @@ internal static ShaderFeatures GetSupportedShaderFeaturesFromRenderers( everyRendererHasSSAO &= IsFeatureEnabled(rendererShaderFeatures, ShaderFeatures.ScreenSpaceOcclusion); // Check for completely removing 2D passes - s_Strip2DPasses &= renderer is not Renderer2D; + s_Strip2DPasses &= rendererData is not Renderer2DData; // Add the features from the renderer to the combined feature set for this URP Asset combinedURPAssetShaderFeatures |= rendererShaderFeatures; - - //Dispose a created Scriptable Renderer - renderer.Dispose(); } return combinedURPAssetShaderFeatures; @@ -640,23 +635,22 @@ internal static bool NeedsProceduralKeyword(ref RendererRequirements rendererReq } - internal static RendererRequirements GetRendererRequirements(ref UniversalRenderPipelineAsset urpAsset, ref ScriptableRenderer renderer, ref ScriptableRendererData rendererData) + internal static RendererRequirements GetRendererRequirements(ref UniversalRenderPipelineAsset urpAsset, ref ScriptableRendererData rendererData) { - UniversalRenderer universalRenderer = renderer as UniversalRenderer; UniversalRendererData universalRendererData = rendererData as UniversalRendererData; RendererRequirements rsd = new(); - rsd.isUniversalRenderer = universalRendererData != null && universalRenderer != null; + rsd.isUniversalRenderer = universalRendererData != null; rsd.msaaSampleCount = urpAsset.msaaSampleCount; rsd.renderingMode = rsd.isUniversalRenderer ? universalRendererData.renderingMode : RenderingMode.Forward; rsd.needsMainLightShadows = urpAsset.supportsMainLightShadows && urpAsset.mainLightRenderingMode == LightRenderingMode.PerPixel; rsd.needsAdditionalLightShadows = urpAsset.supportsAdditionalLightShadows && (urpAsset.additionalLightsRenderingMode == LightRenderingMode.PerPixel || rsd.renderingMode == RenderingMode.ForwardPlus); rsd.needsSoftShadows = urpAsset.supportsSoftShadows && (rsd.needsMainLightShadows || rsd.needsAdditionalLightShadows); rsd.needsSoftShadowsQualityLevels = rsd.needsSoftShadows && s_UseSoftShadowQualityLevelKeywords; - rsd.needsShadowsOff = !renderer.stripShadowsOffVariants; - rsd.needsAdditionalLightsOff = s_KeepOffVariantForAdditionalLights || !renderer.stripAdditionalLightOffVariants; + rsd.needsShadowsOff = !rendererData.stripShadowsOffVariants; + rsd.needsAdditionalLightsOff = s_KeepOffVariantForAdditionalLights || !rendererData.stripAdditionalLightOffVariants; rsd.needsGBufferRenderingLayers = (rsd.isUniversalRenderer && rsd.needsDeferredLighting && urpAsset.useRenderingLayers); - rsd.needsGBufferAccurateNormals = (rsd.isUniversalRenderer && rsd.needsDeferredLighting && universalRenderer.accurateGbufferNormals); + rsd.needsGBufferAccurateNormals = (rsd.isUniversalRenderer && rsd.needsDeferredLighting && (universalRendererData.renderingMode == RenderingMode.Deferred || universalRendererData.renderingMode == RenderingMode.DeferredPlus) && universalRendererData.accurateGbufferNormals); rsd.needsRenderPass = (rsd.isUniversalRenderer && rsd.needsDeferredLighting); rsd.needsReflectionProbeBlending = urpAsset.reflectionProbeBlending; rsd.needsReflectionProbeBoxProjection = urpAsset.reflectionProbeBoxProjection; @@ -808,10 +802,8 @@ internal static ShaderFeatures GetSupportedShaderFeaturesFromRendererFeatures(re ScreenSpaceShadows sssFeature = rendererFeature as ScreenSpaceShadows; if (sssFeature != null) { - // Add it if it's enabled or if unused variants should not be stripped... - if (sssFeature.isActive) - shaderFeatures |= ShaderFeatures.ScreenSpaceShadows; - + // The feature is active (Tested a few lines above) + shaderFeatures |= ShaderFeatures.ScreenSpaceShadows; continue; } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/2D/Light2D.cs b/Packages/com.unity.render-pipelines.universal/Runtime/2D/Light2D.cs index fb7cca46bf5..f94e4451e46 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/2D/Light2D.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/2D/Light2D.cs @@ -484,11 +484,13 @@ internal Matrix4x4 GetMatrix() private void Awake() { -#if UNITY_EDITOR // Default target sorting layers to "All" if (m_ApplyToSortingLayers == null) - m_ApplyToSortingLayers = SortingLayer.layers.Select(x => x.id).ToArray(); -#endif + { + m_ApplyToSortingLayers = new int[SortingLayer.layers.Length]; + for (int i = 0; i < m_ApplyToSortingLayers.Length; ++i) + m_ApplyToSortingLayers[i] = SortingLayer.layers[i].id; + } } void OnEnable() diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/2D/Renderer2D.cs b/Packages/com.unity.render-pipelines.universal/Runtime/2D/Renderer2D.cs index 37ea0047a97..d8a484bd5f9 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/2D/Renderer2D.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/2D/Renderer2D.cs @@ -405,7 +405,7 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re // Don't resolve during post processing if there are passes after or pixel perfect camera is used bool pixelPerfectCameraEnabled = ppc != null && ppc.enabled; bool hasCaptureActions = cameraData.captureActions != null && lastCameraInStack; - bool resolvePostProcessingToCameraTarget = !hasCaptureActions && !hasPassesAfterPostProcessing && !requireFinalPostProcessPass && !pixelPerfectCameraEnabled; + bool resolvePostProcessingToCameraTarget = lastCameraInStack && !hasCaptureActions && !hasPassesAfterPostProcessing && !requireFinalPostProcessPass && !pixelPerfectCameraEnabled; if (hasPostProcess) { @@ -529,14 +529,9 @@ internal override void EnableSwapBufferMSAA(bool enable) m_ColorBufferSystem.EnableMSAA(enable); } - internal static bool IsGLDevice() + internal static bool IsGLESDevice() { - return SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLES3 || SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLCore; - } - - internal static bool supportsMRT - { - get => !IsGLDevice(); + return SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLES3; } internal override bool supportsNativeRenderPassRendergraphCompiler => true; diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/2D/Rendergraph/DrawLight2DPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/2D/Rendergraph/DrawLight2DPass.cs index 463a2d7881c..e38054e62a8 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/2D/Rendergraph/DrawLight2DPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/2D/Rendergraph/DrawLight2DPass.cs @@ -8,11 +8,9 @@ namespace UnityEngine.Rendering.Universal internal class DrawLight2DPass : ScriptableRenderPass { static readonly string k_LightPass = "Light2D Pass"; - static readonly string k_LightLowLevelPass = "Light2D LowLevelPass"; static readonly string k_LightVolumetricPass = "Light2D Volumetric Pass"; private static readonly ProfilingSampler m_ProfilingSampler = new ProfilingSampler(k_LightPass); - internal static readonly ProfilingSampler m_ProfilingSamplerLowLevel = new ProfilingSampler(k_LightLowLevelPass); private static readonly ProfilingSampler m_ProfilingSamplerVolume = new ProfilingSampler(k_LightVolumetricPass); internal static readonly int k_InverseHDREmulationScaleID = Shader.PropertyToID("_InverseHDREmulationScale"); internal static readonly string k_NormalMapID = "_NormalMap"; @@ -129,84 +127,6 @@ private static void Execute(RasterCommandBuffer cmd, PassData passData, ref Laye } } - internal static void ExecuteUnsafe(UnsafeCommandBuffer cmd, PassData passData, ref LayerBatch layerBatch, List lights) - { - cmd.SetGlobalFloat(k_InverseHDREmulationScaleID, 1.0f / passData.rendererData.hdrEmulationScale); - - for (var i = 0; i < layerBatch.activeBlendStylesIndices.Length; ++i) - { - var blendStyleIndex = layerBatch.activeBlendStylesIndices[i]; - var blendOpName = passData.rendererData.lightBlendStyles[blendStyleIndex].name; - cmd.BeginSample(blendOpName); - - if (!Renderer2D.supportsMRT && !passData.isVolumetric) - cmd.SetRenderTarget(passData.lightTextures[i]); - - var indicesIndex = Renderer2D.supportsMRT ? i : 0; - if (!passData.isVolumetric) - RendererLighting.EnableBlendStyle(cmd, indicesIndex, true); - - for (int j = 0; j < lights.Count; ++j) - { - var light = lights[j]; - - // Check if light is valid - if (light == null || - light.lightType == Light2D.LightType.Global || - light.blendStyleIndex != blendStyleIndex) - continue; - - // Check if light is volumetric - if (passData.isVolumetric && - (light.volumeIntensity <= 0.0f || - !light.volumetricEnabled || - layerBatch.endLayerValue != light.GetTopMostLitLayer())) - continue; - - var lightMaterial = passData.rendererData.GetLightMaterial(light, passData.isVolumetric); - var lightMesh = light.lightMesh; - - // For Batching. - var index = light.batchSlotIndex; - var slotIndex = RendererLighting.lightBatch.SlotIndex(index); - bool canBatch = RendererLighting.lightBatch.CanBatch(light, lightMaterial, index, out int lightHash); - - //bool breakBatch = !canBatch; - //if (breakBatch && LightBatch.isBatchingSupported) - // RendererLighting.lightBatch.Flush(cmd); - - if (passData.layerBatch.lightStats.useNormalMap) - s_PropertyBlock.SetTexture(k_NormalMapID, passData.normalMap); - - var useShadows = passData.layerBatch.lightStats.useShadows && layerBatch.shadowIndices.Contains(j); - if (useShadows && TryGetShadowIndex(ref layerBatch, j, out var shadowIndex)) - s_PropertyBlock.SetTexture(k_ShadowMapID, passData.shadowTextures[shadowIndex]); - - if (!passData.isVolumetric || (passData.isVolumetric && light.volumetricEnabled)) - RendererLighting.SetCookieShaderProperties(light, s_PropertyBlock); - - // Set shader global properties - RendererLighting.SetPerLightShaderGlobals(cmd, light, slotIndex, passData.isVolumetric, useShadows, LightBatch.isBatchingSupported); - - if (light.normalMapQuality != Light2D.NormalMapQuality.Disabled || light.lightType == Light2D.LightType.Point) - RendererLighting.SetPerPointLightShaderGlobals(cmd, light, slotIndex, LightBatch.isBatchingSupported); - - if (LightBatch.isBatchingSupported) - { - //RendererLighting.lightBatch.AddBatch(light, lightMaterial, light.GetMatrix(), lightMesh, 0, lightHash, index); - //RendererLighting.lightBatch.Flush(cmd); - } - else - { - cmd.DrawMesh(lightMesh, light.GetMatrix(), lightMaterial, 0, 0, s_PropertyBlock); - } - } - - RendererLighting.EnableBlendStyle(cmd, indicesIndex, false); - cmd.EndSample(blendOpName); - } - } - internal class PassData { internal LayerBatch layerBatch; @@ -230,91 +150,45 @@ public void Render(RenderGraph graph, ContextContainer frameData, Renderer2DData isVolumetric && !layerBatch.lightStats.useVolumetricLights) return; - // OpenGL has a bug with MRTs - support single RTs by using low level pass - if (!isVolumetric && Renderer2D.IsGLDevice()) - { - using (var builder = graph.AddUnsafePass( k_LightLowLevelPass, out var passData, m_ProfilingSamplerLowLevel)) - { - intermediateTexture[0] = commonResourceData.activeColorTexture; - passData.lightTextures = universal2DResourceData.lightTextures[batchIndex]; - - for (var i = 0; i < passData.lightTextures.Length; i++) - builder.UseTexture(passData.lightTextures[i], AccessFlags.Write); - - if (layerBatch.lightStats.useNormalMap) - builder.UseTexture(universal2DResourceData.normalsTexture[batchIndex]); - - if (layerBatch.lightStats.useShadows) - { - passData.shadowTextures = universal2DResourceData.shadowTextures[batchIndex]; - for (var i = 0; i < passData.shadowTextures.Length; i++) - builder.UseTexture(passData.shadowTextures[i]); - } - - foreach (var light in layerBatch.lights) - { - if (light == null || !light.m_CookieSpriteTextureHandle.IsValid()) - continue; - - if (!isVolumetric || (isVolumetric && light.volumetricEnabled)) - builder.UseTexture(light.m_CookieSpriteTextureHandle); - } - - passData.layerBatch = layerBatch; - passData.rendererData = rendererData; - passData.isVolumetric = isVolumetric; - passData.normalMap = layerBatch.lightStats.useNormalMap ? universal2DResourceData.normalsTexture[batchIndex] : TextureHandle.nullHandle; - - builder.AllowGlobalStateModification(true); - - builder.SetRenderFunc((PassData data, UnsafeGraphContext context) => - { - ExecuteUnsafe(context.cmd, data, ref data.layerBatch, data.layerBatch.lights); - }); - } - } // Default Raster Pass with MRTs - else + using (var builder = graph.AddRasterRenderPass(!isVolumetric ? k_LightPass : k_LightVolumetricPass, out var passData, !isVolumetric ? m_ProfilingSampler : m_ProfilingSamplerVolume)) { - using (var builder = graph.AddRasterRenderPass(!isVolumetric ? k_LightPass : k_LightVolumetricPass, out var passData, !isVolumetric ? m_ProfilingSampler : m_ProfilingSamplerVolume)) - { - intermediateTexture[0] = commonResourceData.activeColorTexture; - var lightTextures = !isVolumetric ? universal2DResourceData.lightTextures[batchIndex] : intermediateTexture; + intermediateTexture[0] = commonResourceData.activeColorTexture; + var lightTextures = !isVolumetric ? universal2DResourceData.lightTextures[batchIndex] : intermediateTexture; - for (var i = 0; i < lightTextures.Length; i++) - builder.SetRenderAttachment(lightTextures[i], i); + for (var i = 0; i < lightTextures.Length; i++) + builder.SetRenderAttachment(lightTextures[i], i); - if (layerBatch.lightStats.useNormalMap) - builder.UseTexture(universal2DResourceData.normalsTexture[batchIndex]); + if (layerBatch.lightStats.useNormalMap) + builder.UseTexture(universal2DResourceData.normalsTexture[batchIndex]); - if (layerBatch.lightStats.useShadows) - { - passData.shadowTextures = universal2DResourceData.shadowTextures[batchIndex]; - for (var i = 0; i < passData.shadowTextures.Length; i++) - builder.UseTexture(passData.shadowTextures[i]); - } + if (layerBatch.lightStats.useShadows) + { + passData.shadowTextures = universal2DResourceData.shadowTextures[batchIndex]; + for (var i = 0; i < passData.shadowTextures.Length; i++) + builder.UseTexture(passData.shadowTextures[i]); + } - foreach (var light in layerBatch.lights) - { - if (light == null || !light.m_CookieSpriteTextureHandle.IsValid()) - continue; + foreach (var light in layerBatch.lights) + { + if (light == null || !light.m_CookieSpriteTextureHandle.IsValid()) + continue; - if (!isVolumetric || (isVolumetric && light.volumetricEnabled)) - builder.UseTexture(light.m_CookieSpriteTextureHandle); - } + if (!isVolumetric || (isVolumetric && light.volumetricEnabled)) + builder.UseTexture(light.m_CookieSpriteTextureHandle); + } - passData.layerBatch = layerBatch; - passData.rendererData = rendererData; - passData.isVolumetric = isVolumetric; - passData.normalMap = layerBatch.lightStats.useNormalMap ? universal2DResourceData.normalsTexture[batchIndex] : TextureHandle.nullHandle; + passData.layerBatch = layerBatch; + passData.rendererData = rendererData; + passData.isVolumetric = isVolumetric; + passData.normalMap = layerBatch.lightStats.useNormalMap ? universal2DResourceData.normalsTexture[batchIndex] : TextureHandle.nullHandle; - builder.AllowGlobalStateModification(true); + builder.AllowGlobalStateModification(true); - builder.SetRenderFunc((PassData data, RasterGraphContext context) => - { - Execute(context.cmd, data, ref data.layerBatch); - }); - } + builder.SetRenderFunc((PassData data, RasterGraphContext context) => + { + Execute(context.cmd, data, ref data.layerBatch); + }); } } } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/2D/Rendergraph/Renderer2DRendergraph.cs b/Packages/com.unity.render-pipelines.universal/Runtime/2D/Rendergraph/Renderer2DRendergraph.cs index 1448578b59d..30d6df63dc4 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/2D/Rendergraph/Renderer2DRendergraph.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/2D/Rendergraph/Renderer2DRendergraph.cs @@ -143,7 +143,7 @@ ImportResourceSummary GetImportResourceSummary(RenderGraph renderGraph, Universa output.importInfo.height = Screen.height; output.importInfo.volumeDepth = 1; output.importInfo.msaaSamples = numSamples; - output.importInfo.format = UniversalRenderPipeline.MakeRenderTextureGraphicsFormat(cameraData.isHdrEnabled, cameraData.hdrColorBufferPrecision, Graphics.preserveFramebufferAlpha); + output.importInfo.format = cameraData.cameraTargetDescriptor.graphicsFormat; output.importInfoDepth = output.importInfo; output.importInfoDepth.format = SystemInfo.GetGraphicsFormat(DefaultFormat.DepthStencil); @@ -278,16 +278,21 @@ void CreateResources(RenderGraph renderGraph) var depthDescriptor = cameraData.cameraTargetDescriptor; depthDescriptor.useMipMap = false; depthDescriptor.autoGenerateMips = false; - depthDescriptor.bindMS = false; bool hasMSAA = depthDescriptor.msaaSamples > 1 && (SystemInfo.supportsMultisampledTextures != 0); bool resolveDepth = RenderingUtils.MultisampleDepthResolveSupported() && renderGraph.nativeRenderPassesEnabled; - if (m_CopyDepthPass != null) - m_CopyDepthPass.m_CopyResolvedDepth = resolveDepth; + depthDescriptor.bindMS = !resolveDepth && hasMSAA; + + // binding MS surfaces is not supported by the GLES backend + if (IsGLESDevice()) + depthDescriptor.bindMS = false; - if (hasMSAA) - depthDescriptor.bindMS = !resolveDepth; + if (m_CopyDepthPass != null) + { + m_CopyDepthPass.MsaaSamples = depthDescriptor.msaaSamples; + m_CopyDepthPass.m_CopyResolvedDepth = !depthDescriptor.bindMS; + } depthDescriptor.graphicsFormat = GraphicsFormat.None; depthDescriptor.depthStencilFormat = CoreUtils.GetDefaultDepthStencilFormat(); diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/2D/Shadows/ShadowRendering.cs b/Packages/com.unity.render-pipelines.universal/Runtime/2D/Shadows/ShadowRendering.cs index 5196e1a5698..a7e48f68589 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/2D/Shadows/ShadowRendering.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/2D/Shadows/ShadowRendering.cs @@ -14,10 +14,14 @@ namespace UnityEngine.Rendering.Universal { // TODO: Culling of shadow casters, rotate color channels for shadow casting, check get material functions. - - internal static class ShadowRendering { + internal enum ShadowTestType + { + Always, + Unshadow, + } + private static readonly int k_LightPosID = Shader.PropertyToID("_LightPos"); private static readonly int k_ShadowRadiusID = Shader.PropertyToID("_ShadowRadius"); private static readonly int k_ShadowColorMaskID = Shader.PropertyToID("_ShadowColorMask"); @@ -351,11 +355,11 @@ internal static void SetGlobalShadowProp(IRasterCommandBuffer cmdBuffer) static bool ShadowCasterIsVisible(ShadowCaster2D shadowCaster) { - #if UNITY_EDITOR - return SceneVisibilityManager.instance == null ? true : !SceneVisibilityManager.instance.IsHidden(shadowCaster.gameObject); - #else +#if UNITY_EDITOR + return SceneVisibilityManager.instance == null ? true : !SceneVisibilityManager.instance.IsHidden(shadowCaster.gameObject); +#else return true; - #endif +#endif } static Renderer GetRendererFromCaster(ShadowCaster2D shadowCaster, Light2D light, int layerToRender) @@ -373,21 +377,23 @@ static Renderer GetRendererFromCaster(ShadowCaster2D shadowCaster, Light2D light return renderer; } - private static void RenderProjectedShadows(UnsafeCommandBuffer cmdBuffer, int layerToRender, Light2D light, List shadowCasters, Material projectedShadowsMaterial, int pass) + private static void RenderProjectedShadows(UnsafeCommandBuffer cmdBuffer, int layerToRender, Light2D light, List shadowCasters, Material projectedShadowsMaterial, int pass, ShadowTestType shadowTestType) { // Draw the projected shadows for the shadow caster group. Writing into the group stencil buffer bit for (var i = 0; i < shadowCasters.Count; i++) { var shadowCaster = shadowCasters[i]; - - if (ShadowCasterIsVisible(shadowCaster) && shadowCaster.castsShadows && shadowCaster.IsLit(light)) + if (ShadowTest(shadowTestType, shadowCaster)) { - if (shadowCaster != null && projectedShadowsMaterial != null && shadowCaster.IsShadowedLayer(layerToRender)) + if (ShadowCasterIsVisible(shadowCaster) && shadowCaster.castsShadows && shadowCaster.IsLit(light)) { - if (shadowCaster.shadowCastingSource != ShadowCaster2D.ShadowCastingSources.None && shadowCaster.mesh != null) + if (shadowCaster != null && projectedShadowsMaterial != null && shadowCaster.IsShadowedLayer(layerToRender)) { - SetShadowProjectionGlobals(cmdBuffer, shadowCaster, light); - cmdBuffer.DrawMesh(shadowCaster.mesh, shadowCaster.transform.localToWorldMatrix, projectedShadowsMaterial, 0, pass); + if (shadowCaster.shadowCastingSource != ShadowCaster2D.ShadowCastingSources.None && shadowCaster.mesh != null) + { + SetShadowProjectionGlobals(cmdBuffer, shadowCaster, light); + cmdBuffer.DrawMesh(shadowCaster.mesh, shadowCaster.transform.localToWorldMatrix, projectedShadowsMaterial, 0, pass); + } } } } @@ -398,101 +404,82 @@ static int GetRendererSubmeshes(Renderer renderer, ShadowCaster2D shadowCaster2D { int numberOfSubmeshes; - #if USING_SPRITESHAPE - if (renderer is SpriteShapeRenderer) - { - SpriteShapeRenderer spriteShapeRenderer = (SpriteShapeRenderer)renderer; - numberOfSubmeshes = spriteShapeRenderer.GetSplineMeshCount(); - } - else - { - numberOfSubmeshes = shadowCaster2D.spriteMaterialCount; - } - #else +#if USING_SPRITESHAPE + if (renderer is SpriteShapeRenderer) + { + SpriteShapeRenderer spriteShapeRenderer = (SpriteShapeRenderer)renderer; + numberOfSubmeshes = spriteShapeRenderer.GetSplineMeshCount(); + } + else + { + numberOfSubmeshes = shadowCaster2D.spriteMaterialCount; + } +#else numberOfSubmeshes = shadowCaster2D.spriteMaterialCount; - #endif +#endif return numberOfSubmeshes; } - private static void RenderSelfShadowOption(UnsafeCommandBuffer cmdBuffer, int layerToRender, Light2D light, List shadowCasters, Material projectedUnshadowMaterial, Material spriteShadowMaterial, Material spriteUnshadowMaterial, Material geometryShadowMaterial, Material geometryUnshadowMaterial) + private static void RenderSpriteShadow(UnsafeCommandBuffer cmdBuffer, int layerToRender, Light2D light, List shadowCasters, Material spriteShadowMaterial, Material spriteUnshadowMaterial, Material geometryShadowMaterial, Material geometryUnshadowMaterial, int pass, ShadowTestType shadowTestType) { - // Draw the sprites, either as self shadowing or unshadowing + //Draw the sprites, either as self shadowing or unshadowing for (var i = 0; i < shadowCasters.Count; i++) { ShadowCaster2D shadowCaster = shadowCasters[i]; - if (!shadowCaster.IsLit(light)) - continue; + if (ShadowTest(shadowTestType, shadowCaster)) + { + if (!shadowCaster.IsLit(light)) + continue; - Renderer renderer = GetRendererFromCaster(shadowCaster, light, layerToRender); + Renderer renderer = GetRendererFromCaster(shadowCaster, light, layerToRender); - cmdBuffer.SetGlobalFloat(k_ShadowAlphaCutoffID, shadowCaster.alphaCutoff); + cmdBuffer.SetGlobalFloat(k_ShadowAlphaCutoffID, shadowCaster.alphaCutoff); - if (renderer != null) - { - if (ShadowCasterIsVisible(shadowCaster) && shadowCaster.selfShadows) - { - int numberOfSubmeshes = GetRendererSubmeshes(renderer, shadowCaster); - for (int submeshIndex = 0; submeshIndex < numberOfSubmeshes; submeshIndex++) - cmdBuffer.DrawRenderer(renderer, spriteShadowMaterial, submeshIndex, 0); - } - else + if (renderer != null) { - int numberOfSubmeshes = GetRendererSubmeshes(renderer, shadowCaster); - for (int submeshIndex = 0; submeshIndex < numberOfSubmeshes; submeshIndex++) + if (ShadowCasterIsVisible(shadowCaster) && shadowCaster.selfShadows) { - cmdBuffer.DrawRenderer(renderer, spriteUnshadowMaterial, submeshIndex, 0); - + int numberOfSubmeshes = GetRendererSubmeshes(renderer, shadowCaster); + for (int submeshIndex = 0; submeshIndex < numberOfSubmeshes; submeshIndex++) + cmdBuffer.DrawRenderer(renderer, spriteShadowMaterial, submeshIndex, pass); } - } - } - else - { - if (shadowCaster.mesh != null) - { - if (ShadowCasterIsVisible(shadowCaster) && shadowCaster.selfShadows) - cmdBuffer.DrawMesh(shadowCaster.mesh, shadowCaster.transform.localToWorldMatrix, geometryShadowMaterial, 0, 0); else - cmdBuffer.DrawMesh(shadowCaster.mesh, shadowCaster.transform.localToWorldMatrix, geometryUnshadowMaterial, 0, 0); - } - } - } - - // Draw a masked projected shadow that is inside the sprite to remove the shadow (on different channel) - for (var i = 0; i < shadowCasters.Count; i++) - { - ShadowCaster2D shadowCaster = shadowCasters[i]; - if (ShadowCasterIsVisible(shadowCaster) && shadowCaster.IsLit(light) && shadowCaster.castingOption == ShadowCaster2D.ShadowCastingOptions.CastShadow && shadowCaster.mesh != null) - { - SetShadowProjectionGlobals(cmdBuffer, shadowCaster, light); - cmdBuffer.DrawMesh(shadowCaster.mesh, shadowCaster.transform.localToWorldMatrix, projectedUnshadowMaterial, 0, 1); - } - } - - // Fix up shadow removal with transparency - for (var i = 0; i < shadowCasters.Count; i++) - { - ShadowCaster2D shadowCaster = shadowCasters[i]; - if (ShadowCasterIsVisible(shadowCaster) && !shadowCaster.selfShadows && shadowCaster.IsLit(light)) - { - Renderer renderer = GetRendererFromCaster(shadowCaster, light, layerToRender); - if (renderer != null) - { - int numberOfSubmeshes = GetRendererSubmeshes(renderer, shadowCaster); - for (int submeshIndex = 0; submeshIndex < numberOfSubmeshes; submeshIndex++) { - cmdBuffer.DrawRenderer(renderer, spriteUnshadowMaterial, submeshIndex, 1); + int numberOfSubmeshes = GetRendererSubmeshes(renderer, shadowCaster); + for (int submeshIndex = 0; submeshIndex < numberOfSubmeshes; submeshIndex++) + { + cmdBuffer.DrawRenderer(renderer, spriteUnshadowMaterial, submeshIndex, pass); + + } } } else { - if(shadowCaster.mesh != null) - cmdBuffer.DrawMesh(shadowCaster.mesh, shadowCaster.transform.localToWorldMatrix, geometryUnshadowMaterial, 0, 1); + if (shadowCaster.mesh != null) + { + if (ShadowCasterIsVisible(shadowCaster) && shadowCaster.selfShadows) + cmdBuffer.DrawMesh(shadowCaster.mesh, shadowCaster.transform.localToWorldMatrix, geometryShadowMaterial, 0, pass); + else + cmdBuffer.DrawMesh(shadowCaster.mesh, shadowCaster.transform.localToWorldMatrix, geometryUnshadowMaterial, 0, pass); + } } } } } + internal static bool ShadowTest(ShadowTestType shadowTestType, ShadowCaster2D shadowCaster) + { + // This is just being done because using delegates are creating garbage and my tests are failing + if(shadowTestType == ShadowTestType.Always) + return true; + else if(shadowTestType == ShadowTestType.Unshadow) + return !shadowCaster.selfShadows; + + return false; + } + + private static void RenderShadows(UnsafeCommandBuffer cmdBuffer, Renderer2DData rendererData, ref LayerBatch layer, Light2D light) { using (new ProfilingScope(cmdBuffer, m_ProfilingSamplerShadows)) @@ -510,15 +497,19 @@ private static void RenderShadows(UnsafeCommandBuffer cmdBuffer, Renderer2DData var geometryShadowMaterial = rendererData.GetGeometryShadowMaterial(); var geometryUnshadowMaterial = rendererData.GetGeometryUnshadowMaterial(); + for (var group = 0; group < layer.shadowCasters.Count; group++) { var shadowCasters = layer.shadowCasters[group].GetShadowCasters(); - // Draw the projected shadows for the shadow caster group. Only writes the composite stencil bit - RenderProjectedShadows(cmdBuffer, layer.startLayerID, light, shadowCasters, projectedShadowMaterial, 0); - // Render self shadowing or non self shadowing - RenderSelfShadowOption(cmdBuffer, layer.startLayerID, light, shadowCasters, projectedUnshadowMaterial, spriteShadowMaterial, spriteUnshadowMaterial, geometryShadowMaterial, geometryUnshadowMaterial); + RenderSpriteShadow(cmdBuffer, layer.startLayerID, light, shadowCasters, spriteShadowMaterial, spriteUnshadowMaterial, geometryShadowMaterial, geometryUnshadowMaterial, 0, ShadowTestType.Always); + // Draw the projected shadows for the shadow caster group. Only writes the composite stencil bit + RenderProjectedShadows(cmdBuffer, layer.startLayerID, light, shadowCasters, projectedShadowMaterial, 0, ShadowTestType.Always); + // Draw the projected shadows for the shadow caster group. Only writes the composite stencil bit + RenderProjectedShadows(cmdBuffer, layer.startLayerID, light, shadowCasters, projectedShadowMaterial, 1, ShadowTestType.Unshadow); + //Render self shadowing or non self shadowing + RenderSpriteShadow(cmdBuffer, layer.startLayerID, light, shadowCasters, spriteShadowMaterial, spriteUnshadowMaterial, geometryShadowMaterial, geometryUnshadowMaterial, 1, ShadowTestType.Unshadow); } } } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Data/PostProcessData.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Data/PostProcessData.cs index c9a8be88342..c2346d4949f 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Data/PostProcessData.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Data/PostProcessData.cs @@ -1,8 +1,12 @@ +using System; +using System.Diagnostics.CodeAnalysis; +using System.IO; + #if UNITY_EDITOR using UnityEditor; using UnityEditor.ProjectWindowCallback; +using System.Reflection; #endif -using System; namespace UnityEngine.Rendering.Universal { @@ -15,14 +19,13 @@ namespace UnityEngine.Rendering.Universal public class PostProcessData : ScriptableObject { #if UNITY_EDITOR - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1812")] + [SuppressMessage("Microsoft.Performance", "CA1812")] internal class CreatePostProcessDataAsset : EndNameEditAction { public override void Action(int instanceId, string pathName, string resourceFile) { var instance = CreateInstance(); AssetDatabase.CreateAsset(instance, pathName); - ResourceReloader.ReloadAllNullIn(instance, UniversalRenderPipelineAsset.packagePath); Selection.activeObject = instance; } } @@ -35,131 +38,207 @@ static void CreatePostProcessData() internal static PostProcessData GetDefaultPostProcessData() { - var path = System.IO.Path.Combine(UniversalRenderPipelineAsset.packagePath, "Runtime/Data/PostProcessData.asset"); + var path = Path.Combine(UniversalRenderPipelineAsset.packagePath, "Runtime/Data/PostProcessData.asset"); return AssetDatabase.LoadAssetAtPath(path); } + internal void Reset() + { + LoadResources(true); + } + + internal void Populate() + { + LoadResources(false); + } + + void LoadResources(bool reset) + { + if (GraphicsSettings.TryGetRenderPipelineSettings(out var defaultShaderResources)) + { + if (shaders == null || reset) + shaders = new ShaderResources(); + + shaders.Populate(defaultShaderResources); + } + + if (GraphicsSettings.TryGetRenderPipelineSettings(out var defaultTextureResources)) + { + if (textures == null || reset) + textures = new TextureResources(); + + textures.Populate(defaultTextureResources); + } + } + #endif /// /// Class containing shader resources used for Post Processing in URP. /// - [Serializable, ReloadGroup] - public sealed class ShaderResources + [Serializable] + [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))] + [Categorization.CategoryInfo(Name = "R: Default PostProcess Shaders", Order = 1000)] + [Categorization.ElementInfo(Order = 0), HideInInspector] + public sealed class ShaderResources : IRenderPipelineResources { /// /// The StopNan Post Processing shader. /// - [Reload("Shaders/PostProcessing/StopNaN.shader")] + [ResourcePath("Shaders/PostProcessing/StopNaN.shader")] public Shader stopNanPS; /// /// The SubpixelMorphologicalAntiAliasing SMAA Post Processing shader. /// - [Reload("Shaders/PostProcessing/SubpixelMorphologicalAntialiasing.shader")] + [ResourcePath("Shaders/PostProcessing/SubpixelMorphologicalAntialiasing.shader")] public Shader subpixelMorphologicalAntialiasingPS; /// /// The Gaussian Depth Of Field Post Processing shader. /// - [Reload("Shaders/PostProcessing/GaussianDepthOfField.shader")] + [ResourcePath("Shaders/PostProcessing/GaussianDepthOfField.shader")] public Shader gaussianDepthOfFieldPS; /// /// The Bokeh Depth Of Field Post Processing shader. /// - [Reload("Shaders/PostProcessing/BokehDepthOfField.shader")] + [ResourcePath("Shaders/PostProcessing/BokehDepthOfField.shader")] public Shader bokehDepthOfFieldPS; /// /// The Motion Blur Post Processing shader. /// - [Reload("Shaders/PostProcessing/CameraMotionBlur.shader")] + [ResourcePath("Shaders/PostProcessing/CameraMotionBlur.shader")] public Shader cameraMotionBlurPS; /// /// The Panini Projection Post Processing shader. /// - [Reload("Shaders/PostProcessing/PaniniProjection.shader")] + [ResourcePath("Shaders/PostProcessing/PaniniProjection.shader")] public Shader paniniProjectionPS; /// /// The LUT Builder LDR Post Processing shader. /// - [Reload("Shaders/PostProcessing/LutBuilderLdr.shader")] + [ResourcePath("Shaders/PostProcessing/LutBuilderLdr.shader")] public Shader lutBuilderLdrPS; /// /// The LUT Builder HDR Post Processing shader. /// - [Reload("Shaders/PostProcessing/LutBuilderHdr.shader")] + [ResourcePath("Shaders/PostProcessing/LutBuilderHdr.shader")] public Shader lutBuilderHdrPS; /// /// The Bloom Post Processing shader. /// - [Reload("Shaders/PostProcessing/Bloom.shader")] + [ResourcePath("Shaders/PostProcessing/Bloom.shader")] public Shader bloomPS; /// /// The Temporal-antialiasing Post Processing shader. /// - [Reload("Shaders/PostProcessing/TemporalAA.shader")] + [ResourcePath("Shaders/PostProcessing/TemporalAA.shader")] public Shader temporalAntialiasingPS; /// /// The Lens Flare Post Processing shader. /// - [Reload("Shaders/PostProcessing/LensFlareDataDriven.shader")] + [ResourcePath("Shaders/PostProcessing/LensFlareDataDriven.shader")] public Shader LensFlareDataDrivenPS; /// /// The Lens Flare Screen Space shader. /// - [Reload("Shaders/PostProcessing/LensFlareScreenSpace.shader")] + [ResourcePath("Shaders/PostProcessing/LensFlareScreenSpace.shader")] public Shader LensFlareScreenSpacePS; /// /// The Scaling Setup Post Processing shader. /// - [Reload("Shaders/PostProcessing/ScalingSetup.shader")] + [ResourcePath("Shaders/PostProcessing/ScalingSetup.shader")] public Shader scalingSetupPS; /// /// The Edge Adaptive Spatial Upsampling shader. /// - [Reload("Shaders/PostProcessing/EdgeAdaptiveSpatialUpsampling.shader")] + [ResourcePath("Shaders/PostProcessing/EdgeAdaptiveSpatialUpsampling.shader")] public Shader easuPS; /// /// The Uber Post Processing shader. /// - [Reload("Shaders/PostProcessing/UberPost.shader")] + [ResourcePath("Shaders/PostProcessing/UberPost.shader")] public Shader uberPostPS; /// /// The Final Post Processing shader. /// - [Reload("Shaders/PostProcessing/FinalPost.shader")] + [ResourcePath("Shaders/PostProcessing/FinalPost.shader")] public Shader finalPostPassPS; + +#if UNITY_EDITOR + /// + /// Copies all fields and resources from a source object into this object. + /// + /// + /// This method is available only in the Unity Editor. It uses the method to copy non-null field values. Use this to synchronize resource objects during runtime in the Editor. + /// + /// + /// The source object to copy data from. This object must not be null. + /// + internal void Populate(ShaderResources source) + { + CoreUtils.PopulateNullFieldsFrom(source, this); + } +#endif + + // This name must be unique within the entire PostProcessData set, as PostProcessDataAnalytics retrieves it. + [SerializeField][HideInInspector] int m_ShaderResourcesVersion = 0; + + /// + /// Gets the current version of the resource container. + /// + /// + /// This version is used exclusively for upgrading a project to ensure compatibility with resources configured in earlier Unity versions. Updating this version is an internal process during asset upgrades. + /// + /// + /// The version number of the resource container. This value is incremented when the resource container changes. + /// + public int version => m_ShaderResourcesVersion; + + /// + /// Indicates whether the resource is available in a player build. + /// + /// + /// Always returns `false` because this resource is not designed to be included in player builds. + /// + /// + /// `false`, indicating that the resource is editor-only and unavailable in a player build. + /// + public bool isAvailableInPlayerBuild => false; } /// /// Class containing texture resources used for Post Processing in URP. /// - [Serializable, ReloadGroup] - public sealed class TextureResources + [Serializable] + [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))] + [Categorization.CategoryInfo(Name = "R: Default PostProcess Textures", Order = 1000)] + [Categorization.ElementInfo(Order = 0), HideInInspector] + public sealed class TextureResources : IRenderPipelineResources { /// /// Pre-baked Blue noise textures. /// - [Reload("Textures/BlueNoise16/L/LDR_LLL1_{0}.png", 0, 32)] + [ResourceFormattedPaths("Textures/BlueNoise16/L/LDR_LLL1_{0}.png", 0, 32)] public Texture2D[] blueNoise16LTex; /// /// Film Grain textures. /// - [Reload(new[] + [ResourcePaths(new[] { "Textures/FilmGrain/Thin01.png", "Textures/FilmGrain/Thin02.png", @@ -177,14 +256,54 @@ public sealed class TextureResources /// /// SubpixelMorphologicalAntiAliasing SMAA area texture. /// - [Reload("Textures/SMAA/AreaTex.tga")] - public Texture2D smaaAreaTex; + [ResourcePath("Textures/SMAA/AreaTex.tga")] public Texture2D smaaAreaTex; /// /// SubpixelMorphologicalAntiAliasing SMAA search texture. /// - [Reload("Textures/SMAA/SearchTex.tga")] + [ResourcePath("Textures/SMAA/SearchTex.tga")] public Texture2D smaaSearchTex; + +#if UNITY_EDITOR + /// + /// Copies all fields and resources from a source object into this object. + /// + /// + /// This method is available only in the Unity Editor. It uses the method to copy non-null field values. Use this to synchronize resource objects during runtime in the Editor. + /// + /// + /// The source object to copy data from. This object must not be null. + /// + internal void Populate(TextureResources source) + { + CoreUtils.PopulateNullFieldsFrom(source, this); + } +#endif + + // This name must be unique within the entire PostProcessData set, as PostProcessDataAnalytics retrieves it. + [SerializeField][HideInInspector] int m_TexturesResourcesVersion = 0; + + /// + /// Gets the current version of the resource container. + /// + /// + /// This version is used exclusively for upgrading a project to ensure compatibility with resources configured in earlier Unity versions. Updating this version is an internal process during asset upgrades. + /// + /// + /// The version number of the resource container. This value is incremented when the resource container changes. + /// + public int version => m_TexturesResourcesVersion; + + /// + /// Indicates whether the resource is available in a player build. + /// + /// + /// Always returns `false` because this resource is not designed to be included in player builds. + /// + /// + /// `false`, indicating that the resource is editor-only and unavailable in a player build. + /// + public bool isAvailableInPlayerBuild => false; } /// @@ -197,4 +316,4 @@ public sealed class TextureResources /// public TextureResources textures; } -} +} \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Debug/.buginfo b/Packages/com.unity.render-pipelines.universal/Runtime/Debug/.buginfo index a8e3ae67ae4..272688b1879 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Debug/.buginfo +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Debug/.buginfo @@ -1 +1 @@ -area: Graphics Tools \ No newline at end of file +area: Graphics Debugging Tools \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Debug/DebugDisplaySettingsMaterial.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Debug/DebugDisplaySettingsMaterial.cs index caf2e458599..08cdaa7c5a3 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Debug/DebugDisplaySettingsMaterial.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Debug/DebugDisplaySettingsMaterial.cs @@ -353,7 +353,6 @@ static class Strings public static readonly NameAndTooltip MaterialValidationMode = new() { name = "Material Validation Mode", tooltip = "Debug and validate material properties." }; public static readonly NameAndTooltip RenderingLayersSelectedLight = new() { name = "Filter Rendering Layers by Light", tooltip = "Highlight Renderers affected by Selected Light" }; public static readonly NameAndTooltip SelectedLightShadowLayerMask = new() { name = "Use Light's Shadow Layer Mask", tooltip = "Highlight Renderers that cast shadows for the Selected Light" }; - public static readonly NameAndTooltip RenderingLayerColors = new() { name = "Layers Color", tooltip = "Select the display color for each Rendering Layer" }; public static readonly NameAndTooltip FilterRenderingLayerMask = new() { name = "Filter Layers", tooltip = "Use the dropdown to filter Rendering Layers that you want to visualize" }; public static readonly NameAndTooltip ValidationPreset = new() { name = "Validation Preset", tooltip = "Validate using a list of preset surfaces and inputs based on real-world surfaces." }; public static readonly NameAndTooltip AlbedoCustomColor = new() { name = "Target Color", tooltip = "Custom target color for albedo validation." }; @@ -415,13 +414,20 @@ internal static class WidgetFactory isHiddenCallback = () => !panel.data.renderingLayersSelectedLight }; - internal static DebugUI.Widget CreateFilterRenderingLayerMasks (SettingsPanel panel) => new DebugUI.MaskField + internal static DebugUI.RenderingLayerField CreateFilterRenderingLayerMasks(SettingsPanel panel) { - nameAndTooltip = Strings.FilterRenderingLayerMask, - getter = () => panel.data.renderingLayerMask, - setter = value => panel.data.renderingLayerMask = value, - isHiddenCallback = () => panel.data.renderingLayersSelectedLight - }; + var renderingLayersField = new DebugUI.RenderingLayerField() + { + nameAndTooltip = Strings.FilterRenderingLayerMask, + getter = () => panel.data.renderingLayerMask, + setter = value => panel.data.renderingLayerMask = value, + getRenderingLayerColor = index => panel.data.debugRenderingLayersColors[index], + setRenderingLayerColor = (value, index) => panel.data.debugRenderingLayersColors[index] = value, + isHiddenCallback = () => panel.data.renderingLayersSelectedLight + }; + + return renderingLayersField; + } internal static DebugUI.Widget CreateAlbedoPreset(SettingsPanel panel) => new DebugUI.EnumField { @@ -501,32 +507,6 @@ public SettingsPanel(DebugDisplaySettingsMaterial data) : base(data) { AddWidget(new DebugUI.RuntimeDebugShadersMessageBox()); - - DebugUI.MaskField filterRenderingLayerWidget = (DebugUI.MaskField)WidgetFactory.CreateFilterRenderingLayerMasks(this); - var renderingLayers = new List(); - for (int i = 0; i < 32; i++) - renderingLayers.Add($"Unused Rendering Layer {i}"); - var names = UnityEngine.RenderingLayerMask.GetDefinedRenderingLayerNames(); - for (int i = 0; i < names.Length; i++) - { - var index = UnityEngine.RenderingLayerMask.NameToRenderingLayer(names[i]); - renderingLayers[index] = names[i]; - } - filterRenderingLayerWidget.Fill(renderingLayers.ToArray()); - - var layersColor = new DebugUI.Foldout() { nameAndTooltip = Strings.RenderingLayerColors, flags = DebugUI.Flags.EditorOnly }; - for (int i = 0; i < renderingLayers.Count; i++) - { - int index = i; - layersColor.children.Add(new DebugUI.ColorField - { - displayName = renderingLayers[i], - flags = DebugUI.Flags.EditorOnly, - getter = () => this.data.debugRenderingLayersColors[index], - setter = value => this.data.debugRenderingLayersColors[index] = value - }); - } - AddWidget(new DebugUI.Foldout { displayName = "Material Filters", @@ -544,8 +524,7 @@ public SettingsPanel(DebugDisplaySettingsMaterial data) { WidgetFactory.CreateRenderingLayersSelectedLight(this), WidgetFactory.CreateSelectedLightShadowLayerMask(this), - filterRenderingLayerWidget, - layersColor, + WidgetFactory.CreateFilterRenderingLayerMasks(this), } }, WidgetFactory.CreateVertexAttribute(this) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Debug/UniversalRenderPipelineDebugDisplaySettings.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Debug/UniversalRenderPipelineDebugDisplaySettings.cs index 0eb94a0e954..41ae60b1743 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Debug/UniversalRenderPipelineDebugDisplaySettings.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Debug/UniversalRenderPipelineDebugDisplaySettings.cs @@ -85,7 +85,6 @@ public override bool IsPostProcessingAllowed ///
public UniversalRenderPipelineDebugDisplaySettings() { - Reset(); } /// @@ -97,7 +96,7 @@ public override void Reset() materialSettings = Add(new DebugDisplaySettingsMaterial()); lightingSettings = Add(new DebugDisplaySettingsLighting()); renderingSettings = Add(new DebugDisplaySettingsRendering()); - volumeSettings = Add(new DebugDisplaySettingsVolume(new UniversalRenderPipelineVolumeDebugSettings())); + volumeSettings = Add(new DebugDisplaySettingsVolume()); commonSettings = Add(new DebugDisplaySettingsCommon()); gpuResidentDrawerSettings = Add(new DebugDisplayGPUResidentDrawer()); diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Debug/UniversalRenderPipelineVolumeDebugSettings.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Debug/UniversalRenderPipelineVolumeDebugSettings.cs index cfaef672f02..c9ecec0c7c4 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Debug/UniversalRenderPipelineVolumeDebugSettings.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Debug/UniversalRenderPipelineVolumeDebugSettings.cs @@ -1,8 +1,11 @@ +using System; + namespace UnityEngine.Rendering.Universal { /// /// Volume debug settings. /// + [Obsolete("This is not longer supported Please use DebugDisplaySettingsVolume. #from(6000.2)", false)] public partial class UniversalRenderPipelineVolumeDebugSettings : VolumeDebugSettings { /// Selected camera volume stack. diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DBuffer/DBufferDepthCopyPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DBuffer/DBufferDepthCopyPass.cs index 8fb6c605a6d..6b6802001a5 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DBuffer/DBufferDepthCopyPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DBuffer/DBufferDepthCopyPass.cs @@ -21,24 +21,37 @@ public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer UniversalCameraData cameraData = frameData.Get(); var universalRenderer = cameraData.renderer as UniversalRenderer; - bool usesDeferredLighting = universalRenderer.usesDeferredLighting; + Debug.Assert(renderPassEvent < RenderPassEvent.BeforeRenderingGbuffer, "DBufferCopyDepthPass assumes the pipeline does a prepass and it is injected before opaque/gbuffer rendering."); + + var currentCameraDepthInfo = renderGraph.GetRenderTargetInfo(resourceData.activeDepthTexture); + + //Check if the active depth texture is already written to so we can use it bool useDepthPriming = universalRenderer.useDepthPriming; - bool isMsaa = cameraData.cameraTargetDescriptor.msaaSamples > 1; - // We must create a temporary depth buffer for dbuffer rendering if the existing one isn't compatible. - // The deferred path always has compatible depth - // The forward path only has compatible depth when depth priming is enabled without MSAA - bool hasCompatibleDepth = usesDeferredLighting || (useDepthPriming && !isMsaa); + //Check if the active depth texture is compabible with the other render targets that we'll use for the dbuffer pass + bool isMsaa = currentCameraDepthInfo.msaaSamples > 1; + + // We must create a temporary depth buffer for dbuffer rendering if the cameraDepth isn't compatible or was written to. + bool hasCompatibleDepth = useDepthPriming && !isMsaa; if (!hasCompatibleDepth) { + //Here we assume that when using depth priming, there is no prepass to the cameraDepthTexture but a copy, so that the texture is a color format. + var source = (useDepthPriming) ? resourceData.cameraDepth : resourceData.cameraDepthTexture; + + Debug.Assert(source.IsValid(), "DBufferCopyDepthPass needs a valid cameraDepth or cameraDepth texture to copy from. You might be using depth priming, with MSAA and direct to backbuffer rendering, which is not supported."); + Debug.Assert(GraphicsFormatUtility.IsDepthFormat(source.GetDescriptor(renderGraph).format), "DBufferCopyDepthPass assumes source has a depth format."); + var depthDesc = cameraData.cameraTargetDescriptor; depthDesc.graphicsFormat = GraphicsFormat.None; //Depth only rendering depthDesc.depthStencilFormat = cameraData.cameraTargetDescriptor.depthStencilFormat; depthDesc.msaaSamples = 1; resourceData.dBufferDepth = UniversalRenderer.CreateRenderGraphTexture(renderGraph, depthDesc, DBufferRenderPass.s_DBufferDepthName, true); - // Copy the current depth data into the new attachment - Render(renderGraph, resourceData.dBufferDepth, resourceData.cameraDepthTexture, resourceData, cameraData, false, "Copy DBuffer Depth"); + //The code shared with Compatibility Mode has some logic based on the deferred path. Here, we need it to always copy to depth, ignoring any other setting. + CopyToDepth = true; + + // Copy the depth texture (filled by a prepass) into the new attachment so it can be used for depth testing + Render(renderGraph, resourceData.dBufferDepth, source, resourceData, cameraData, false, "Copy DBuffer Depth"); } } } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DBuffer/DBufferRenderPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DBuffer/DBufferRenderPass.cs index 7fa4078e103..b991cf8a6e2 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DBuffer/DBufferRenderPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DBuffer/DBufferRenderPass.cs @@ -46,6 +46,9 @@ public DBufferRenderPass(Material dBufferClear, DBufferSettings settings, DecalD var scriptableRenderPassInput = ScriptableRenderPassInput.Depth | ScriptableRenderPassInput.Normal; ConfigureInput(scriptableRenderPassInput); + // DBuffer requires color texture created as it does not handle y flip correctly + requiresIntermediateTexture = true; + m_DrawSystem = drawSystem; m_Settings = settings; m_DBufferClear = dBufferClear; @@ -141,7 +144,15 @@ public override void Execute(ScriptableRenderContext context, ref RenderingData SetGlobalTextures(renderingData.commandBuffer, m_PassData); SetKeywords(CommandBufferHelpers.GetRasterCommandBuffer(renderingData.commandBuffer), m_PassData); - Clear(renderingData.commandBuffer, m_PassData); + + // TODO: This should be replace with mrt clear once we support it + // Clear render targets + using (new ProfilingScope(cmd, m_DBufferClearSampler)) + { + // for alpha compositing, color is cleared to 0, alpha to 1 + // https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch23.html + Blitter.BlitTexture(cmd, passData.dBufferColorHandles[0], new Vector4(1, 1, 0, 0), m_DBufferClear, 0); + } UniversalRenderingData universalRenderingData = renderingData.frameData.Get(); UniversalCameraData cameraData = renderingData.frameData.Get(); @@ -178,26 +189,10 @@ private static void SetKeywords(RasterCommandBuffer cmd, PassData passData) cmd.SetKeyword(ShaderGlobalKeywords.DecalLayers, passData.decalLayers); } - private static void Clear(CommandBuffer cmd, PassData passData) - { - // TODO: This should be replace with mrt clear once we support it - // Clear render targets - using (new ProfilingScope(cmd, passData.dBufferClearSampler)) - { - // for alpha compositing, color is cleared to 0, alpha to 1 - // https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch23.html - Blitter.BlitTexture(cmd, passData.dBufferColorHandles[0], new Vector4(1, 1, 0, 0), passData.dBufferClear, 0); - } - } - private class PassData { internal DecalDrawDBufferSystem drawSystem; internal DBufferSettings settings; - internal Material dBufferClear; - - internal ProfilingSampler dBufferClearSampler; - internal bool decalLayers; internal RTHandle dBufferDepth; internal RTHandle[] dBufferColorHandles; @@ -209,8 +204,6 @@ private void InitPassData(ref PassData passData) { passData.drawSystem = m_DrawSystem; passData.settings = m_Settings; - passData.dBufferClear = m_DBufferClear; - passData.dBufferClearSampler = m_DBufferClearSampler; passData.decalLayers = m_DecalLayers; passData.dBufferDepth = m_DBufferDepth; passData.dBufferColorHandles = dBufferColorHandles; diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.cs index 3e565d812c7..710a8fe18a0 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.cs @@ -1,5 +1,6 @@ using System; using UnityEditor; +using UnityEngine.Serialization; namespace UnityEngine.Rendering.Universal { @@ -22,7 +23,7 @@ public enum DecalScaleMode [CanEditMultipleObjects] #endif [AddComponentMenu("Rendering/URP Decal Projector")] - public class DecalProjector : MonoBehaviour + public partial class DecalProjector : MonoBehaviour, ISerializationCallbackReceiver { internal delegate void DecalProjectorAction(DecalProjector decalProjector); internal static event DecalProjectorAction onDecalAdd; @@ -164,15 +165,15 @@ public Vector2 uvBias } } - [SerializeField] - uint m_DecalLayerMask = 1; + [SerializeField] RenderingLayerMask m_RenderingLayerMask = RenderingLayerMask.defaultRenderingLayerMask; + /// /// The layer of the decal. /// - public uint renderingLayerMask + public RenderingLayerMask renderingLayerMask { - get => m_DecalLayerMask; - set => m_DecalLayerMask = value; + get => m_RenderingLayerMask; + set => m_RenderingLayerMask = value; } [SerializeField] @@ -247,6 +248,16 @@ public float fadeFactor } private Material m_OldMaterial = null; + private float m_OldDrawDistance = 1000.0f; + private float m_OldFadeScale = 0.9f; + private float m_OldStartAngleFade = 180.0f; + private float m_OldEndAngleFade = 180.0f; + private Vector2 m_OldUVScale = new Vector2(1, 1); + private Vector2 m_OldUVBias = new Vector2(0, 0); + private DecalScaleMode m_OldScaleMode = DecalScaleMode.ScaleInvariant; + private Vector3 m_OldOffset = new Vector3(0, 0, 0.5f); + private Vector3 m_OldSize = new Vector3(1, 1, 1); + private float m_OldFadeFactor = 1.0f; /// A scale that should be used for rendering and handles. internal Vector3 effectiveScale => m_ScaleMode == DecalScaleMode.InheritFromHierarchy ? transform.lossyScale : Vector3.one; @@ -319,6 +330,36 @@ internal void OnValidate() } else onDecalPropertyChange?.Invoke(this); + + m_OldDrawDistance = m_DrawDistance; + m_OldFadeScale = m_FadeScale; + m_OldStartAngleFade = m_StartAngleFade; + m_OldEndAngleFade = m_EndAngleFade; + m_OldUVScale = m_UVScale; + m_OldUVBias = m_UVBias; + m_OldScaleMode = m_ScaleMode; + m_OldOffset = m_Offset; + m_OldSize = m_Size; + m_OldFadeFactor = m_FadeFactor; + } + + void OnDidApplyAnimationProperties() + { + // Needed to be able to update state properly for animated serialized-properties. + if (m_OldMaterial != m_Material || + Mathf.Abs(m_OldDrawDistance - m_DrawDistance) > Mathf.Epsilon || + Mathf.Abs(m_OldFadeScale - m_FadeScale) > Mathf.Epsilon || + Mathf.Abs(m_OldStartAngleFade - m_StartAngleFade) > Mathf.Epsilon || + Mathf.Abs(m_OldEndAngleFade - m_EndAngleFade) > Mathf.Epsilon || + m_OldUVScale != m_UVScale || + m_OldUVBias != m_UVBias || + m_OldScaleMode != m_ScaleMode || + m_OldOffset != m_Offset || + m_OldSize != m_Size || + Mathf.Abs(m_OldFadeFactor - m_FadeFactor) > Mathf.Epsilon) + { + OnValidate(); + } } /// @@ -349,5 +390,38 @@ internal static void UpdateAllDecalProperties() { onAllDecalPropertyChange?.Invoke(); } + + enum Version + { + Initial, + RenderingLayerMask, + + Count + } + + [SerializeField] Version version = Version.Count; + + // This piece of code is needed because some objects could have been created before existence of Version enum + /// OnBeforeSerialize needed to handle migration before the versioning system was in place. + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + if (version == Version.Count) // serializing a newly created object + version = Version.Count - 1; // mark as up to date + } + + /// OnAfterDeserialize needed to handle migration before the versioning system was in place. + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + if (version == Version.Count) // deserializing and object without version + version = Version.Initial; // reset to run the migration + + if (version < Version.RenderingLayerMask) + { +#pragma warning disable 618 // Obsolete warning + m_RenderingLayerMask = m_DecalLayerMask; +#pragma warning restore 618 // Obsolete warning + version = Version.RenderingLayerMask; + } + } } } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.deprecated.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.deprecated.cs new file mode 100644 index 00000000000..d9a61007883 --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.deprecated.cs @@ -0,0 +1,10 @@ +using System; + +namespace UnityEngine.Rendering.Universal +{ + public partial class DecalProjector + { + [SerializeField, Obsolete("This field is only kept for migration purpose. Use m_RenderingLayersMask instead. #from(6000.2)", false)] + uint m_DecalLayerMask = 1; + } +} \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.deprecated.cs.meta b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.deprecated.cs.meta new file mode 100644 index 00000000000..d2d502d957c --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/DecalProjector.deprecated.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: f51cd437538e56e43b5b7203e3f0d825 \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/ScreenSpace/DecalGBufferRenderPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/ScreenSpace/DecalGBufferRenderPass.cs index 1b39d9d2fb5..50802064385 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Decal/ScreenSpace/DecalGBufferRenderPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Decal/ScreenSpace/DecalGBufferRenderPass.cs @@ -41,8 +41,6 @@ public DecalGBufferRenderPass(DecalScreenSpaceSettings settings, DecalDrawGBuffe m_PassData = new PassData(); m_GbufferAttachments = new RTHandle[4]; - - breakGBufferAndDeferredRenderPass = false; } internal void Setup(DeferredLights deferredLights) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/DeferredLights.cs b/Packages/com.unity.render-pipelines.universal/Runtime/DeferredLights.cs index 44144f605d0..c5cb7d4edd5 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/DeferredLights.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/DeferredLights.cs @@ -347,9 +347,9 @@ internal void SetupLights(CommandBuffer cmd, UniversalCameraData cameraData, Vec else #endif { - // Support for dynamic resolution. - this.RenderWidth = camera.allowDynamicResolution ? Mathf.CeilToInt(ScalableBufferManager.widthScaleFactor * cameraTargetSizeCopy.x) : cameraTargetSizeCopy.x; - this.RenderHeight = camera.allowDynamicResolution ? Mathf.CeilToInt(ScalableBufferManager.heightScaleFactor * cameraTargetSizeCopy.y) : cameraTargetSizeCopy.y; + // Support for dynamic resolution. + this.RenderWidth = camera.allowDynamicResolution ? Mathf.CeilToInt(ScalableBufferManager.widthScaleFactor * cameraTargetSizeCopy.x) : cameraTargetSizeCopy.x; + this.RenderHeight = camera.allowDynamicResolution ? Mathf.CeilToInt(ScalableBufferManager.heightScaleFactor * cameraTargetSizeCopy.y) : cameraTargetSizeCopy.y; } if (!m_UseDeferredPlus) @@ -730,45 +730,51 @@ void SetupMainLightConstants(CommandBuffer cmd, UniversalLightData lightData) cmd.SetGlobalVector(ShaderConstants._MainLightColor, lightColor); } - void SetupMatrixConstants(RasterCommandBuffer cmd, UniversalCameraData cameraData) + internal Matrix4x4[] GetScreenToWorldMatrix(UniversalCameraData cameraData) { #if ENABLE_VR && ENABLE_XR_MODULE int eyeCount = cameraData.xr.enabled && cameraData.xr.singlePassEnabled ? 2 : 1; #else int eyeCount = 1; #endif + Matrix4x4[] screenToWorld = m_ScreenToWorld; // deferred shaders expects 2 elements - for (int eyeIndex = 0; eyeIndex < eyeCount; eyeIndex++) + // pixel coordinates to NDC coordinates. + Matrix4x4 screenToNDC = new Matrix4x4( + new Vector4(2.0f / (float)this.RenderWidth, 0.0f, 0.0f, 0.0f), + new Vector4(0.0f, 2.0f / (float)this.RenderHeight, 0.0f, 0.0f), + new Vector4(0.0f, 0.0f, 1.0f, 0.0f), + new Vector4(-1.0f, -1.0f, 0.0f, 1.0f) + ); + + if (DeferredConfig.IsOpenGL) { - Matrix4x4 proj = cameraData.GetProjectionMatrix(eyeIndex); - Matrix4x4 view = cameraData.GetViewMatrix(eyeIndex); - Matrix4x4 gpuProj = GL.GetGPUProjectionMatrix(proj, false); - - // xy coordinates in range [-1; 1] go to pixel coordinates. - Matrix4x4 toScreen = new Matrix4x4( - new Vector4(0.5f * this.RenderWidth, 0.0f, 0.0f, 0.0f), - new Vector4(0.0f, 0.5f * this.RenderHeight, 0.0f, 0.0f), - new Vector4(0.0f, 0.0f, 1.0f, 0.0f), - new Vector4(0.5f * this.RenderWidth, 0.5f * this.RenderHeight, 0.0f, 1.0f) + // We need to manunally adjust z in NDC space from [0; 1] (storage in depth texture) to [-1; 1]. + Matrix4x4 renormalizeZ = new Matrix4x4( + new Vector4(1.0f, 0.0f, 0.0f, 0.0f), + new Vector4(0.0f, 1.0f, 0.0f, 0.0f), + new Vector4(0.0f, 0.0f, 2.0f, 0.0f), + new Vector4(0.0f, 0.0f, -1.0f, 1.0f) ); - Matrix4x4 zScaleBias = Matrix4x4.identity; - if (DeferredConfig.IsOpenGL) - { - // We need to manunally adjust z in NDC space from [-1; 1] to [0; 1] (storage in depth texture). - zScaleBias = new Matrix4x4( - new Vector4(1.0f, 0.0f, 0.0f, 0.0f), - new Vector4(0.0f, 1.0f, 0.0f, 0.0f), - new Vector4(0.0f, 0.0f, 0.5f, 0.0f), - new Vector4(0.0f, 0.0f, 0.5f, 1.0f) - ); - } + screenToNDC = renormalizeZ * screenToNDC; + } - screenToWorld[eyeIndex] = Matrix4x4.Inverse(toScreen * zScaleBias * gpuProj * view); + for (int eyeIndex = 0; eyeIndex < eyeCount; eyeIndex++) + { + Matrix4x4 view = cameraData.GetViewMatrix(eyeIndex); + Matrix4x4 gpuProj = cameraData.GetGPUProjectionMatrix(false, eyeIndex); + + screenToWorld[eyeIndex] = Matrix4x4.Inverse(gpuProj * view) * screenToNDC; } - cmd.SetGlobalMatrixArray(ShaderConstants._ScreenToWorld, screenToWorld); + return screenToWorld; + } + + void SetupMatrixConstants(RasterCommandBuffer cmd, UniversalCameraData cameraData) + { + cmd.SetGlobalMatrixArray(ShaderConstants._ScreenToWorld, GetScreenToWorldMatrix(cameraData)); } void PrecomputeLights( diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/ForwardLights.cs b/Packages/com.unity.render-pipelines.universal/Runtime/ForwardLights.cs index 725db6cdd9a..4f8414215bb 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/ForwardLights.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/ForwardLights.cs @@ -513,7 +513,11 @@ internal void SetupLights(UnsafeCommandBuffer cmd, UniversalRenderingData render cmd.SetKeyword(ShaderGlobalKeywords.ReflectionProbeAtlas, lightData.reflectionProbeAtlas); var asset = UniversalRenderPipeline.asset; + #if UNITY_WEBGL && !UNITY_EDITOR + bool apvIsEnabled = false; // APV not supported on WebGL, don't try to enable it. + #else bool apvIsEnabled = asset != null && asset.lightProbeSystem == LightProbeSystem.ProbeVolumes; + #endif ProbeVolumeSHBands probeVolumeSHBands = asset.probeVolumeSHBands; cmd.SetKeyword(ShaderGlobalKeywords.ProbeVolumeL1, apvIsEnabled && probeVolumeSHBands == ProbeVolumeSHBands.SphericalHarmonicsL1); diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/FrameData/UniversalCameraData.cs b/Packages/com.unity.render-pipelines.universal/Runtime/FrameData/UniversalCameraData.cs index 6099d4b9d6c..036b59f5777 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/FrameData/UniversalCameraData.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/FrameData/UniversalCameraData.cs @@ -44,6 +44,7 @@ internal void PushBuiltinShaderConstantsXR(RasterCommandBuffer cmd, bool renderI var projection0 = GetProjectionMatrix(); var view0 = GetViewMatrix(); cmd.SetViewProjectionMatrices(view0, projection0); + if (xr.singlePassEnabled) { var projection1 = GetProjectionMatrix(1); @@ -57,6 +58,26 @@ internal void PushBuiltinShaderConstantsXR(RasterCommandBuffer cmd, bool renderI // Update multipass worldSpace camera pos Vector3 worldSpaceCameraPos = Matrix4x4.Inverse(GetViewMatrix(0)).GetColumn(3); cmd.SetGlobalVector(ShaderPropertyId.worldSpaceCameraPos, worldSpaceCameraPos); + + //Multipass uses the same value as a normal render, and doesn't use the value set for stereo, + //which is why you need to set a value like unity_MatrixInvV. + //The values below should be the same as set in the SetCameraMatrices function in ScriptableRenderer.cs. + Matrix4x4 gpuProjectionMatrix = GetGPUProjectionMatrix(renderIntoTexture); // TODO: invProjection might NOT match the actual projection (invP*P==I) as the target flip logic has diverging paths. + Matrix4x4 inverseViewMatrix = Matrix4x4.Inverse(view0); + Matrix4x4 inverseProjectionMatrix = Matrix4x4.Inverse(gpuProjectionMatrix); + Matrix4x4 inverseViewProjection = inverseViewMatrix * inverseProjectionMatrix; + + // There's an inconsistency in handedness between unity_matrixV and unity_WorldToCamera + // Unity changes the handedness of unity_WorldToCamera (see Camera::CalculateMatrixShaderProps) + // we will also change it here to avoid breaking existing shaders. (case 1257518) + Matrix4x4 worldToCameraMatrix = Matrix4x4.Scale(new Vector3(1.0f, 1.0f, -1.0f)) * view0; + Matrix4x4 cameraToWorldMatrix = worldToCameraMatrix.inverse; + cmd.SetGlobalMatrix(ShaderPropertyId.worldToCameraMatrix, worldToCameraMatrix); + cmd.SetGlobalMatrix(ShaderPropertyId.cameraToWorldMatrix, cameraToWorldMatrix); + + cmd.SetGlobalMatrix(ShaderPropertyId.inverseViewMatrix, inverseViewMatrix); + cmd.SetGlobalMatrix(ShaderPropertyId.inverseProjectionMatrix, inverseProjectionMatrix); + cmd.SetGlobalMatrix(ShaderPropertyId.inverseViewAndProjectionMatrix, inverseViewProjection); } m_CachedRenderIntoTextureXR = renderIntoTexture; m_InitBuiltinXRConstants = true; diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Overrides/.buginfo b/Packages/com.unity.render-pipelines.universal/Runtime/Overrides/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Overrides/.buginfo +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Overrides/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs index 2f9da5cd1e0..332c5c7fb5d 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/AdditionalLightsShadowCasterPass.cs @@ -438,14 +438,17 @@ public bool Setup(UniversalRenderingData renderingData, UniversalCameraData came short additionalLightCount = 0; short validShadowCastingLightsCount = 0; bool supportsSoftShadows = shadowData.supportsSoftShadows; - bool isDeferred = ((UniversalRenderer)cameraData.renderer).renderingModeActual == RenderingMode.Deferred; + UniversalRenderer universalRenderer = (UniversalRenderer)cameraData.renderer; + bool isDeferred = universalRenderer.renderingModeActual == RenderingMode.Deferred; + bool shadowTransparentReceive = universalRenderer.shadowTransparentReceive; + bool hasForwardShadowPass = !isDeferred || shadowTransparentReceive; for (int visibleLightIndex = 0; visibleLightIndex < visibleLights.Length; ++visibleLightIndex) { // Skip main directional light as it is not packed into the shadow atlas if (visibleLightIndex == lightData.mainLightIndex) continue; - short lightIndexToUse = isDeferred ? validShadowCastingLightsCount : additionalLightCount++; + short lightIndexToUse = !hasForwardShadowPass ? validShadowCastingLightsCount : additionalLightCount++; // We need to always set these indices, even if the light is not shadow casting or doesn't fit in the shadow slices (UUM-46577) m_VisibleLightIndexToAdditionalLightIndex[visibleLightIndex] = lightIndexToUse; diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/FinalBlitPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/FinalBlitPass.cs index d6b7cc5f31b..d70a8ee62ba 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/FinalBlitPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/FinalBlitPass.cs @@ -293,8 +293,10 @@ internal void Render(RenderGraph renderGraph, ContextContainer frameData, Univer bool passSupportsFoveation = !XRSystem.foveatedRenderingCaps.HasFlag(FoveatedRenderingCaps.NonUniformRaster); builder.EnableFoveatedRasterization(cameraData.xr.supportsFoveatedRendering && passSupportsFoveation); - // Optimization: In XR, we don't have split screen use case. The access flag can be set to WriteAll here, so engine will set loadOperation to DontCare down to the pipe. - if (cameraData.xr.enabled) + // Optimization: In XR, we don't have split screen use case. + // The access flag can be set to WriteAll if there is a full screen blit and no alpha blending, + // so engine will set loadOperation to DontCare down to the pipe. + if (cameraData.xr.enabled && cameraData.isDefaultViewport && !outputsAlpha) targetAccessFlag = AccessFlags.WriteAll; #endif builder.SetRenderAttachment(dest, 0, targetAccessFlag); diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/ScreenSpaceAmbientOcclusionPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/ScreenSpaceAmbientOcclusionPass.cs index f78867f3741..9428070a3f5 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/ScreenSpaceAmbientOcclusionPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/ScreenSpaceAmbientOcclusionPass.cs @@ -154,9 +154,6 @@ internal bool Setup(ref ScreenSpaceAmbientOcclusionSettings featureSettings, ref { renderPassEvent = m_CurrentSettings.AfterOpaque ? RenderPassEvent.AfterRenderingOpaques : RenderPassEvent.AfterRenderingGbuffer; - if (renderPassEvent == RenderPassEvent.AfterRenderingGbuffer) - breakGBufferAndDeferredRenderPass = true; - m_CurrentSettings.Source = ScreenSpaceAmbientOcclusionSettings.DepthSource.DepthNormals; } else diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/ScriptableRenderPass.cs b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/ScriptableRenderPass.cs index 9888dcb275f..20abc669d21 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Passes/ScriptableRenderPass.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Passes/ScriptableRenderPass.cs @@ -11,6 +11,10 @@ namespace UnityEngine.Rendering.Universal { /// /// Input requirements for ScriptableRenderPass. + /// + /// URP adds render passes to generate the inputs, or reuses inputs that are already available from earlier in the frame. + /// + /// URP binds the inputs as global shader texture properties. /// /// [Flags] @@ -23,21 +27,31 @@ public enum ScriptableRenderPassInput /// /// Used when a ScriptableRenderPass requires a depth texture. + /// + /// To sample the depth texture in a shader, include `Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl`, then use the `SampleSceneDepth` method. /// Depth = 1 << 0, /// /// Used when a ScriptableRenderPass requires a normal texture. + /// + /// To sample the normals texture in a shader, include `Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareNormalsTexture.hlsl`, then use the `SampleSceneNormals` method. /// Normal = 1 << 1, /// /// Used when a ScriptableRenderPass requires a color texture. + /// + /// To sample the color texture in a shader, include `Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareOpaqueTexture.hlsl`, then use the `SampleSceneColor` method. + /// + /// **Note:** The opaque texture might be a downscaled copy of the framebuffer from before rendering transparent objects. /// Color = 1 << 2, /// /// Used when a ScriptableRenderPass requires a motion vectors texture. + /// + /// To sample the motion vectors texture in a shader, use `TEXTURE2D_X(_MotionVectorTexture)`, then `LOAD_TEXTURE2D_X_LOD(_MotionVectorTexture, pixelCoords, 0).xy`. /// Motion = 1 << 3, } @@ -45,6 +59,7 @@ public enum ScriptableRenderPassInput // Note: Spaced built-in events so we can add events in between them // We need to leave room as we sort render passes based on event. // Users can also inject render pass events in a specific point by doing RenderPassEvent + offset + /// /// Controls when the render pass executes. /// @@ -179,6 +194,14 @@ static RenderPassEventsEnumValues() /// /// ScriptableRenderPass implements a logical rendering pass that can be used to extend Universal RP renderer. /// + /// + /// To implement your own rendering pass you need to take the following steps: + /// 1. Create a new Subclass from ScriptableRenderPass that implements the rendering logic. + /// 2. Create an instance of your subclass and set up the relevant parameters such as ScriptableRenderPass.renderPassEvent in the constructor or initialization code. + /// 3. Ensure your pass instance gets picked up by URP, this can be done through a ScriptableRendererFeature or by calling ScriptableRenderer.EnqueuePass from an event callback like RenderPipelineManager.beginCameraRendering + /// + /// See [link] for more info on working with a ScriptableRendererFeature or [link] for more info on working with ScriptableRenderer.EnqueuePass. + /// public abstract partial class ScriptableRenderPass: IRenderGraphRecorder { /// @@ -318,8 +341,6 @@ protected internal ProfilingSampler profilingSampler internal bool useNativeRenderPass { get; set; } - internal bool breakGBufferAndDeferredRenderPass { get; set; } - // index to track the position in the current frame internal int renderPassQueueIndex { get; set; } @@ -367,7 +388,6 @@ public ScriptableRenderPass() overrideCameraTarget = false; isBlitRenderPass = false; useNativeRenderPass = true; - breakGBufferAndDeferredRenderPass = true; renderPassQueueIndex = -1; renderTargetFormat = new GraphicsFormat[] { diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/ReflectionProbeManager.cs b/Packages/com.unity.render-pipelines.universal/Runtime/ReflectionProbeManager.cs index 1d0c47749c1..f7f001913b3 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/ReflectionProbeManager.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/ReflectionProbeManager.cs @@ -219,7 +219,7 @@ public unsafe void UpdateGpuData(CommandBuffer cmd, ref CullingResults cullResul } // If the probe is set to be updated every frame, we assign the last used frame to -1 so it's evicted in next frame. - if (probe.reflectionProbe.refreshMode == ReflectionProbeRefreshMode.EveryFrame) + if (probe.reflectionProbe.mode == ReflectionProbeMode.Realtime && probe.reflectionProbe.refreshMode == ReflectionProbeRefreshMode.EveryFrame) cachedProbe.lastUsed = -1; else cachedProbe.lastUsed = frameIndex; diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RenderGraph/RenderGraphGraphicsAutomatedTests.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RenderGraph/RenderGraphGraphicsAutomatedTests.cs index df3a7efdae6..b1ea13566ec 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RenderGraph/RenderGraphGraphicsAutomatedTests.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RenderGraph/RenderGraphGraphicsAutomatedTests.cs @@ -22,7 +22,7 @@ static bool activatedFromCommandLine /// /// Used by render pipelines to initialize RenderGraph tests. /// - public static bool enabled { get; } = activatedFromCommandLine; + public static bool enabled { get; set; } = activatedFromCommandLine; } } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RenderPipelineResources/.buginfo b/Packages/com.unity.render-pipelines.universal/Runtime/RenderPipelineResources/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RenderPipelineResources/.buginfo +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RenderPipelineResources/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/DecalRendererFeature.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/DecalRendererFeature.cs index c7e0777e248..a2707457a5b 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/DecalRendererFeature.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/DecalRendererFeature.cs @@ -1,7 +1,10 @@ using System.Diagnostics; using UnityEngine.Assertions; using UnityEngine.Rendering.Universal.Internal; +using System; + #if UNITY_EDITOR +using UnityEditor.Rendering; using ShaderKeywordFilter = UnityEditor.ShaderKeywordFilter; #endif @@ -98,6 +101,9 @@ public DecalEntityManager Get() DecalProjector.onDecalPropertyChange += OnDecalPropertyChange; DecalProjector.onDecalMaterialChange += OnDecalMaterialChange; DecalProjector.onAllDecalPropertyChange += OnAllDecalPropertyChange; +#if UNITY_EDITOR + RenderPipelineEditorUtility.onRenderingLayerCountChanged += OnAllDecalPropertyChange; +#endif } m_ReferenceCounter++; @@ -129,6 +135,9 @@ public void Dispose() DecalProjector.onDecalPropertyChange -= OnDecalPropertyChange; DecalProjector.onDecalMaterialChange -= OnDecalMaterialChange; DecalProjector.onAllDecalPropertyChange -= OnAllDecalPropertyChange; +#if UNITY_EDITOR + RenderPipelineEditorUtility.onRenderingLayerCountChanged -= OnAllDecalPropertyChange; +#endif } private void OnDecalAdd(DecalProjector decalProjector) @@ -217,9 +226,6 @@ public class DecalRendererFeature : ScriptableRendererFeature /// public override void Create() { -#if UNITY_EDITOR - ResourceReloader.TryReloadAllNullIn(this, UniversalRenderPipelineAsset.packagePath); -#endif m_DecalPreviewPass = new DecalPreviewPass(); m_RecreateSystems = true; } @@ -536,6 +542,7 @@ internal override bool SupportsNativeRenderPass() } /// + [Obsolete(DeprecationMessage.CompatibilityScriptingAPIObsolete, false)] public override void SetupRenderPasses(ScriptableRenderer renderer, in RenderingData renderingData) { // Disable obsolete warning for internal usage diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature.cs index 8704ee80de3..f54a6a7032d 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature.cs @@ -1,316 +1,316 @@ using System; -using UnityEngine; using UnityEngine.Rendering.RenderGraphModule; -using UnityEngine.Rendering; -using UnityEngine.Rendering.Universal; using UnityEngine.Experimental.Rendering; -/// -/// This renderer feature lets you create single-pass full screen post processing effects without needing to write code. -/// -[URPHelpURL("renderer-features/renderer-feature-full-screen-pass")] -public partial class FullScreenPassRendererFeature : ScriptableRendererFeature +namespace UnityEngine.Rendering.Universal { /// - /// An injection point for the full screen pass. This is similar to the RenderPassEvent enum but limited to only supported events. + /// This renderer feature lets you create single-pass full screen post processing effects without needing to write code. /// - public enum InjectionPoint + [URPHelpURL("renderer-features/renderer-feature-full-screen-pass")] + public partial class FullScreenPassRendererFeature : ScriptableRendererFeature { /// - /// Inject a full screen pass before transparents are rendered. + /// An injection point for the full screen pass. This is similar to the RenderPassEvent enum but limited to only supported events. /// - BeforeRenderingTransparents = RenderPassEvent.BeforeRenderingTransparents, + public enum InjectionPoint + { + /// + /// Inject a full screen pass before transparents are rendered. + /// + BeforeRenderingTransparents = RenderPassEvent.BeforeRenderingTransparents, + + /// + /// Inject a full screen pass before post processing is rendered. + /// + BeforeRenderingPostProcessing = RenderPassEvent.BeforeRenderingPostProcessing, + + /// + /// Inject a full screen pass after post processing is rendered. + /// + AfterRenderingPostProcessing = RenderPassEvent.AfterRenderingPostProcessing + } /// - /// Inject a full screen pass before post processing is rendered. + /// Specifies at which injection point the pass will be rendered. /// - BeforeRenderingPostProcessing = RenderPassEvent.BeforeRenderingPostProcessing, + public InjectionPoint injectionPoint = InjectionPoint.AfterRenderingPostProcessing; /// - /// Inject a full screen pass after post processing is rendered. + /// Specifies whether the assigned material will need to use the current screen contents as an input texture. + /// Disable this to optimize away an extra color copy pass when you know that the assigned material will only need + /// to write on top of or hardware blend with the contents of the active color target. /// - AfterRenderingPostProcessing = RenderPassEvent.AfterRenderingPostProcessing - } - - /// - /// Specifies at which injection point the pass will be rendered. - /// - public InjectionPoint injectionPoint = InjectionPoint.AfterRenderingPostProcessing; - - /// - /// Specifies whether the assigned material will need to use the current screen contents as an input texture. - /// Disable this to optimize away an extra color copy pass when you know that the assigned material will only need - /// to write on top of or hardware blend with the contents of the active color target. - /// - public bool fetchColorBuffer = true; - - /// - /// A mask of URP textures that the assigned material will need access to. Requesting unused requirements can degrade - /// performance unnecessarily as URP might need to run additional rendering passes to generate them. - /// - public ScriptableRenderPassInput requirements = ScriptableRenderPassInput.None; + public bool fetchColorBuffer = true; - /// - /// The material used to render the full screen pass (typically based on the Fullscreen Shader Graph target). - /// - public Material passMaterial; - - /// - /// The shader pass index that should be used when rendering the assigned material. - /// - public int passIndex = 0; - - /// - /// Specifies if the active camera's depth-stencil buffer should be bound when rendering the full screen pass. - /// Disabling this will ensure that the material's depth and stencil commands will have no effect (this could also have a slight performance benefit). - /// - public bool bindDepthStencilAttachment = false; + /// + /// A mask of URP textures that the assigned material will need access to. Requesting unused requirements can degrade + /// performance unnecessarily as URP might need to run additional rendering passes to generate them. + /// + public ScriptableRenderPassInput requirements = ScriptableRenderPassInput.None; - private FullScreenRenderPass m_FullScreenPass; + /// + /// The material used to render the full screen pass (typically based on the Fullscreen Shader Graph target). + /// + public Material passMaterial; - /// - public override void Create() - { - m_FullScreenPass = new FullScreenRenderPass(name); - } + /// + /// The shader pass index that should be used when rendering the assigned material. + /// + public int passIndex = 0; - internal override bool RequireRenderingLayers(bool isDeferred, bool needsGBufferAccurateNormals, out RenderingLayerUtils.Event atEvent, out RenderingLayerUtils.MaskSize maskSize) - { - atEvent = RenderingLayerUtils.Event.Opaque; - maskSize = RenderingLayerUtils.MaskSize.Bits8; - return false; - } + /// + /// Specifies if the active camera's depth-stencil buffer should be bound when rendering the full screen pass. + /// Disabling this will ensure that the material's depth and stencil commands will have no effect (this could also have a slight performance benefit). + /// + public bool bindDepthStencilAttachment = false; - /// - public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) - { - if (renderingData.cameraData.cameraType == CameraType.Preview - || renderingData.cameraData.cameraType == CameraType.Reflection - || UniversalRenderer.IsOffscreenDepthTexture(ref renderingData.cameraData)) - return; + private FullScreenRenderPass m_FullScreenPass; - if (passMaterial == null) + /// + public override void Create() { - Debug.LogWarningFormat("The full screen feature \"{0}\" will not execute - no material is assigned. Please make sure a material is assigned for this feature on the renderer asset.", name); - return; + m_FullScreenPass = new FullScreenRenderPass(name); } - if (passIndex < 0 || passIndex >= passMaterial.passCount) + internal override bool RequireRenderingLayers(bool isDeferred, bool needsGBufferAccurateNormals, out RenderingLayerUtils.Event atEvent, out RenderingLayerUtils.MaskSize maskSize) { - Debug.LogWarningFormat("The full screen feature \"{0}\" will not execute - the pass index is out of bounds for the material.", name); - return; + atEvent = RenderingLayerUtils.Event.Opaque; + maskSize = RenderingLayerUtils.MaskSize.Bits8; + return false; } - m_FullScreenPass.renderPassEvent = (RenderPassEvent)injectionPoint; - m_FullScreenPass.ConfigureInput(requirements); - m_FullScreenPass.SetupMembers(passMaterial, passIndex, fetchColorBuffer, bindDepthStencilAttachment); - - m_FullScreenPass.requiresIntermediateTexture = fetchColorBuffer; - - renderer.EnqueuePass(m_FullScreenPass); - } - - /// - protected override void Dispose(bool disposing) - { - m_FullScreenPass.Dispose(); - } - - internal class FullScreenRenderPass : ScriptableRenderPass - { - private Material m_Material; - private int m_PassIndex; - private bool m_FetchActiveColor; - private bool m_BindDepthStencilAttachment; - private RTHandle m_CopiedColor; - - private static MaterialPropertyBlock s_SharedPropertyBlock = new MaterialPropertyBlock(); - - public FullScreenRenderPass(string passName) + /// + public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) { - profilingSampler = new ProfilingSampler(passName); - } + if (renderingData.cameraData.cameraType == CameraType.Preview + || renderingData.cameraData.cameraType == CameraType.Reflection + || UniversalRenderer.IsOffscreenDepthTexture(ref renderingData.cameraData)) + return; - public void SetupMembers(Material material, int passIndex, bool fetchActiveColor, bool bindDepthStencilAttachment) - { - m_Material = material; - m_PassIndex = passIndex; - m_FetchActiveColor = fetchActiveColor; - m_BindDepthStencilAttachment = bindDepthStencilAttachment; - } + if (passMaterial == null) + { + Debug.LogWarningFormat("The full screen feature \"{0}\" will not execute - no material is assigned. Please make sure a material is assigned for this feature on the renderer asset.", name); + return; + } - [Obsolete(DeprecationMessage.CompatibilityScriptingAPIObsolete, false)] - public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData) - { - // Disable obsolete warning for internal usage - #pragma warning disable CS0618 - // FullScreenPass manages its own RenderTarget. - // ResetTarget here so that ScriptableRenderer's active attachement can be invalidated when processing this ScriptableRenderPass. - ResetTarget(); - #pragma warning restore CS0618 - - if (m_FetchActiveColor) - ReAllocate(renderingData.cameraData.cameraTargetDescriptor); - } + if (passIndex < 0 || passIndex >= passMaterial.passCount) + { + Debug.LogWarningFormat("The full screen feature \"{0}\" will not execute - the pass index is out of bounds for the material.", name); + return; + } - internal void ReAllocate(RenderTextureDescriptor desc) - { - desc.msaaSamples = 1; - desc.depthStencilFormat = GraphicsFormat.None; - RenderingUtils.ReAllocateHandleIfNeeded(ref m_CopiedColor, desc, name: "_FullscreenPassColorCopy"); - } + m_FullScreenPass.renderPassEvent = (RenderPassEvent)injectionPoint; + m_FullScreenPass.ConfigureInput(requirements); + m_FullScreenPass.SetupMembers(passMaterial, passIndex, fetchColorBuffer, bindDepthStencilAttachment); - public void Dispose() - { - m_CopiedColor?.Release(); + m_FullScreenPass.requiresIntermediateTexture = fetchColorBuffer; + + renderer.EnqueuePass(m_FullScreenPass); } - private static void ExecuteCopyColorPass(RasterCommandBuffer cmd, RTHandle sourceTexture) + /// + protected override void Dispose(bool disposing) { - Blitter.BlitTexture(cmd, sourceTexture, new Vector4(1, 1, 0, 0), 0.0f, false); + m_FullScreenPass.Dispose(); } - private static void ExecuteMainPass(RasterCommandBuffer cmd, RTHandle sourceTexture, Material material, int passIndex) + internal class FullScreenRenderPass : ScriptableRenderPass { - s_SharedPropertyBlock.Clear(); - if (sourceTexture != null) - s_SharedPropertyBlock.SetTexture(ShaderPropertyId.blitTexture, sourceTexture); + private Material m_Material; + private int m_PassIndex; + private bool m_FetchActiveColor; + private bool m_BindDepthStencilAttachment; + private RTHandle m_CopiedColor; - // We need to set the "_BlitScaleBias" uniform for user materials with shaders relying on core Blit.hlsl to work - s_SharedPropertyBlock.SetVector(ShaderPropertyId.blitScaleBias, new Vector4(1, 1, 0, 0)); + private static MaterialPropertyBlock s_SharedPropertyBlock = new MaterialPropertyBlock(); - cmd.DrawProcedural(Matrix4x4.identity, material, passIndex, MeshTopology.Triangles, 3, 1, s_SharedPropertyBlock); - } + public FullScreenRenderPass(string passName) + { + profilingSampler = new ProfilingSampler(passName); + } - [Obsolete(DeprecationMessage.CompatibilityScriptingAPIObsolete, false)] - public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) - { - ref var cameraData = ref renderingData.cameraData; - var cmd = renderingData.commandBuffer; + public void SetupMembers(Material material, int passIndex, bool fetchActiveColor, bool bindDepthStencilAttachment) + { + m_Material = material; + m_PassIndex = passIndex; + m_FetchActiveColor = fetchActiveColor; + m_BindDepthStencilAttachment = bindDepthStencilAttachment; + } - using (new ProfilingScope(cmd, profilingSampler)) + [Obsolete(DeprecationMessage.CompatibilityScriptingAPIObsolete, false)] + public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData) { - RasterCommandBuffer rasterCmd = CommandBufferHelpers.GetRasterCommandBuffer(cmd); + // Disable obsolete warning for internal usage + #pragma warning disable CS0618 + // FullScreenPass manages its own RenderTarget. + // ResetTarget here so that ScriptableRenderer's active attachement can be invalidated when processing this ScriptableRenderPass. + ResetTarget(); + #pragma warning restore CS0618 + if (m_FetchActiveColor) - { - CoreUtils.SetRenderTarget(cmd, m_CopiedColor); - ExecuteCopyColorPass(rasterCmd, cameraData.renderer.cameraColorTargetHandle); - } + ReAllocate(renderingData.cameraData.cameraTargetDescriptor); + } - if (m_BindDepthStencilAttachment) - CoreUtils.SetRenderTarget(cmd, cameraData.renderer.cameraColorTargetHandle, cameraData.renderer.cameraDepthTargetHandle); - else - CoreUtils.SetRenderTarget(cmd, cameraData.renderer.cameraColorTargetHandle); + internal void ReAllocate(RenderTextureDescriptor desc) + { + desc.msaaSamples = 1; + desc.depthStencilFormat = GraphicsFormat.None; + RenderingUtils.ReAllocateHandleIfNeeded(ref m_CopiedColor, desc, name: "_FullscreenPassColorCopy"); + } - ExecuteMainPass(rasterCmd, m_FetchActiveColor ? m_CopiedColor : null, m_Material, m_PassIndex); + public void Dispose() + { + m_CopiedColor?.Release(); } - } - public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) - { - UniversalResourceData resourcesData = frameData.Get(); - UniversalCameraData cameraData = frameData.Get(); + private static void ExecuteCopyColorPass(RasterCommandBuffer cmd, RTHandle sourceTexture) + { + Blitter.BlitTexture(cmd, sourceTexture, new Vector4(1, 1, 0, 0), 0.0f, false); + } + + private static void ExecuteMainPass(RasterCommandBuffer cmd, RTHandle sourceTexture, Material material, int passIndex) + { + s_SharedPropertyBlock.Clear(); + if (sourceTexture != null) + s_SharedPropertyBlock.SetTexture(ShaderPropertyId.blitTexture, sourceTexture); - TextureHandle source, destination; + // We need to set the "_BlitScaleBias" uniform for user materials with shaders relying on core Blit.hlsl to work + s_SharedPropertyBlock.SetVector(ShaderPropertyId.blitScaleBias, new Vector4(1, 1, 0, 0)); - Debug.Assert(resourcesData.cameraColor.IsValid()); + cmd.DrawProcedural(Matrix4x4.identity, material, passIndex, MeshTopology.Triangles, 3, 1, s_SharedPropertyBlock); + } - if (m_FetchActiveColor) + [Obsolete(DeprecationMessage.CompatibilityScriptingAPIObsolete, false)] + public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) { - var targetDesc = renderGraph.GetTextureDesc(resourcesData.cameraColor); - targetDesc.name = "_CameraColorFullScreenPass"; - targetDesc.clearBuffer = false; + ref var cameraData = ref renderingData.cameraData; + var cmd = renderingData.commandBuffer; - source = resourcesData.activeColorTexture; - destination = renderGraph.CreateTexture(targetDesc); - - using (var builder = renderGraph.AddRasterRenderPass("Copy Color Full Screen", out var passData, profilingSampler)) + using (new ProfilingScope(cmd, profilingSampler)) { - passData.inputTexture = source; - builder.UseTexture(passData.inputTexture, AccessFlags.Read); + RasterCommandBuffer rasterCmd = CommandBufferHelpers.GetRasterCommandBuffer(cmd); + if (m_FetchActiveColor) + { + CoreUtils.SetRenderTarget(cmd, m_CopiedColor); + ExecuteCopyColorPass(rasterCmd, cameraData.renderer.cameraColorTargetHandle); + } - builder.SetRenderAttachment(destination, 0, AccessFlags.Write); + if (m_BindDepthStencilAttachment) + CoreUtils.SetRenderTarget(cmd, cameraData.renderer.cameraColorTargetHandle, cameraData.renderer.cameraDepthTargetHandle); + else + CoreUtils.SetRenderTarget(cmd, cameraData.renderer.cameraColorTargetHandle); - builder.SetRenderFunc((CopyPassData data, RasterGraphContext rgContext) => - { - ExecuteCopyColorPass(rgContext.cmd, data.inputTexture); - }); + ExecuteMainPass(rasterCmd, m_FetchActiveColor ? m_CopiedColor : null, m_Material, m_PassIndex); } - - //Swap for next pass; - source = destination; } - else + + public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { - source = TextureHandle.nullHandle; - } + UniversalResourceData resourcesData = frameData.Get(); + UniversalCameraData cameraData = frameData.Get(); - destination = resourcesData.activeColorTexture; + TextureHandle source, destination; + Debug.Assert(resourcesData.cameraColor.IsValid()); - using (var builder = renderGraph.AddRasterRenderPass(passName, out var passData, profilingSampler)) - { - passData.material = m_Material; - passData.passIndex = m_PassIndex; + if (m_FetchActiveColor) + { + var targetDesc = renderGraph.GetTextureDesc(resourcesData.cameraColor); + targetDesc.name = "_CameraColorFullScreenPass"; + targetDesc.clearBuffer = false; - passData.inputTexture = source; + source = resourcesData.activeColorTexture; + destination = renderGraph.CreateTexture(targetDesc); + + using (var builder = renderGraph.AddRasterRenderPass("Copy Color Full Screen", out var passData, profilingSampler)) + { + passData.inputTexture = source; + builder.UseTexture(passData.inputTexture, AccessFlags.Read); - if(passData.inputTexture.IsValid()) - builder.UseTexture(passData.inputTexture, AccessFlags.Read); + builder.SetRenderAttachment(destination, 0, AccessFlags.Write); - bool needsColor = (input & ScriptableRenderPassInput.Color) != ScriptableRenderPassInput.None; - bool needsDepth = (input & ScriptableRenderPassInput.Depth) != ScriptableRenderPassInput.None; - bool needsMotion = (input & ScriptableRenderPassInput.Motion) != ScriptableRenderPassInput.None; - bool needsNormal = (input & ScriptableRenderPassInput.Normal) != ScriptableRenderPassInput.None; + builder.SetRenderFunc((CopyPassData data, RasterGraphContext rgContext) => + { + ExecuteCopyColorPass(rgContext.cmd, data.inputTexture); + }); + } - if (needsColor) - { - Debug.Assert(resourcesData.cameraOpaqueTexture.IsValid()); - builder.UseTexture(resourcesData.cameraOpaqueTexture); + //Swap for next pass; + source = destination; } - - if (needsDepth) + else { - Debug.Assert(resourcesData.cameraDepthTexture.IsValid()); - builder.UseTexture(resourcesData.cameraDepthTexture); + source = TextureHandle.nullHandle; } - if (needsMotion) - { - Debug.Assert(resourcesData.motionVectorColor.IsValid()); - builder.UseTexture(resourcesData.motionVectorColor); - Debug.Assert(resourcesData.motionVectorDepth.IsValid()); - builder.UseTexture(resourcesData.motionVectorDepth); - } + destination = resourcesData.activeColorTexture; - if (needsNormal) + + using (var builder = renderGraph.AddRasterRenderPass(passName, out var passData, profilingSampler)) { - Debug.Assert(resourcesData.cameraNormalsTexture.IsValid()); - builder.UseTexture(resourcesData.cameraNormalsTexture); - } + passData.material = m_Material; + passData.passIndex = m_PassIndex; + + passData.inputTexture = source; + + if(passData.inputTexture.IsValid()) + builder.UseTexture(passData.inputTexture, AccessFlags.Read); + + bool needsColor = (input & ScriptableRenderPassInput.Color) != ScriptableRenderPassInput.None; + bool needsDepth = (input & ScriptableRenderPassInput.Depth) != ScriptableRenderPassInput.None; + bool needsMotion = (input & ScriptableRenderPassInput.Motion) != ScriptableRenderPassInput.None; + bool needsNormal = (input & ScriptableRenderPassInput.Normal) != ScriptableRenderPassInput.None; + + if (needsColor) + { + Debug.Assert(resourcesData.cameraOpaqueTexture.IsValid()); + builder.UseTexture(resourcesData.cameraOpaqueTexture); + } + + if (needsDepth) + { + Debug.Assert(resourcesData.cameraDepthTexture.IsValid()); + builder.UseTexture(resourcesData.cameraDepthTexture); + } + + if (needsMotion) + { + Debug.Assert(resourcesData.motionVectorColor.IsValid()); + builder.UseTexture(resourcesData.motionVectorColor); + Debug.Assert(resourcesData.motionVectorDepth.IsValid()); + builder.UseTexture(resourcesData.motionVectorDepth); + } + + if (needsNormal) + { + Debug.Assert(resourcesData.cameraNormalsTexture.IsValid()); + builder.UseTexture(resourcesData.cameraNormalsTexture); + } - builder.SetRenderAttachment(destination, 0, AccessFlags.Write); + builder.SetRenderAttachment(destination, 0, AccessFlags.Write); - if (m_BindDepthStencilAttachment) - builder.SetRenderAttachmentDepth(resourcesData.activeDepthTexture, AccessFlags.Write); + if (m_BindDepthStencilAttachment) + builder.SetRenderAttachmentDepth(resourcesData.activeDepthTexture, AccessFlags.Write); - builder.SetRenderFunc((MainPassData data, RasterGraphContext rgContext) => - { - ExecuteMainPass(rgContext.cmd, data.inputTexture, data.material, data.passIndex); - }); + builder.SetRenderFunc((MainPassData data, RasterGraphContext rgContext) => + { + ExecuteMainPass(rgContext.cmd, data.inputTexture, data.material, data.passIndex); + }); + } } - } - private class CopyPassData - { - internal TextureHandle inputTexture; - } + private class CopyPassData + { + internal TextureHandle inputTexture; + } - private class MainPassData - { - internal Material material; - internal int passIndex; - internal TextureHandle inputTexture; + private class MainPassData + { + internal Material material; + internal int passIndex; + internal TextureHandle inputTexture; + } } } } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature.migration.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature.migration.cs index 28431a3126c..c0fa826ffbc 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature.migration.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature.migration.cs @@ -1,79 +1,82 @@ -using UnityEngine; using UnityEditor; -using UnityEngine.Rendering.Universal; +using UnityEngine.Scripting.APIUpdating; -public partial class FullScreenPassRendererFeature : ISerializationCallbackReceiver +namespace UnityEngine.Rendering.Universal { - private enum Version + [MovedFrom("")] + public partial class FullScreenPassRendererFeature : ISerializationCallbackReceiver { - // * Uninitialised is a special last entry that will only ever be set on newly created objects or objects - // which were previously serialised with no Version member at all. - // * We distinguish between new objects and the unversioned objects based on if we first see this value during - // serialization or during deserialization respectively. - Uninitialised = -1, - - Initial, - AddFetchColorBufferCheckbox, + private enum Version + { + // * Uninitialised is a special last entry that will only ever be set on newly created objects or objects + // which were previously serialised with no Version member at all. + // * We distinguish between new objects and the unversioned objects based on if we first see this value during + // serialization or during deserialization respectively. + Uninitialised = -1, - // These two entries should remain at the end of the enum and new version should be added before Count - Count, - Latest = Count - 1, - } + Initial, + AddFetchColorBufferCheckbox, - [SerializeField] - [HideInInspector] - private Version m_Version = Version.Uninitialised; + // These two entries should remain at the end of the enum and new version should be added before Count + Count, + Latest = Count - 1, + } - private void UpgradeIfNeeded() - { - // As we rely on serialization/deserialization order to initialize the version as player might have restricions - // on when and if serialization is done skipping any upgrading at runtime to avoid accidentally doing the - // upgrade on the latest version. Upgrading at runtime does not really have much utility as it would mean - // that the asset would need to have been produced in an editor which is an earlier build version than the player -#if UNITY_EDITOR - if (m_Version == Version.Latest) - return; + [SerializeField] + [HideInInspector] + private Version m_Version = Version.Uninitialised; - if(m_Version == Version.Initial) + private void UpgradeIfNeeded() { - // * Previously the ScriptableRenderPassInput.Color requirement was repurposed to mean "copy the active - // color target" even though it is typically used to request '_CameraOpaqueTexture' and the copy color pass. - // * From now on, the "Fetch Color Buffer" choice will be a separate checkbox to remove the inconsistent - // meaning and to allow using the '_CameraOpaqueTexture' if one wants to as well. - fetchColorBuffer = requirements.HasFlag(ScriptableRenderPassInput.Color); + // As we rely on serialization/deserialization order to initialize the version as player might have restricions + // on when and if serialization is done skipping any upgrading at runtime to avoid accidentally doing the + // upgrade on the latest version. Upgrading at runtime does not really have much utility as it would mean + // that the asset would need to have been produced in an editor which is an earlier build version than the player + #if UNITY_EDITOR + if (m_Version == Version.Latest) + return; + + if(m_Version == Version.Initial) + { + // * Previously the ScriptableRenderPassInput.Color requirement was repurposed to mean "copy the active + // color target" even though it is typically used to request '_CameraOpaqueTexture' and the copy color pass. + // * From now on, the "Fetch Color Buffer" choice will be a separate checkbox to remove the inconsistent + // meaning and to allow using the '_CameraOpaqueTexture' if one wants to as well. + fetchColorBuffer = requirements.HasFlag(ScriptableRenderPassInput.Color); - // As the Color flag was being masked out during actual rendering we can safely disable it. - requirements &= ~ScriptableRenderPassInput.Color; + // As the Color flag was being masked out during actual rendering we can safely disable it. + requirements &= ~ScriptableRenderPassInput.Color; - m_Version++; + m_Version++; + } + // Put the next upgrader in an "if" here (not "else if" as they migh all need to run) + + // Making sure SetDirty is called once after deserialization + EditorApplication.delayCall += () => + { + if (this) + EditorUtility.SetDirty(this); + }; + #endif } - // Put the next upgrader in an "if" here (not "else if" as they migh all need to run) - // Making sure SetDirty is called once after deserialization - EditorApplication.delayCall += () => + /// + void ISerializationCallbackReceiver.OnBeforeSerialize() { - if (this) - EditorUtility.SetDirty(this); - }; -#endif - } - - /// - void ISerializationCallbackReceiver.OnBeforeSerialize() - { - // This should only ever be true the first time we're serializing a newly created object - if (m_Version == Version.Uninitialised) - m_Version = Version.Latest; - } + // This should only ever be true the first time we're serializing a newly created object + if (m_Version == Version.Uninitialised) + m_Version = Version.Latest; + } - /// - void ISerializationCallbackReceiver.OnAfterDeserialize() - { - // The 'Uninitialised' version is expected to only occur during deserialization for objects that were previously - // serialized before we added the m_Version field - if (m_Version == Version.Uninitialised) - m_Version = Version.Initial; + /// + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + // The 'Uninitialised' version is expected to only occur during deserialization for objects that were previously + // serialized before we added the m_Version field + if (m_Version == Version.Uninitialised) + m_Version = Version.Initial; - UpgradeIfNeeded(); + UpgradeIfNeeded(); + } } } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature_OldGUID.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature_OldGUID.cs new file mode 100644 index 00000000000..52759072bba --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature_OldGUID.cs @@ -0,0 +1,44 @@ +// UUM-92491: This solve an issue where in 2022.3 FullScreenPassRendererFeature got introduced with another +// guid than in the 6000.0 version. To update the GUID, we are bound to this strange inheritance and migration. +// See also FullScreenPassRendererFeature_OldGUIDEditor, for the in editor downcasting. + +#if UNITY_EDITOR +using UnityEditor; +#endif +using UnityEngine; + + +[System.Obsolete("Kept for migration purpose only. Do not use (see script for more info) #from(6000.0) (UnityUpgradable) -> FullScreenPassRendererFeature", true)] +class FullScreenPassRendererFeature_OldGUID : UnityEngine.Rendering.Universal.FullScreenPassRendererFeature, ISerializationCallbackReceiver +{ + void ISerializationCallbackReceiver.OnAfterDeserialize() + { +#if UNITY_EDITOR + // InternalCreate cannot be called in serialization callback... Delaying + EditorApplication.delayCall += DownCast; +#endif + } + +#if UNITY_EDITOR + void DownCast() + { + if (this == null || this.Equals(null)) return; + + const string newGUID = "b00045f12942b46c698459096c89274e"; + const string oldGUID = "6d613f08f173d4dd895bb07b3230baa9"; + + // Check current GUID to be extra sure it is the old one to update + var serializedObject = new SerializedObject(this); + var scriptProperty = serializedObject.FindProperty("m_Script"); + MonoScript currentScript = scriptProperty.objectReferenceValue as MonoScript; + AssetDatabase.TryGetGUIDAndLocalFileIdentifier(currentScript.GetInstanceID(), out var currentGUID, out var _); + if (currentGUID != oldGUID) + return; + + // Mutate to base FullScreenPassRendererFeature script + var newScript = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(newGUID)); + scriptProperty.objectReferenceValue = newScript; + serializedObject.ApplyModifiedProperties(); + } +#endif +} diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature_OldGUID.cs.meta b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature_OldGUID.cs.meta new file mode 100644 index 00000000000..8028956fc52 --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/FullScreenPassRendererFeature_OldGUID.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 6d613f08f173d4dd895bb07b3230baa9 \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/ScreenSpaceAmbientOcclusion.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/ScreenSpaceAmbientOcclusion.cs index dbc6f0fc088..8ba3d62d8ef 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/ScreenSpaceAmbientOcclusion.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/ScreenSpaceAmbientOcclusion.cs @@ -58,6 +58,55 @@ internal enum BlurQualityOptions Low, // Kawase } } + + [Serializable] + [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))] + [Categorization.CategoryInfo(Name = "R: SSAO Shader", Order = 1000)] + [Categorization.ElementInfo(Order = 0), HideInInspector] + class ScreenSpaceAmbientOcclusionPersistentResources : IRenderPipelineResources + { + [SerializeField] + [ResourcePath("Shaders/Utils/ScreenSpaceAmbientOcclusion.shader")] + Shader m_Shader; + + public Shader Shader + { + get => m_Shader; + set => this.SetValueAndNotify(ref m_Shader, value); + } + + public bool isAvailableInPlayerBuild => true; + + [SerializeField][HideInInspector] private int m_Version = 0; + + /// Current version of the resource container. Used only for upgrading a project. + public int version => m_Version; + } + + [Serializable] + [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))] + [Categorization.CategoryInfo(Name = "R: SSAO Noise Textures", Order = 1000)] + [Categorization.ElementInfo(Order = 0), HideInInspector] + class ScreenSpaceAmbientOcclusionDynamicResources : IRenderPipelineResources + { + [SerializeField] + [ResourceFormattedPaths("Textures/BlueNoise256/LDR_LLL1_{0}.png", 0, 7)] + Texture2D[] m_BlueNoise256Textures; + + public Texture2D[] BlueNoise256Textures + { + get => m_BlueNoise256Textures; + set => this.SetValueAndNotify(ref m_BlueNoise256Textures, value); + } + + public bool isAvailableInPlayerBuild => true; + + [SerializeField][HideInInspector] private int m_Version = 0; + + /// Current version of the resource container. Used only for upgrading a project. + public int version => m_Version; + } + /// /// The class for the SSAO renderer feature. @@ -71,19 +120,11 @@ public class ScreenSpaceAmbientOcclusion : ScriptableRendererFeature // Serialized Fields [SerializeField] private ScreenSpaceAmbientOcclusionSettings m_Settings = new ScreenSpaceAmbientOcclusionSettings(); - [SerializeField] - [HideInInspector] - [Reload("Textures/BlueNoise256/LDR_LLL1_{0}.png", 0, 7)] - internal Texture2D[] m_BlueNoise256Textures; - - [SerializeField] - [HideInInspector] - [Reload("Shaders/Utils/ScreenSpaceAmbientOcclusion.shader")] - private Shader m_Shader; - // Private Fields private Material m_Material; private ScreenSpaceAmbientOcclusionPass m_SSAOPass = null; + private Shader m_Shader; + private Texture2D[] m_BlueNoise256Textures; // Internal / Constants internal ref ScreenSpaceAmbientOcclusionSettings settings => ref m_Settings; @@ -97,13 +138,10 @@ public class ScreenSpaceAmbientOcclusion : ScriptableRendererFeature internal const string k_SampleCountLowKeyword = "_SAMPLE_COUNT_LOW"; internal const string k_SampleCountMediumKeyword = "_SAMPLE_COUNT_MEDIUM"; internal const string k_SampleCountHighKeyword = "_SAMPLE_COUNT_HIGH"; - + /// public override void Create() { -#if UNITY_EDITOR - ResourceReloader.TryReloadAllNullIn(this, UniversalRenderPipelineAsset.packagePath); -#endif // Create the pass... if (m_SSAOPass == null) m_SSAOPass = new ScreenSpaceAmbientOcclusionPass(); @@ -130,17 +168,12 @@ public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingD if (UniversalRenderer.IsOffscreenDepthTexture(ref renderingData.cameraData)) return; - if (!GetMaterials()) - { - Debug.LogErrorFormat("{0}.AddRenderPasses(): Missing material. {1} render pass will not be added.", GetType().Name, name); + if (!TryPrepareResources()) return; - } bool shouldAdd = m_SSAOPass.Setup(ref m_Settings, ref renderer, ref m_Material, ref m_BlueNoise256Textures); - if (shouldAdd) - { + if (shouldAdd) renderer.EnqueuePass(m_SSAOPass); - } } /// @@ -151,11 +184,42 @@ protected override void Dispose(bool disposing) CoreUtils.Destroy(m_Material); } - private bool GetMaterials() + bool TryPrepareResources() { + if (m_Shader == null) + { + if (!GraphicsSettings.TryGetRenderPipelineSettings(out var ssaoPersistentResources)) + { + Debug.LogErrorFormat( + $"Couldn't find the required resources for the {nameof(ScreenSpaceAmbientOcclusion)} render feature. If this exception appears in the Player, make sure at least one {nameof(ScreenSpaceAmbientOcclusion)} render feature is enabled or adjust your stripping settings."); + return false; + } + + m_Shader = ssaoPersistentResources.Shader; + } + + if (m_Settings.AOMethod == ScreenSpaceAmbientOcclusionSettings.AOMethodOptions.BlueNoise && (m_BlueNoise256Textures == null || m_BlueNoise256Textures.Length == 0)) + { + if (!GraphicsSettings.TryGetRenderPipelineSettings(out var ssaoDynamicResources)) + { + Debug.LogErrorFormat($"Couldn't load {nameof(ScreenSpaceAmbientOcclusionDynamicResources.BlueNoise256Textures)}. If this exception appears in the Player, please check the SSAO options for {nameof(ScreenSpaceAmbientOcclusion)} or adjust your stripping settings"); + return false; + } + + m_BlueNoise256Textures = ssaoDynamicResources.BlueNoise256Textures; + } + if (m_Material == null && m_Shader != null) m_Material = CoreUtils.CreateEngineMaterial(m_Shader); - return m_Material != null; + + if (m_Material == null) + { + Debug.LogError($"{GetType().Name}.AddRenderPasses(): Missing material. {name} render pass will not be added."); + return false; + } + + return true; + } } } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/ScreenSpaceShadows.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/ScreenSpaceShadows.cs index 12f480fef01..60102ee7f97 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/ScreenSpaceShadows.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RendererFeatures/ScreenSpaceShadows.cs @@ -42,7 +42,7 @@ public override void Create() LoadMaterial(); - m_SSShadowsPass.renderPassEvent = RenderPassEvent.AfterRenderingGbuffer; + m_SSShadowsPass.renderPassEvent = RenderPassEvent.BeforeRenderingGbuffer; m_SSShadowsPostPass.renderPassEvent = RenderPassEvent.BeforeRenderingTransparents; } @@ -68,7 +68,7 @@ public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingD bool usesDeferredLighting = renderer is UniversalRenderer { usesDeferredLighting: true }; m_SSShadowsPass.renderPassEvent = usesDeferredLighting - ? RenderPassEvent.AfterRenderingGbuffer + ? RenderPassEvent.BeforeRenderingGbuffer : RenderPassEvent.AfterRenderingPrePasses + 1; // We add 1 to ensure this happens after depth priming depth copy pass that might be scheduled renderer.EnqueuePass(m_SSShadowsPass); @@ -194,10 +194,16 @@ public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer : GraphicsFormat.B8G8R8A8_UNorm; TextureHandle color = UniversalRenderer.CreateRenderGraphTexture(renderGraph, desc, "_ScreenSpaceShadowmapTexture", true); - using (var builder = renderGraph.AddRasterRenderPass(passName, out var passData, profilingSampler)) + // UUM-85291: Using UnsafePass to not allow this pass to merge with other passes as it can cause issues + // when using Deferred Lighting by breaking up the Draw GBuffer and Deferred Lighting passes because + // of 1) the Deferred Lighting pass reads this resource so it breaks the pass 2) a maximum input attachment + // limit is met when this is moved before Draw GBuffer. + // For now, using an UnsafePass ensures that this pass won't be merged as a fix is found for the other + // underlying issues. + using (var builder = renderGraph.AddUnsafePass(passName, out var passData, profilingSampler)) { passData.target = color; - builder.SetRenderAttachment(color, 0, AccessFlags.Write); + builder.UseTexture(color, AccessFlags.WriteAll); InitPassData(ref passData); builder.AllowGlobalStateModification(true); @@ -205,7 +211,7 @@ public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer if (color.IsValid()) builder.SetGlobalTextureAfterPass(color, m_ScreenSpaceShadowmapTextureID); - builder.SetRenderFunc((PassData data, RasterGraphContext rgContext) => + builder.SetRenderFunc((PassData data, UnsafeGraphContext rgContext) => { ExecutePass(rgContext.cmd, data, data.target); }); @@ -220,6 +226,14 @@ private static void ExecutePass(RasterCommandBuffer cmd, PassData data, RTHandle cmd.SetKeyword(ShaderGlobalKeywords.MainLightShadowScreen, true); } + private static void ExecutePass(UnsafeCommandBuffer cmd, PassData data, RTHandle target) + { + Blitter.BlitTexture(cmd, target, Vector2.one, data.material, 0); + cmd.SetKeyword(ShaderGlobalKeywords.MainLightShadows, false); + cmd.SetKeyword(ShaderGlobalKeywords.MainLightShadowCascades, false); + cmd.SetKeyword(ShaderGlobalKeywords.MainLightShadowScreen, true); + } + /// [Obsolete(DeprecationMessage.CompatibilityScriptingAPIObsolete, false)] public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/RenderingUtils.cs b/Packages/com.unity.render-pipelines.universal/Runtime/RenderingUtils.cs index 4fb15c0c4f5..973da7166bd 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/RenderingUtils.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/RenderingUtils.cs @@ -581,7 +581,7 @@ internal static bool SequenceEqual(RTHandle[] left, RTHandle[] right) return false; for (int i = 0; i < left.Length; ++i) - if (left[i].nameID != right[i].nameID) + if (left[i]?.nameID != right[i]?.nameID) return false; return true; diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRenderer.cs b/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRenderer.cs index cb184013bb3..b5ea11bed01 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRenderer.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRenderer.cs @@ -9,19 +9,33 @@ namespace UnityEngine.Rendering.Universal { /// - /// Class ScriptableRenderer implements a rendering strategy. It describes how culling and lighting works and - /// the effects supported. - /// - /// TODO RENDERGRAPH: UPDATE THIS DOC FOR THE RENDERGRAPH PATH - /// A renderer can be used for all cameras or be overridden on a per-camera basis. It will implement light culling and setup - /// and describe a list of ScriptableRenderPass to execute in a frame. The renderer can be extended to support more effect with additional - /// ScriptableRendererFeature. Resources for the renderer are serialized in ScriptableRendererData. - /// - /// The renderer resources are serialized in ScriptableRendererData. - /// - /// - /// + /// Class ScriptableRenderer implements a rendering strategy. It describes how culling and lighting work and + /// the effects supported. A custom scriptable renderer is the lowest level of extensibility of URP. It allows you + /// to implement a fully new rendering strategy at the expense of a lot more complexity and work. However, It's still + /// a lot less work and more maintainable than writing a full-fledged custom render pipeline. + /// If you want to simply extend the existing URP renderers (2D and 3D), using ScriptableRendererFeature should + /// always be considered first. /// + /// + /// A renderer can be used for all cameras or be overridden on a per-camera basis. It will implement light culling and setup + /// and describe a list of ScriptableRenderPass to execute in a frame. It will also define the RenderGraph to execute. + /// External users can then again extend your scriptable renderer to support more effects with additional ScriptableRendererFeatures. + /// + /// The ScriptableRenderer is a run-time object. The resources and asset data for the renderer are serialized in + /// ScriptableRendererData (more specifically a class derived from ScriptableRendererData which contains additional data for your renderer). + /// + /// The high-level steps needed to create and use your own scriptable renderer are: + /// + /// 1. Create subclasses of ScriptableRenderer and ScriptableRendererData and implement the rendering logic. Key functions to implement here are: + /// ScriptableRenderer.OnRecordRenderGraph which will define the rendergraph to execute when rendering a camera. And ScriptableRendererData.Create to create + /// an instance of your new ScriptableRenderer subclass. + /// 2. Create an asset of your new ScriptableRendererData subclass and assign it to the renderer asset field in the URP asset so it gets picked + /// up at run time. + /// + /// + /// You can find a code sample in the URP tests package in the "Graphics/Tests/SRPTests/Packages/com.unity.testing.urp/Scripts/Runtime/CustomRenderPipeline/" folder + /// of the SRP repository. + /// public abstract partial class ScriptableRenderer : IDisposable { private static partial class Profiling @@ -69,10 +83,10 @@ public static class RenderPass /// /// This setting controls if the camera editor should display the camera stack category. - /// If your renderer is not supporting stacking this one should return 0. - /// For the UI to show the Camera Stack widget this must support CameraRenderType.Base. - /// + /// If your scriptable renderer is not supporting stacking this one should return 0. + /// For the UI to show the Camera Stack widget this must at least support CameraRenderType.Base. /// + /// /// The bitmask of the supported camera render types in the renderer's current state. public virtual int SupportedCameraStackingTypes() { @@ -80,8 +94,10 @@ public virtual int SupportedCameraStackingTypes() } /// - /// Check if the given camera render type is supported in the renderer's current state. + /// Check if the given camera render type is supported in the renderer's current state. The default implementation + /// simply checks if the camera type is part of the bitmask. /// + /// /// The camera render type that is checked if supported. /// True if the given camera render type is supported in the renderer's current state. public bool SupportsCameraStackingType(CameraRenderType cameraRenderType) @@ -115,7 +131,7 @@ protected internal virtual bool SupportsMotionVectors() protected ProfilingSampler profilingExecute { get; set; } /// - /// Used to determine whether to release render targets used by the renderer when the renderer is no more active + /// Used to determine whether to release render targets used by the renderer when the renderer is no more active. /// internal bool hasReleasedRTs = true; @@ -127,15 +143,15 @@ public class RenderingFeatures { /// /// This setting controls if the camera editor should display the camera stack category. - /// Renderers that don't support camera stacking will only render camera of type CameraRenderType.Base - /// - /// + /// Renderers that don't support camera stacking will only render cameras of type CameraRenderType.Base /// + /// + /// [Obsolete("cameraStacking has been deprecated use SupportedCameraRenderTypes() in ScriptableRenderer instead.", true)] public bool cameraStacking { get; set; } = false; /// - /// This setting controls if the Universal Render Pipeline asset should expose MSAA option. + /// This setting controls if the Universal Render Pipeline asset should expose the MSAA option. /// public bool msaa { get; set; } = true; } @@ -153,7 +169,7 @@ public class RenderingFeatures internal static ScriptableRenderer current = null; /// - /// Set camera matrices. This method will set UNITY_MATRIX_V, UNITY_MATRIX_P, UNITY_MATRIX_VP to camera matrices. + /// Set camera matrices. This method will set UNITY_MATRIX_V, UNITY_MATRIX_P, UNITY_MATRIX_VP to the camera matrices. /// Additionally this will also set unity_CameraProjection and unity_CameraProjection. /// If setInverseMatrices is set to true this function will also set UNITY_MATRIX_I_V and UNITY_MATRIX_I_VP. /// This function has no effect when rendering in stereo. When in stereo rendering you cannot override camera matrices. @@ -555,8 +571,8 @@ public RTHandle cameraDepthTargetHandle /// /// Returns a list of renderer features added to this renderer. - /// /// + /// protected List rendererFeatures { get => m_RendererFeatures; @@ -564,23 +580,25 @@ protected List rendererFeatures /// /// Returns a list of render passes scheduled to be executed by this renderer. - /// /// + /// protected List activeRenderPassQueue { get => m_ActiveRenderPassQueue; } /// - /// Supported rendering features by this renderer. - /// + /// Supported rendering features by this renderer. The scriptable renderer framework will use the returned information + /// to adjust things like inspectors, etc. /// + /// public RenderingFeatures supportedRenderingFeatures { get; set; } = new RenderingFeatures(); /// - /// List of unsupported Graphics APIs for this renderer. - /// + /// List of unsupported Graphics APIs for this renderer.The scriptable renderer framework will use the returned information + /// to adjust things like inspectors, etc. /// + /// public GraphicsDeviceType[] unsupportedGraphicsDeviceTypes { get; set; } = new GraphicsDeviceType[0]; static class RenderPassBlock @@ -604,7 +622,8 @@ static class RenderPassBlock const int k_RenderPassBlockCount = 4; /// - /// The RTHandle for the Camera Target. + /// An RTHandle wrapping the BuiltinRenderTextureType.CameraTarget render target. This is a helper + /// that avoids having to (re)allocate a new RTHandle every time the camera target is needed. /// protected static readonly RTHandle k_CameraTarget = RTHandles.Alloc(BuiltinRenderTextureType.CameraTarget); @@ -675,6 +694,11 @@ static class RenderPassBlock private static Plane[] s_Planes = new Plane[6]; private static Vector4[] s_VectorPlanes = new Vector4[6]; + /// + /// In URP RenderGraph (likely not in Compatibility Mode), this returns if the pipeline will actually perform depth priming. + /// Depth priming is done with a prepass to the activeCameraDepth. + /// Even when the settings on the URP asset requests depth priming the pipeline can decide not to do it (or vice versa). + /// internal bool useDepthPriming { get; set; } = false; internal bool stripShadowsOffVariants { get; set; } = false; @@ -740,7 +764,7 @@ public void Dispose() /// Override this function to clean up resources in your renderer. /// Be sure to call this base dispose in your overridden function to free resources allocated by the base. /// - /// + /// See the definition of IDisposable. protected virtual void Dispose(bool disposing) { DebugHandler?.Dispose(); @@ -824,13 +848,15 @@ public virtual void SetupCullingParameters(ref ScriptableCullingParameters culli /// /// Called upon finishing rendering the camera stack. You can release any resources created by the renderer here. /// - /// + /// The command buffer where any work should be recorded on.. public virtual void FinishRendering(CommandBuffer cmd) { } /// - /// Override this method to initialize before recording the render graph, such as resources. + /// Override this method to initialize anything before starting the recording of the render graph, such as resources. + /// This is the last point where it is ok to call ScriptableRenderer.EnqueuePass as after this function the + /// queue will be sorted for the frame. /// public virtual void OnBeginRenderGraphFrame() { @@ -839,14 +865,15 @@ public virtual void OnBeginRenderGraphFrame() /// /// Override this method to record the RenderGraph passes to be used by the RenderGraph render path. /// - /// Use this render context to issue any draw commands during execution. - /// Current render state information. + /// The rendergraph to schedule passes on. + /// The render context to use when creating rendering lists or performing culling operations. Ideally, graphics work should be executed through rendergraph so is is not recommended to use ScriptableRenderContext.ExecuteCommandBuffer. internal virtual void OnRecordRenderGraph(RenderGraph renderGraph, ScriptableRenderContext context) { } /// /// Override this method to cleanup things after recording the render graph, such as resources. + /// This executes after the render graph is recorded but before it is compiled and executed. /// public virtual void OnEndRenderGraphFrame() { @@ -1254,29 +1281,6 @@ internal void RecordCustomRenderGraphPasses(RenderGraph renderGraph, RenderPassE RecordCustomRenderGraphPasses(renderGraph, injectionPoint, injectionPoint); } - // ScriptableRenderPass if executed in a critical point (such as in between Deferred and GBuffer) has to have - // interruptFramebufferFetchEvent set to actually interrupt it so we could fall back to non framebuffer fetch path - internal bool InterruptFramebufferFetch(FramebufferFetchEvent fetchEvent, RenderPassEvent startInjectionPoint, RenderPassEvent endInjectionPoint) - { - int range = ScriptableRenderPass.GetRenderPassEventRange(endInjectionPoint); - int nextValue = (int) endInjectionPoint + range; - - foreach (ScriptableRenderPass pass in m_ActiveRenderPassQueue) - { - if (pass.renderPassEvent >= startInjectionPoint && (int) pass.renderPassEvent < nextValue) - switch (fetchEvent) - { - case FramebufferFetchEvent.FetchGbufferInDeferred: - if (pass.breakGBufferAndDeferredRenderPass) - return true; - break; - default: - continue; - } - } - return false; - } - internal void SetPerCameraProperties(ScriptableRenderContext context, UniversalCameraData cameraData, Camera camera, CommandBuffer cmd) { diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRendererData.cs b/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRendererData.cs index a62e0470509..2bb9245be4a 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRendererData.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRendererData.cs @@ -19,6 +19,18 @@ public abstract partial class ScriptableRendererData : ScriptableObject { internal bool isInvalidated { get; set; } + internal virtual bool stripShadowsOffVariants + { + get => m_StripShadowsOffVariants; + set => m_StripShadowsOffVariants = value; + } + + internal virtual bool stripAdditionalLightOffVariants + { + get => m_StripAdditionalLightOffVariants; + set => m_StripAdditionalLightOffVariants = value; + } + /// /// Creates the instance of the ScriptableRenderer. /// @@ -28,6 +40,10 @@ public abstract partial class ScriptableRendererData : ScriptableObject [SerializeField] internal List m_RendererFeatures = new List(10); [SerializeField] internal List m_RendererFeatureMap = new List(10); [SerializeField] bool m_UseNativeRenderPass = false; + [NonSerialized] + bool m_StripShadowsOffVariants = false; + [NonSerialized] + bool m_StripAdditionalLightOffVariants = false; /// /// List of additional render pass features for this renderer. diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRendererFeature.cs b/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRendererFeature.cs index eb441cadd55..bba4e353066 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRendererFeature.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRendererFeature.cs @@ -41,6 +41,7 @@ public virtual void OnCameraPreCull(ScriptableRenderer renderer, in CameraData c /// /// Renderer used for adding render passes. /// Rendering state. Use this to setup render passes. + [Obsolete(DeprecationMessage.CompatibilityScriptingAPIObsolete, false)] public virtual void SetupRenderPasses(ScriptableRenderer renderer, in RenderingData renderingData) { } void OnEnable() diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/Settings/.buginfo b/Packages/com.unity.render-pipelines.universal/Runtime/Settings/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/Settings/.buginfo +++ b/Packages/com.unity.render-pipelines.universal/Runtime/Settings/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalCameraData.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalCameraData.cs index 25a2b2d1bbc..1702c6b2803 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalCameraData.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalCameraData.cs @@ -32,24 +32,6 @@ public enum CameraOverrideOption UsePipelineSettings, } - /// - /// Options to control the renderer override. - /// This enum is no longer in use. - /// - [Obsolete("Renderer override is no longer used, renderers are referenced by index on the pipeline asset.")] - public enum RendererOverrideOption - { - /// - /// Use this to choose a custom override. - /// - Custom, - - /// - /// Use this to choose the setting set on the pipeline asset. - /// - UsePipelineSettings, - } - /// /// Holds information about the post-processing anti-aliasing mode. /// When set to None no post-processing anti-aliasing pass will be performed. @@ -457,7 +439,7 @@ public static string GetName(this CameraRenderType type) [RequireComponent(typeof(Camera))] [ExecuteAlways] // NOTE: This is required to get calls to OnDestroy() always. Graphics resources are released in OnDestroy(). [URPHelpURL("universal-additional-camera-data")] - public class UniversalAdditionalCameraData : MonoBehaviour, ISerializationCallbackReceiver, IAdditionalData + public partial class UniversalAdditionalCameraData : MonoBehaviour, ISerializationCallbackReceiver, IAdditionalData { const string k_GizmoPath = "Packages/com.unity.render-pipelines.universal/Editor/Gizmos/"; const string k_BaseCameraGizmoPath = k_GizmoPath + "Camera_Base.png"; @@ -502,8 +484,6 @@ public class UniversalAdditionalCameraData : MonoBehaviour, ISerializationCallba [FormerlySerializedAs("requiresColorTexture"), SerializeField] bool m_RequiresColorTexture = false; - [HideInInspector] [SerializeField] float m_Version = 2; - // These persist over multiple frames [NonSerialized] MotionVectorsPersistentData m_MotionVectorsPersistentData = new MotionVectorsPersistentData(); @@ -511,12 +491,7 @@ public class UniversalAdditionalCameraData : MonoBehaviour, ISerializationCallba [NonSerialized] internal UniversalCameraHistory m_History = new UniversalCameraHistory(); [SerializeField] internal TemporalAA.Settings m_TaaSettings = TemporalAA.Settings.Create(); - - /// - /// The serialized version of the class. Used for upgrading. - /// - public float version => m_Version; - + static UniversalAdditionalCameraData s_DefaultAdditionalCameraData = null; internal static UniversalAdditionalCameraData defaultAdditionalCameraData { @@ -942,22 +917,6 @@ public bool allowHDROutput set => m_AllowHDROutput = value; } - /// - public void OnBeforeSerialize() - { - } - - /// - public void OnAfterDeserialize() - { - if (version <= 1) - { - m_RequiresDepthTextureOption = (m_RequiresDepthTexture) ? CameraOverrideOption.On : CameraOverrideOption.Off; - m_RequiresOpaqueTextureOption = (m_RequiresColorTexture) ? CameraOverrideOption.On : CameraOverrideOption.Off; - m_Version = 2; - } - } - /// public void OnValidate() { @@ -1037,5 +996,37 @@ ScriptableRenderer GetRawRenderer() return renderers[m_RendererIndex]; } + + enum Version + { + Initial = 0, + DepthAndOpaqueTextureOptions = 2, + + Count + } + + [SerializeField] Version m_Version = Version.Count; + + // This piece of code is needed because some objects could have been created before existence of Version enum + /// OnBeforeSerialize needed to handle migration before the versioning system was in place. + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + if (m_Version == Version.Count) // serializing a newly created object + m_Version = Version.Count - 1; // mark as up to date + } + + /// OnAfterDeserialize needed to handle migration before the versioning system was in place. + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + if (m_Version == Version.Count) // deserializing and object without version + m_Version = Version.Initial; // reset to run the migration + + if (m_Version < Version.DepthAndOpaqueTextureOptions) + { + m_RequiresDepthTextureOption = (m_RequiresDepthTexture) ? CameraOverrideOption.On : CameraOverrideOption.Off; + m_RequiresOpaqueTextureOption = (m_RequiresColorTexture) ? CameraOverrideOption.On : CameraOverrideOption.Off; + m_Version = Version.DepthAndOpaqueTextureOptions; + } + } } } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalCameraData.deprecated.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalCameraData.deprecated.cs new file mode 100644 index 00000000000..7ebddac65c9 --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalCameraData.deprecated.cs @@ -0,0 +1,31 @@ +using System; + +namespace UnityEngine.Rendering.Universal +{ + /// + /// Options to control the renderer override. + /// This enum is no longer in use. + /// + [Obsolete("Renderer override is no longer used, renderers are referenced by index on the pipeline asset. #from(2023.1)")] + public enum RendererOverrideOption + { + /// + /// Use this to choose a custom override. + /// + Custom, + + /// + /// Use this to choose the setting set on the pipeline asset. + /// + UsePipelineSettings, + } + + public partial class UniversalAdditionalCameraData + { + /// + /// The serialized version of the class. Used for upgrading. + /// + [Obsolete("This field has been deprecated. #from(6000.2)", false)] + public float version => (int)m_Version; + } +} \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalCameraData.deprecated.cs.meta b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalCameraData.deprecated.cs.meta new file mode 100644 index 00000000000..329958e8f51 --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalCameraData.deprecated.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7cb68769fca9417c86969e0d765738c2 +timeCreated: 1740054357 \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalLightData.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalLightData.cs index 25f80c2fc09..210692eb7fd 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalLightData.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalLightData.cs @@ -2,32 +2,6 @@ namespace UnityEngine.Rendering.Universal { - /// Light Layers. - [Flags] - public enum LightLayerEnum - { - /// The light will no affect any object. - Nothing = 0, // Custom name for "Nothing" option - /// Light Layer 0. - LightLayerDefault = 1 << 0, - /// Light Layer 1. - LightLayer1 = 1 << 1, - /// Light Layer 2. - LightLayer2 = 1 << 2, - /// Light Layer 3. - LightLayer3 = 1 << 3, - /// Light Layer 4. - LightLayer4 = 1 << 4, - /// Light Layer 5. - LightLayer5 = 1 << 5, - /// Light Layer 6. - LightLayer6 = 1 << 6, - /// Light Layer 7. - LightLayer7 = 1 << 7, - /// Everything. - Everything = 0xFF, // Custom name for "Everything" option - } - /// /// Contains extension methods for Light class. /// @@ -57,15 +31,8 @@ public static UniversalAdditionalLightData GetUniversalAdditionalLightData(this [DisallowMultipleComponent] [RequireComponent(typeof(Light))] [URPHelpURL("universal-additional-light-data")] - public class UniversalAdditionalLightData : MonoBehaviour, ISerializationCallbackReceiver, IAdditionalData + public partial class UniversalAdditionalLightData : MonoBehaviour, ISerializationCallbackReceiver, IAdditionalData { - // Version 0 means serialized data before the version field. - [SerializeField] int m_Version = 3; - internal int version - { - get => m_Version; - } - [Tooltip("Controls if light Shadow Bias parameters use pipeline settings.")] [SerializeField] bool m_UsePipelineSettings = true; @@ -143,42 +110,6 @@ public int additionalLightsShadowResolutionTier get { return m_AdditionalLightsShadowResolutionTier; } } - // The layer(s) this light belongs too. - [Obsolete("This is obsolete, please use m_RenderingLayerMask instead.", false)] - [SerializeField] LightLayerEnum m_LightLayerMask = LightLayerEnum.LightLayerDefault; - - - /// - /// The layer(s) this light belongs to. - /// - [Obsolete("This is obsolete, please use renderingLayerMask instead.", true)] - public LightLayerEnum lightLayerMask - { - get { return m_LightLayerMask; } - set { m_LightLayerMask = value; } - } - - [SerializeField] uint m_RenderingLayers = 1; - - /// - /// Specifies which rendering layers this light will affect. - /// - public uint renderingLayers - { - get - { - return m_RenderingLayers; - } - set - { - if (m_RenderingLayers != value) - { - m_RenderingLayers = value; - SyncLightAndShadowLayers(); - } - } - } - [SerializeField] bool m_CustomShadowLayers = false; /// @@ -201,39 +132,6 @@ public bool customShadowLayers } } - // The layer(s) used for shadow casting. - [SerializeField] LightLayerEnum m_ShadowLayerMask = LightLayerEnum.LightLayerDefault; - - /// - /// The layer(s) for shadow. - /// - [Obsolete("This is obsolete, please use shadowRenderingLayerMask instead.", true)] - public LightLayerEnum shadowLayerMask - { - get { return m_ShadowLayerMask; } - set { m_ShadowLayerMask = value; } - } - - [SerializeField] uint m_ShadowRenderingLayers = 1; - /// - /// Specifies which rendering layers this light shadows will affect. - /// - public uint shadowRenderingLayers - { - get - { - return m_ShadowRenderingLayers; - } - set - { - if (value != m_ShadowRenderingLayers) - { - m_ShadowRenderingLayers = value; - SyncLightAndShadowLayers(); - } - } - } - /// /// Controls the size of the cookie mask currently assigned to the light. /// @@ -265,37 +163,98 @@ public SoftShadowQuality softShadowQuality get => m_SoftShadowQuality; set => m_SoftShadowQuality = value; } - [SerializeField] private SoftShadowQuality m_SoftShadowQuality = SoftShadowQuality.UsePipelineSettings; + [SerializeField] SoftShadowQuality m_SoftShadowQuality = SoftShadowQuality.UsePipelineSettings; + + [SerializeField] RenderingLayerMask m_RenderingLayersMask = RenderingLayerMask.defaultRenderingLayerMask; + + /// + /// Specifies which rendering layers this light will affect. + /// + public RenderingLayerMask renderingLayers + { + get => m_RenderingLayersMask; + set + { + if (m_RenderingLayersMask == value) return; + m_RenderingLayersMask = value; + SyncLightAndShadowLayers(); + } + } + + [SerializeField] RenderingLayerMask m_ShadowRenderingLayersMask = RenderingLayerMask.defaultRenderingLayerMask; + + /// + /// Specifies which rendering layers this light shadows will affect. + /// + public RenderingLayerMask shadowRenderingLayers + { + get => m_ShadowRenderingLayersMask; + set + { + if (value == m_ShadowRenderingLayersMask) return; + m_ShadowRenderingLayersMask = value; + SyncLightAndShadowLayers(); + } + } + + void SyncLightAndShadowLayers() + { + if (light) + light.renderingLayerMask = m_CustomShadowLayers ? m_ShadowRenderingLayersMask : m_RenderingLayersMask; + } + + enum Version + { + Initial = 0, + RenderingLayers = 2, + SoftShadowQuality = 3, + RenderingLayersMask = 4, + + Count + } + + [SerializeField] Version m_Version = Version.Count; - /// - public void OnBeforeSerialize() + // This piece of code is needed because some objects could have been created before existence of Version enum + /// OnBeforeSerialize needed to handle migration before the versioning system was in place. + void ISerializationCallbackReceiver.OnBeforeSerialize() { + if (m_Version == Version.Count) // serializing a newly created object + m_Version = Version.Count - 1; // mark as up to date } - /// - public void OnAfterDeserialize() + /// OnAfterDeserialize needed to handle migration before the versioning system was in place. + void ISerializationCallbackReceiver.OnAfterDeserialize() { - if (m_Version < 2) + if (m_Version == Version.Count) // deserializing and object without version + m_Version = Version.Initial; // reset to run the migration + + if (m_Version < Version.RenderingLayers) { #pragma warning disable 618 // Obsolete warning m_RenderingLayers = (uint)m_LightLayerMask; m_ShadowRenderingLayers = (uint)m_ShadowLayerMask; #pragma warning restore 618 // Obsolete warning - m_Version = 2; + m_Version = Version.RenderingLayers; } - if (m_Version < 3) + if (m_Version < Version.SoftShadowQuality) { // SoftShadowQuality.UsePipelineSettings added at index 0. Bump existing serialized values by 1. e.g. Low(0) -> Low(1). m_SoftShadowQuality = (SoftShadowQuality)(Math.Clamp((int)m_SoftShadowQuality + 1, 0, (int)SoftShadowQuality.High)); - m_Version = 3; + m_Version = Version.SoftShadowQuality; + } + + if (m_Version < Version.RenderingLayersMask) + { +#pragma warning disable 618 // Obsolete warning + m_RenderingLayersMask = m_RenderingLayers; + m_ShadowRenderingLayersMask = m_ShadowRenderingLayers; +#pragma warning restore 618 // Obsolete warning + m_Version = Version.RenderingLayersMask; } - } - - private void SyncLightAndShadowLayers() - { - if (light) - light.renderingLayerMask = m_CustomShadowLayers ? (int)m_ShadowRenderingLayers : (int)m_RenderingLayers; } } + + } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalLightData.deprecated.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalLightData.deprecated.cs new file mode 100644 index 00000000000..4a2333268ef --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalLightData.deprecated.cs @@ -0,0 +1,80 @@ +using System; + +namespace UnityEngine.Rendering.Universal +{ + /// Light Layers. + [Flags] + [Obsolete("Use RenderingLayerMask instead. #from(6000.2)")] + public enum LightLayerEnum + { + /// The light will no affect any object. + Nothing = 0, // Custom name for "Nothing" option + + /// Light Layer 0. + LightLayerDefault = 1 << 0, + + /// Light Layer 1. + LightLayer1 = 1 << 1, + + /// Light Layer 2. + LightLayer2 = 1 << 2, + + /// Light Layer 3. + LightLayer3 = 1 << 3, + + /// Light Layer 4. + LightLayer4 = 1 << 4, + + /// Light Layer 5. + LightLayer5 = 1 << 5, + + /// Light Layer 6. + LightLayer6 = 1 << 6, + + /// Light Layer 7. + LightLayer7 = 1 << 7, + + /// Everything. + Everything = 0xFF, // Custom name for "Everything" option + } + + public partial class UniversalAdditionalLightData + { + // The layer(s) this light belongs too. + [Obsolete("This is obsolete, please use m_RenderingLayerMask instead. #from(2023.1)", false)] [SerializeField] + LightLayerEnum m_LightLayerMask = LightLayerEnum.LightLayerDefault; + + + /// + /// The layer(s) this light belongs to. + /// + [Obsolete("This is obsolete, please use renderingLayerMask instead. #from(2023.1)", true)] + public LightLayerEnum lightLayerMask + { + get { return m_LightLayerMask; } + set { m_LightLayerMask = value; } + } + + // The layer(s) used for shadow casting. + [Obsolete("This is obsolete, please use m_RenderingLayerMask instead. #from(2023.1)", false)] [SerializeField] + LightLayerEnum m_ShadowLayerMask = LightLayerEnum.LightLayerDefault; + + /// + /// The layer(s) for shadow. + /// + [Obsolete("This is obsolete, please use shadowRenderingLayerMask instead. #from(2023.1)", true)] + public LightLayerEnum shadowLayerMask + { + get { return m_ShadowLayerMask; } + set { m_ShadowLayerMask = value; } + } + + [SerializeField] + [Obsolete("This is obsolete, please use m_RenderingLayersMask instead. #from(6000.2)", false)] + uint m_RenderingLayers = 1; + + [SerializeField] + [Obsolete("This is obsolete, please use renderingLayersMask instead. #from(6000.2)", false)] + uint m_ShadowRenderingLayers = 1; + } +} \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalLightData.deprecated.cs.meta b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalLightData.deprecated.cs.meta new file mode 100644 index 00000000000..e5330eceb37 --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalAdditionalLightData.deprecated.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f89f88ac34eb4af48661362f290b68b3 +timeCreated: 1739808358 \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipelineGlobalSettings.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipelineGlobalSettings.cs index 3d7da07340a..eb08084065f 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipelineGlobalSettings.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipelineGlobalSettings.cs @@ -111,7 +111,7 @@ public static void UpgradeAsset(int assetInstanceID) if (asset.m_AssetVersion < 7) { #pragma warning disable 618 // Type or member is obsolete - if (asset.m_RenderingLayerNames != null) + if (asset.m_RenderingLayerNames is { Length: > 0 }) { for (int i = 1; i < asset.m_RenderingLayerNames.Length; i++) { @@ -130,7 +130,6 @@ public static void UpgradeAsset(int assetInstanceID) RenderPipelineEditorUtility.TrySetRenderingLayerName(i, currentLayerName); } } - #pragma warning restore 618 // Type or member is obsolete asset.m_AssetVersion = 7; } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipelineRenderGraph.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipelineRenderGraph.cs index 5bc402ab8b3..790fafd4922 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipelineRenderGraph.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipelineRenderGraph.cs @@ -1,15 +1,10 @@ -using System.Collections.Generic; +using System; using UnityEngine.Rendering.RenderGraphModule; namespace UnityEngine.Rendering.Universal { public sealed partial class UniversalRenderPipeline { - static void RecordRenderGraph(RenderGraph renderGraph, ScriptableRenderContext context, ScriptableRenderer renderer) - { - renderer.RecordRenderGraph(renderGraph, context); - } - static void RecordAndExecuteRenderGraph(RenderGraph renderGraph, ScriptableRenderContext context, ScriptableRenderer renderer, CommandBuffer cmd, Camera camera, string cameraName) { RenderGraphParameters rgParams = new RenderGraphParameters @@ -20,8 +15,17 @@ static void RecordAndExecuteRenderGraph(RenderGraph renderGraph, ScriptableRende currentFrameIndex = Time.frameCount, }; - renderGraph.BeginRecording(rgParams); - RecordRenderGraph(renderGraph, context, renderer); + try + { + renderGraph.BeginRecording(rgParams); + renderer.RecordRenderGraph(renderGraph, context); + } + catch (Exception e) + { + if (renderGraph.ResetGraphAndLogException(e)) + throw; + return; + } renderGraph.EndRecordingAndExecute(); } } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs index a5af9c1000d..a1a8649cb7c 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs @@ -215,6 +215,7 @@ internal RenderingMode renderingModeActual { internal DeferredLights deferredLights { get => m_DeferredLights; } internal LayerMask opaqueLayerMask { get; set; } internal LayerMask transparentLayerMask { get; set; } + internal bool shadowTransparentReceive { get; set; } internal GraphicsFormat cameraDepthTextureFormat { get => (m_CameraDepthTextureFormat != DepthFormat.Default) ? (GraphicsFormat)m_CameraDepthTextureFormat : CoreUtils.GetDefaultDepthStencilFormat(); } internal GraphicsFormat cameraDepthAttachmentFormat { get => (m_CameraDepthAttachmentFormat != DepthFormat.Default) ? (GraphicsFormat)m_CameraDepthAttachmentFormat : CoreUtils.GetDefaultDepthStencilFormat(); } @@ -266,6 +267,7 @@ public UniversalRenderer(UniversalRendererData data) : base(data) m_IntermediateTextureMode = data.intermediateTextureMode; opaqueLayerMask = data.opaqueLayerMask; transparentLayerMask = data.transparentLayerMask; + shadowTransparentReceive = data.shadowTransparentReceive; if (UniversalRenderPipeline.asset?.supportsLightCookies ?? false) { @@ -280,8 +282,8 @@ public UniversalRenderer(UniversalRendererData data) : base(data) m_LightCookieManager = new LightCookieManager(ref settings); } - this.stripShadowsOffVariants = true; - this.stripAdditionalLightOffVariants = true; + this.stripShadowsOffVariants = data.stripShadowsOffVariants; + this.stripAdditionalLightOffVariants = data.stripAdditionalLightOffVariants; #if ENABLE_VR && ENABLE_VR_MODULE #if PLATFORM_WINRT || PLATFORM_ANDROID // AdditionalLightOff variant is available on HL&Quest platform due to performance consideration. @@ -609,7 +611,7 @@ private void SetupFinalPassDebug(UniversalCameraData cameraData) /// Returns true if the camera renders to depth without any color buffer. It will return false otherwise. public static bool IsOffscreenDepthTexture(UniversalCameraData cameraData) => cameraData.targetTexture != null && cameraData.targetTexture.format == RenderTextureFormat.Depth; - bool IsDepthPrimingEnabled(UniversalCameraData cameraData) + bool IsDepthPrimingEnabledCompatibilityMode(UniversalCameraData cameraData) { #if UNITY_EDITOR // We need to disable depth-priming for DrawCameraMode.Wireframe, since depth-priming forces ZTest to Equal @@ -643,7 +645,7 @@ bool IsDepthPrimingEnabled(UniversalCameraData cameraData) return depthPrimingRequested && isForwardRenderingMode && isFirstCameraToWriteDepth && isNotReflectionCamera && isNotOffscreenDepthTexture && isNotWebGL && isNotMSAA; } - bool IsWebGL() + static bool IsWebGL() { // Both WebGL and WebGPU have issues with depth priming on Apple Arm64 #if PLATFORM_WEBGL @@ -653,7 +655,7 @@ bool IsWebGL() #endif } - bool IsGLESDevice() + static bool IsGLESDevice() { return SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLES3; } @@ -741,7 +743,7 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re #endif // Because of the shortcutting done by depth only offscreen cameras, useDepthPriming must be computed early - useDepthPriming = IsDepthPrimingEnabled(cameraData); + useDepthPriming = IsDepthPrimingEnabledCompatibilityMode(cameraData); // Special path for depth only offscreen cameras. Only write opaques + transparents. if (IsOffscreenDepthTexture(cameraData)) @@ -766,10 +768,7 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re // Gather render pass history requests and update history textures. UpdateCameraHistory(cameraData); - - // Gather render pass input requirements - RenderPassInputSummary renderPassInputs = GetRenderPassInputs(cameraData.IsTemporalAAEnabled(), postProcessingData.isEnabled, cameraData.isSceneViewCamera); - + // Gather render pass require rendering layers event and mask size bool requiresRenderingLayer = RenderingLayerUtils.RequireRenderingLayers(this, rendererFeatures, cameraTargetDescriptor.msaaSamples, @@ -798,9 +797,8 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re } } - // Enable depth normal prepass - if (renderingLayerProvidesByDepthNormalPass) - renderPassInputs.requiresNormalsTexture = true; + // Gather render pass input requirements + RenderPassInputSummary renderPassInputs = GetRenderPassInputs(cameraData.IsTemporalAAEnabled(), postProcessingData.isEnabled, cameraData.isSceneViewCamera, renderingLayerProvidesByDepthNormalPass); // TODO: investigate the order of call, had to change because of requiresRenderingLayer if (m_DeferredLights != null) @@ -909,7 +907,7 @@ public override void Setup(ScriptableRenderContext context, ref RenderingData re } - createColorTexture |= RequiresIntermediateColorTexture(cameraData, ref renderPassInputs); + createColorTexture |= RequiresIntermediateColorTexture(cameraData, in renderPassInputs); createColorTexture &= !isPreviewCamera; // If camera requires depth and there's no depth pre-pass we create a depth texture that can be read later by effect requiring it. @@ -1766,13 +1764,12 @@ private struct RenderPassInputSummary internal bool requiresDepthPrepass; internal bool requiresNormalsTexture; internal bool requiresColorTexture; - internal bool requiresColorTextureCreated; internal bool requiresMotionVectors; internal RenderPassEvent requiresDepthNormalAtEvent; internal RenderPassEvent requiresDepthTextureEarliestEvent; } - private RenderPassInputSummary GetRenderPassInputs(bool isTemporalAAEnabled, bool postProcessingEnabled, bool isSceneViewCamera) + private RenderPassInputSummary GetRenderPassInputs(bool isTemporalAAEnabled, bool postProcessingEnabled, bool isSceneViewCamera, bool renderingLayerProvidesByDepthNormalPass) { RenderPassInputSummary inputSummary = new RenderPassInputSummary(); inputSummary.requiresDepthNormalAtEvent = RenderPassEvent.BeforeRenderingOpaques; @@ -1786,13 +1783,6 @@ private RenderPassInputSummary GetRenderPassInputs(bool isTemporalAAEnabled, boo bool needsMotion = (pass.input & ScriptableRenderPassInput.Motion) != ScriptableRenderPassInput.None; bool eventBeforeRenderingOpaques = pass.renderPassEvent < RenderPassEvent.AfterRenderingOpaques; - // TODO: Need a better way to handle this, probably worth to recheck after render graph - // DBuffer requires color texture created as it does not handle y flip correctly - if (pass is DBufferRenderPass dBufferRenderPass) - { - inputSummary.requiresColorTextureCreated = true; - } - inputSummary.requiresDepthTexture |= needsDepth; // A depth prepass is always required when normals are needed because URP's forward passes don't support rendering into the normals texture @@ -1831,6 +1821,10 @@ private RenderPassInputSummary GetRenderPassInputs(bool isTemporalAAEnabled, boo if (ProbeReferenceVolume.instance.IsProbeSamplingDebugEnabled() && isSceneViewCamera) inputSummary.requiresNormalsTexture = true; #endif + + if (renderingLayerProvidesByDepthNormalPass) + inputSummary.requiresNormalsTexture = true; + return inputSummary; } @@ -1867,7 +1861,7 @@ void CreateCameraRenderTarget(ScriptableRenderContext context, ref RenderTexture if (hasMSAA) { // if depth priming is enabled the copy depth primed pass is meant to do the MSAA resolve, so we want to bind the MS surface - if (IsDepthPrimingEnabled(cameraData)) + if (IsDepthPrimingEnabledCompatibilityMode(cameraData)) depthDescriptor.bindMS = true; else depthDescriptor.bindMS = !(RenderingUtils.MultisampleDepthResolveSupported() && m_CopyDepthMode == CopyDepthMode.AfterTransparents); @@ -1920,7 +1914,7 @@ bool PlatformRequiresExplicitMsaaResolve() /// CameraData contains all relevant render target information for the camera. /// /// Return true if pipeline needs to render to a intermediate render texture. - bool RequiresIntermediateColorTexture(UniversalCameraData cameraData, ref RenderPassInputSummary renderPassInputs) + bool RequiresIntermediateColorTexture(UniversalCameraData cameraData, in RenderPassInputSummary renderPassInputs) { // When rendering a camera stack we always create an intermediate render texture to composite camera results. // We create it upon rendering the Base camera. @@ -1961,7 +1955,7 @@ bool RequiresIntermediateColorTexture(UniversalCameraData cameraData, ref Render return requiresBlitForOffscreenCamera || isScaledRender || isScalableBufferManagerUsed || cameraData.isHdrEnabled || !isCompatibleBackbufferTextureDimension || isCapturing || cameraData.requireSrgbConversion || - renderPassInputs.requiresColorTexture || renderPassInputs.requiresColorTextureCreated ; + renderPassInputs.requiresColorTexture; } // There is two ways to control the dynamic resolution in URP: @@ -1982,7 +1976,7 @@ bool IsScalableBufferManagerUsed(UniversalCameraData cameraData) return dynamicResEnabled && (scaledWidthActive || scaledHeightActive); } - bool CanCopyDepth(UniversalCameraData cameraData) + static bool CanCopyDepth(UniversalCameraData cameraData) { bool msaaEnabledForCamera = cameraData.cameraTargetDescriptor.msaaSamples > 1; bool supportsTextureCopy = SystemInfo.copyTextureSupport != CopyTextureSupport.None; diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererData.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererData.cs index a004e8dda5c..d6f3969a28a 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererData.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererData.cs @@ -344,6 +344,23 @@ public IntermediateTextureMode intermediateTextureMode /// public bool usesClusterLightLoop => m_RenderingMode == RenderingMode.ForwardPlus || m_RenderingMode == RenderingMode.DeferredPlus; + + internal override bool stripShadowsOffVariants + { + get => m_StripShadowsOffVariants; + set => m_StripShadowsOffVariants = value; + } + + internal override bool stripAdditionalLightOffVariants + { + get => m_StripAdditionalLightOffVariants; + set => m_StripAdditionalLightOffVariants = value; + } + + [NonSerialized] + bool m_StripShadowsOffVariants = true; + [NonSerialized] + bool m_StripAdditionalLightOffVariants = true; /// protected override void OnEnable() @@ -363,7 +380,7 @@ private void ReloadAllNullProperties() ResourceReloader.TryReloadAllNullIn(this, UniversalRenderPipelineAsset.packagePath); if (postProcessData != null) - ResourceReloader.TryReloadAllNullIn(postProcessData, UniversalRenderPipelineAsset.packagePath); + postProcessData.Populate(); #endif } diff --git a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs index 3acb713de02..078b1c3dd13 100644 --- a/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs +++ b/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs @@ -274,31 +274,15 @@ internal static TextureHandle CreateRenderGraphTexture(RenderGraph renderGraph, return renderGraph.CreateTexture(rgDesc); } - bool ShouldApplyPostProcessing(bool postProcessEnabled) + bool RequiresIntermediateAttachments(UniversalCameraData cameraData, in RenderPassInputSummary renderPassInputs, bool requireCopyFromDepth) { - return postProcessEnabled && m_PostProcessPasses.isCreated; - } - - bool CameraHasPostProcessingWithDepth(UniversalCameraData cameraData) - { - return ShouldApplyPostProcessing(cameraData.postProcessEnabled) && cameraData.postProcessingRequiresDepthTexture; - } - - bool RequiresIntermediateAttachments(UniversalCameraData cameraData, ref RenderPassInputSummary renderPassInputs) - { - var requiresDepthPrepass = RequireDepthPrepass(cameraData, ref renderPassInputs); - var requireColorTexture = HasActiveRenderFeatures() && m_IntermediateTextureMode == IntermediateTextureMode.Always; requireColorTexture |= HasPassesRequiringIntermediateTexture(); requireColorTexture |= Application.isEditor && usesClusterLightLoop; - requireColorTexture |= RequiresIntermediateColorTexture(cameraData, ref renderPassInputs); - - var requireDepthTexture = RequireDepthTexture(cameraData, requiresDepthPrepass, ref renderPassInputs); - - useDepthPriming = IsDepthPrimingEnabled(cameraData); + requireColorTexture |= RequiresIntermediateColorTexture(cameraData, in renderPassInputs); // Intermediate texture has different yflip state than backbuffer. In case we use intermediate texture, we must use both color and depth together. - return (requireColorTexture || requireDepthTexture); + return (requireColorTexture || requireCopyFromDepth); } // Gather history render requests and manage camera history texture life-time. @@ -342,23 +326,89 @@ private void UpdateCameraHistory(UniversalCameraData cameraData) const string _CameraUpscaledTargetAttachmentAName = "_CameraUpscaledTargetAttachmentA"; const string _CameraUpscaledTargetAttachmentBName = "_CameraUpscaledTargetAttachmentB"; - void CreateRenderGraphCameraRenderTargets(RenderGraph renderGraph, bool isCameraTargetOffscreenDepth) + void CreateRenderGraphCameraRenderTargets(RenderGraph renderGraph, bool isCameraTargetOffscreenDepth, in RenderPassInputSummary renderPassInputs, bool requireDepthTexture, bool requireDepthPrepass) { UniversalResourceData resourceData = frameData.Get(); UniversalCameraData cameraData = frameData.Get(); UniversalPostProcessingData postProcessingData = frameData.Get(); - bool lastCameraInTheStack = cameraData.resolveFinalTarget; - bool isBuiltInTexture = (cameraData.targetTexture == null); + var clearCameraParams = GetClearCameraParams(cameraData); - RenderTargetIdentifier targetColorId = cameraData.targetTexture != null ? new RenderTargetIdentifier(cameraData.targetTexture) : BuiltinRenderTextureType.CameraTarget; - RenderTargetIdentifier targetDepthId = cameraData.targetTexture != null ? new RenderTargetIdentifier(cameraData.targetTexture) : BuiltinRenderTextureType.Depth; + // Setup backbuffer RTHandles before importing them to RG + SetupTargetHandles(cameraData); + + // Gather render pass history requests and update history textures. + UpdateCameraHistory(cameraData); + + //Only use a depth format when we do a prepass directly the cameraDepthTexture. If we do depth priming (ie, prepass to the activeCameraDepth), we don't do a prepass to the texture. Instead, we do a copy from the primed attachment. + bool prepassToCameraDepthTexture = requireDepthPrepass && !useDepthPriming; + bool depthTextureIsDepthFormat = prepassToCameraDepthTexture; + bool requireCopyFromDepth = requireDepthTexture && !prepassToCameraDepthTexture; + + // We configure this for the first camera of the stack and overlay camera will reuse create color/depth var + // to pick the correct target, as if there is an intermediate texture, overlay cam should use them + if (cameraData.renderType == CameraRenderType.Base) + m_RequiresIntermediateAttachments = RequiresIntermediateAttachments(cameraData, in renderPassInputs, requireCopyFromDepth); + // Import backbuffers to Render Graph + ImportBackBuffers(renderGraph, cameraData, clearCameraParams.clearValue, isCameraTargetOffscreenDepth); + + // If required, create intermediate color attachment where URP will render before final blit + if (m_RequiresIntermediateAttachments && !isCameraTargetOffscreenDepth) + { + CreateIntermediateCameraColorAttachment(renderGraph, cameraData, clearCameraParams.mustClearColor, clearCameraParams.clearValue); + } + else + { + resourceData.activeColorID = UniversalResourceData.ActiveID.BackBuffer; + } + + + + // If required, create intermediate depth attachment + if (m_RequiresIntermediateAttachments) + { + CreateIntermediateCameraDepthAttachment(renderGraph, cameraData, clearCameraParams.mustClearDepth, clearCameraParams.clearValue, depthTextureIsDepthFormat); + } + else + { + resourceData.activeDepthID = UniversalResourceData.ActiveID.BackBuffer; + } + + CreateCameraDepthCopyTexture(renderGraph, cameraData.cameraTargetDescriptor, depthTextureIsDepthFormat); + + CreateCameraNormalsTexture(renderGraph, cameraData.cameraTargetDescriptor); + + CreateMotionVectorTextures(renderGraph, cameraData.cameraTargetDescriptor); + + CreateRenderingLayersTexture(renderGraph, cameraData.cameraTargetDescriptor); + + if (!isCameraTargetOffscreenDepth) + CreateAfterPostProcessTexture(renderGraph, cameraData.cameraTargetDescriptor); + } + + private readonly struct ClearCameraParams + { + internal readonly bool mustClearColor; + internal readonly bool mustClearDepth; + internal readonly Color clearValue; + + internal ClearCameraParams(bool clearColor, bool clearDepth, Color clearVal) + { + mustClearColor = clearColor; + mustClearDepth = clearDepth; + clearValue = clearVal; + } + } + + ClearCameraParams GetClearCameraParams(UniversalCameraData cameraData) + { bool clearColor = cameraData.renderType == CameraRenderType.Base; bool clearDepth = cameraData.renderType == CameraRenderType.Base || cameraData.clearDepth; + // if the camera background type is "uninitialized" clear using a yellow color, so users can clearly understand the underlying behaviour // only exception being if we are rendering to an external texture - Color cameraBackgroundColor = (cameraData.camera.clearFlags == CameraClearFlags.Nothing && cameraData.targetTexture == null) ? Color.yellow : cameraData.backgroundColor; + Color clearVal = (cameraData.camera.clearFlags == CameraClearFlags.Nothing && cameraData.targetTexture == null) ? Color.yellow : cameraData.backgroundColor; // If scene filtering is enabled (prefab edit mode), the filtering is implemented compositing some builtin ImageEffect passes. // For the composition to work, we need to clear the color buffer alpha to 0 @@ -370,7 +420,7 @@ void CreateRenderGraphCameraRenderTargets(RenderGraph renderGraph, bool isCamera // TODO: We should implement filtering fully in SRP to remove builtin dependencies if (IsSceneFilteringEnabled(cameraData.camera)) { - cameraBackgroundColor.a = 0; + clearVal.a = 0; clearDepth = false; } @@ -382,26 +432,23 @@ void CreateRenderGraphCameraRenderTargets(RenderGraph renderGraph, bool isCamera clearDepth = true; if ((DebugHandler != null) && DebugHandler.IsActiveForCamera(cameraData.isPreviewCamera)) { - DebugHandler.TryGetScreenClearColor(ref cameraBackgroundColor); + DebugHandler.TryGetScreenClearColor(ref clearVal); } } - ImportResourceParams importColorParams = new ImportResourceParams(); - importColorParams.clearOnFirstUse = clearColor; // && cameraData.camera.clearFlags != CameraClearFlags.Nothing; - importColorParams.clearColor = cameraBackgroundColor; - importColorParams.discardOnLastUse = false; + return new ClearCameraParams(clearColor, clearDepth, clearVal); + } - ImportResourceParams importDepthParams = new ImportResourceParams(); - importDepthParams.clearOnFirstUse = clearDepth; - importDepthParams.clearColor = cameraBackgroundColor; - importDepthParams.discardOnLastUse = false; + void SetupTargetHandles(UniversalCameraData cameraData) + { + RenderTargetIdentifier targetColorId = cameraData.targetTexture != null ? new RenderTargetIdentifier(cameraData.targetTexture) : BuiltinRenderTextureType.CameraTarget; + RenderTargetIdentifier targetDepthId = cameraData.targetTexture != null ? new RenderTargetIdentifier(cameraData.targetTexture) : BuiltinRenderTextureType.Depth; #if ENABLE_VR && ENABLE_XR_MODULE if (cameraData.xr.enabled) { targetColorId = cameraData.xr.renderTarget; targetDepthId = cameraData.xr.renderTarget; - isBuiltInTexture = false; } #endif @@ -409,7 +456,7 @@ void CreateRenderGraphCameraRenderTargets(RenderGraph renderGraph, bool isCamera { m_TargetColorHandle = RTHandles.Alloc(targetColorId, "Backbuffer color"); } - else if(m_TargetColorHandle.nameID != targetColorId) + else if (m_TargetColorHandle.nameID != targetColorId) { RTHandleStaticHelpers.SetRTHandleUserManagedWrapper(ref m_TargetColorHandle, targetColorId); } @@ -422,244 +469,6 @@ void CreateRenderGraphCameraRenderTargets(RenderGraph renderGraph, bool isCamera { RTHandleStaticHelpers.SetRTHandleUserManagedWrapper(ref m_TargetDepthHandle, targetDepthId); } - - // Gather render pass history requests and update history textures. - UpdateCameraHistory(cameraData); - - RenderPassInputSummary renderPassInputs = GetRenderPassInputs(cameraData.IsTemporalAAEnabled(), postProcessingData.isEnabled, cameraData.isSceneViewCamera); - - // Enable depth normal prepass if it's needed by rendering layers - if (m_RenderingLayerProvidesByDepthNormalPass) - renderPassInputs.requiresNormalsTexture = true; - - // We configure this for the first camera of the stack and overlay camera will reuse create color/depth var - // to pick the correct target, as if there is an intermediate texture, overlay cam should use them - if (cameraData.renderType == CameraRenderType.Base) - m_RequiresIntermediateAttachments = RequiresIntermediateAttachments(cameraData, ref renderPassInputs); - - // The final output back buffer should be cleared by the graph on first use only if we have no final blit pass. - // If there is a final blit, that blit will write the buffers so on first sight an extra clear should not be problem, - // blit will simply blit over the cleared values. BUT! the final blit may not write the whole buffer in case of a camera - // with a Viewport Rect smaller than the full screen. So the existing backbuffer contents need to be preserved in this case. - // Finally for non-base cameras the backbuffer should never be cleared. (Note that there might still be two base cameras - // rendering to the same screen. See e.g. test foundation 014 that renders a minimap) - bool clearBackbufferOnFirstUse = (cameraData.renderType == CameraRenderType.Base) && !m_RequiresIntermediateAttachments; - - // force the clear if we are rendering to an offscreen depth texture - clearBackbufferOnFirstUse |= isCameraTargetOffscreenDepth; - - // UI Overlay is rendered by native engine if not done within SRP - // To check if the engine does it natively post-URP, we look at SupportedRenderingFeatures - // and restrict it to cases where we resolve to screen and render UI overlay, i.e mostly final camera for game view - // We cannot use directly !cameraData.rendersOverlayUI but this is similar logic - bool isNativeUIOverlayRenderingAfterURP = !SupportedRenderingFeatures.active.rendersUIOverlay && cameraData.resolveToScreen; - bool isNativeRenderingAfterURP = UnityEngine.Rendering.Watermark.IsVisible() || isNativeUIOverlayRenderingAfterURP; - // If MSAA > 1, no extra native rendering after SRP and we target the BB directly (!m_RequiresIntermediateAttachments) - // then we can discard MSAA buffers and only resolve, otherwise we must store and resolve - bool noStoreOnlyResolveBBColor = !m_RequiresIntermediateAttachments && !isNativeRenderingAfterURP && (cameraData.cameraTargetDescriptor.msaaSamples > 1); - - ImportResourceParams importBackbufferColorParams = new ImportResourceParams(); - importBackbufferColorParams.clearOnFirstUse = clearBackbufferOnFirstUse; - importBackbufferColorParams.clearColor = cameraBackgroundColor; - importBackbufferColorParams.discardOnLastUse = noStoreOnlyResolveBBColor; - - ImportResourceParams importBackbufferDepthParams = new ImportResourceParams(); - importBackbufferDepthParams.clearOnFirstUse = clearBackbufferOnFirstUse; - importBackbufferDepthParams.clearColor = cameraBackgroundColor; - importBackbufferDepthParams.discardOnLastUse = !isCameraTargetOffscreenDepth; - -#if UNITY_EDITOR - // on TBDR GPUs like Apple M1/M2, we need to preserve the backbuffer depth for overlay cameras in Editor for Gizmos - if (cameraData.isSceneViewCamera) - importBackbufferDepthParams.discardOnLastUse = false; -#endif -#if ENABLE_VR && ENABLE_XR_MODULE - // some XR devices require depth data to composite the final image. In such case, we need to preserve the eyetexture(backbuffer) depth. - if (cameraData.xr.enabled && cameraData.xr.copyDepth) - { - importBackbufferDepthParams.discardOnLastUse = false; - } -#endif - - // For BuiltinRenderTextureType wrapping RTHandles RenderGraph can't know what they are so we have to pass it in. - RenderTargetInfo importInfo = new RenderTargetInfo(); - RenderTargetInfo importInfoDepth = new RenderTargetInfo(); - - // So the render target we pass into render graph is - // RTHandles(RenderTargetIdentifier(BuiltinRenderTextureType.CameraTarget)) - // or - // RTHandles(RenderTargetIdentifier(RenderTexture(cameraData.targetTexture))) - // - // Because of the RenderTargetIdentifier in the "wrapper chain" the graph can't know - // the size of the passed in textures so we need to provide it for the graph. - // The amount of texture handle wrappers and their subtleties is probably something to be investigated. - if (isBuiltInTexture) - { - // Backbuffer is the final render target, we obtain its number of MSAA samples through Screen API - // in some cases we disable multisampling for optimization purpose - int numSamples = AdjustAndGetScreenMSAASamples(renderGraph, m_RequiresIntermediateAttachments); - - //BuiltinRenderTextureType.CameraTarget so this is either system render target or camera.targetTexture if non null - //NOTE: Careful what you use here as many of the properties bake-in the camera rect so for example - //cameraData.cameraTargetDescriptor.width is the width of the rectangle but not the actual render target - //same with cameraData.camera.pixelWidth - importInfo.width = Screen.width; - importInfo.height = Screen.height; - importInfo.volumeDepth = 1; - importInfo.msaaSamples = numSamples; - - importInfo.format = cameraData.cameraTargetDescriptor.graphicsFormat; - - importInfoDepth = importInfo; - - importInfoDepth.format = cameraData.cameraTargetDescriptor.depthStencilFormat; - } - else - { -#if ENABLE_VR && ENABLE_XR_MODULE - if (cameraData.xr.enabled) - { - importInfo.width = cameraData.xr.renderTargetDesc.width; - importInfo.height = cameraData.xr.renderTargetDesc.height; - importInfo.volumeDepth = cameraData.xr.renderTargetDesc.volumeDepth; - importInfo.msaaSamples = cameraData.xr.renderTargetDesc.msaaSamples; - importInfo.format = cameraData.xr.renderTargetDesc.graphicsFormat; - - importInfoDepth = importInfo; - importInfoDepth.format = cameraData.xr.renderTargetDesc.depthStencilFormat; - } - else -#endif - { - importInfo.width = cameraData.targetTexture.width; - importInfo.height = cameraData.targetTexture.height; - importInfo.volumeDepth = cameraData.targetTexture.volumeDepth; - importInfo.msaaSamples = cameraData.targetTexture.antiAliasing; - importInfo.format = cameraData.targetTexture.graphicsFormat; - - importInfoDepth = importInfo; - importInfoDepth.format = cameraData.targetTexture.depthStencilFormat; - } - - // We let users know that a depth format is required for correct usage, but we fallback to the old default depth format behaviour to avoid regressions - if (importInfoDepth.format == GraphicsFormat.None) - { - importInfoDepth.format = SystemInfo.GetGraphicsFormat(DefaultFormat.DepthStencil); - Debug.LogWarning("In the render graph API, the output Render Texture must have a depth buffer. When you select a Render Texture in any camera's Output Texture property, the Depth Stencil Format property of the texture must be set to a value other than None."); - } - } - - // TODO: Don't think the backbuffer color and depth should be imported at all if !isBuiltinTexture, double check - if (!isCameraTargetOffscreenDepth) - resourceData.backBufferColor = renderGraph.ImportTexture(m_TargetColorHandle, importInfo, importBackbufferColorParams); - - resourceData.backBufferDepth = renderGraph.ImportTexture(m_TargetDepthHandle, importInfoDepth, importBackbufferDepthParams); - - #region Intermediate Camera Target - - if (m_RequiresIntermediateAttachments && !isCameraTargetOffscreenDepth) - { - var cameraTargetDescriptor = cameraData.cameraTargetDescriptor; - cameraTargetDescriptor.useMipMap = false; - cameraTargetDescriptor.autoGenerateMips = false; - cameraTargetDescriptor.depthStencilFormat = GraphicsFormat.None; - - RenderingUtils.ReAllocateHandleIfNeeded(ref m_RenderGraphCameraColorHandles[0], cameraTargetDescriptor, FilterMode.Bilinear, TextureWrapMode.Clamp, name: _CameraTargetAttachmentAName); - RenderingUtils.ReAllocateHandleIfNeeded(ref m_RenderGraphCameraColorHandles[1], cameraTargetDescriptor, FilterMode.Bilinear, TextureWrapMode.Clamp, name: _CameraTargetAttachmentBName); - - // Make sure that the base camera always starts rendering to the ColorAttachmentA for deterministic frame results. - // Not doing so makes the targets look different every frame, causing the frame debugger to flash, and making debugging harder. - if (cameraData.renderType == CameraRenderType.Base) - { - m_CurrentColorHandle = 0; - - // Base camera rendering always starts with a pre-upscale size color target - // If upscaling happens during the frame, we'll switch to the post-upscale color target size and any overlay camera that renders on top should inherit the upscaled size - m_UseUpscaledColorHandle = false; - } - - importColorParams.discardOnLastUse = lastCameraInTheStack; - resourceData.cameraColor = renderGraph.ImportTexture(currentRenderGraphCameraColorHandle, importColorParams); - resourceData.activeColorID = UniversalResourceData.ActiveID.Camera; - - // If STP is enabled, we'll be upscaling the rendered frame during the post processing logic. - // Once upscaling occurs, we must use different set of color handles that reflect the upscaled size. - if (cameraData.IsSTPEnabled()) - { - var upscaledTargetDesc = cameraTargetDescriptor; - upscaledTargetDesc.width = cameraData.pixelWidth; - upscaledTargetDesc.height = cameraData.pixelHeight; - - RenderingUtils.ReAllocateHandleIfNeeded(ref m_RenderGraphUpscaledCameraColorHandles[0], upscaledTargetDesc, FilterMode.Point, TextureWrapMode.Clamp, name: _CameraUpscaledTargetAttachmentAName); - RenderingUtils.ReAllocateHandleIfNeeded(ref m_RenderGraphUpscaledCameraColorHandles[1], upscaledTargetDesc, FilterMode.Point, TextureWrapMode.Clamp, name: _CameraUpscaledTargetAttachmentBName); - } - } - else - { - resourceData.activeColorID = UniversalResourceData.ActiveID.BackBuffer; - } - - bool depthTextureIsDepthFormat = RequireDepthPrepass(cameraData, ref renderPassInputs) && !usesDeferredLighting; - - if (m_RequiresIntermediateAttachments) - { - var depthDescriptor = cameraData.cameraTargetDescriptor; - depthDescriptor.useMipMap = false; - depthDescriptor.autoGenerateMips = false; - - bool hasMSAA = depthDescriptor.msaaSamples > 1; - bool resolveDepth = RenderingUtils.MultisampleDepthResolveSupported() && renderGraph.nativeRenderPassesEnabled; - - // If we aren't using hardware depth resolves and we have MSAA, we need to resolve depth manually by binding as an MSAA texture. - depthDescriptor.bindMS = !resolveDepth && hasMSAA; - - // binding MS surfaces is not supported by the GLES backend, and it won't be fixed after investigating - // the high performance impact of potential fixes, which would make it more expensive than depth prepass (fogbugz 1339401 for more info) - if (IsGLESDevice()) - depthDescriptor.bindMS = false; - - depthDescriptor.graphicsFormat = GraphicsFormat.None; - depthDescriptor.depthStencilFormat = cameraDepthAttachmentFormat; - - RenderingUtils.ReAllocateHandleIfNeeded(ref m_RenderGraphCameraDepthHandle, depthDescriptor, FilterMode.Point, TextureWrapMode.Clamp, name: "_CameraDepthAttachment"); - - importDepthParams.discardOnLastUse = lastCameraInTheStack; - #if UNITY_EDITOR - // scene filtering will reuse "camera" depth from the normal pass for the "filter highlight" effect - if (cameraData.isSceneViewCamera && CoreUtils.IsSceneFilteringEnabled()) - importDepthParams.discardOnLastUse = false; - #endif - - resourceData.cameraDepth = renderGraph.ImportTexture(m_RenderGraphCameraDepthHandle, importDepthParams); - resourceData.activeDepthID = UniversalResourceData.ActiveID.Camera; - - // Configure the copy depth pass based on the allocated depth texture - m_CopyDepthPass.MsaaSamples = depthDescriptor.msaaSamples; - m_CopyDepthPass.CopyToDepth = depthTextureIsDepthFormat; - - var copyResolvedDepth = !depthDescriptor.bindMS; - m_CopyDepthPass.m_CopyResolvedDepth = copyResolvedDepth; - -#if ENABLE_VR && ENABLE_XR_MODULE - m_XRCopyDepthPass.m_CopyResolvedDepth = copyResolvedDepth; -#endif - } - else - { - resourceData.activeDepthID = UniversalResourceData.ActiveID.BackBuffer; - } - #endregion - - CreateCameraDepthCopyTexture(renderGraph, cameraData.cameraTargetDescriptor, depthTextureIsDepthFormat); - - CreateCameraNormalsTexture(renderGraph, cameraData.cameraTargetDescriptor); - - CreateMotionVectorTextures(renderGraph, cameraData.cameraTargetDescriptor); - - CreateRenderingLayersTexture(renderGraph, cameraData.cameraTargetDescriptor); - - if (!isCameraTargetOffscreenDepth) - CreateAfterPostProcessTexture(renderGraph, cameraData.cameraTargetDescriptor); } void SetupRenderingLayers(int msaaSamples) @@ -766,6 +575,7 @@ internal override void OnRecordRenderGraph(RenderGraph renderGraph, ScriptableRe UniversalRenderingData renderingData = frameData.Get(); UniversalCameraData cameraData = frameData.Get(); UniversalLightData lightData = frameData.Get(); + UniversalPostProcessingData postProcessingData = frameData.Get(); useRenderPassEnabled = renderGraph.nativeRenderPassesEnabled; @@ -777,7 +587,17 @@ internal override void OnRecordRenderGraph(RenderGraph renderGraph, ScriptableRe bool isCameraTargetOffscreenDepth = cameraData.camera.targetTexture != null && cameraData.camera.targetTexture.format == RenderTextureFormat.Depth; - CreateRenderGraphCameraRenderTargets(renderGraph, isCameraTargetOffscreenDepth); + RenderPassInputSummary renderPassInputs = GetRenderPassInputs(cameraData.IsTemporalAAEnabled(), postProcessingData.isEnabled, cameraData.isSceneViewCamera, m_RenderingLayerProvidesByDepthNormalPass); + + bool applyPostProcessing = cameraData.postProcessEnabled && m_PostProcessPasses.isCreated; + bool requireDepthTexture = RequireDepthTexture(cameraData, in renderPassInputs, applyPostProcessing); + bool requirePrepassForTextures = RequirePrepassForTextures(cameraData, renderPassInputs, requireDepthTexture); + + useDepthPriming = IsDepthPrimingEnabledRenderGraph(cameraData, renderPassInputs, m_DepthPrimingMode, requireDepthTexture, requirePrepassForTextures, usesDeferredLighting); + + bool requirePrepass = requirePrepassForTextures || useDepthPriming; + + CreateRenderGraphCameraRenderTargets(renderGraph, isCameraTargetOffscreenDepth, renderPassInputs, requireDepthTexture, requirePrepass); if (DebugHandler != null) DebugHandler.Setup(renderGraph, cameraData.isPreviewCamera); @@ -801,9 +621,9 @@ internal override void OnRecordRenderGraph(RenderGraph renderGraph, ScriptableRe BeginRenderGraphXRRendering(renderGraph); - OnMainRendering(renderGraph, context); + OnMainRendering(renderGraph, context, renderPassInputs, requirePrepass, requireDepthTexture); - OnAfterRendering(renderGraph); + OnAfterRendering(renderGraph, applyPostProcessing); EndRenderGraphXRRendering(renderGraph); } @@ -989,10 +809,10 @@ private void RecordCustomPassesWithDepthCopyAndMotion(RenderGraph renderGraph, U // This produces a set of partial depth & normal buffers that must be completed by the gbuffer pass later in the frame. // This allows us to produce complete depth & normals data before lighting takes place, but it isn't valid when custom // passes require this data before the gbuffer pass finishes. - private bool AllowPartialDepthNormalsPrepass(bool isDeferred, RenderPassEvent requiresDepthNormalEvent) + private static bool AllowPartialDepthNormalsPrepass(bool isDeferred, RenderPassEvent requiresDepthNormalEvent, bool useDepthPriming) { return isDeferred && ((RenderPassEvent.AfterRenderingGbuffer <= requiresDepthNormalEvent) && - (requiresDepthNormalEvent <= RenderPassEvent.BeforeRenderingOpaques)); + (requiresDepthNormalEvent <= RenderPassEvent.BeforeRenderingOpaques)) && useDepthPriming; } // Enumeration of possible positions within the frame where the depth copy can occur @@ -1080,25 +900,16 @@ private struct TextureCopySchedules internal ColorCopySchedule color; } - private TextureCopySchedules CalculateTextureCopySchedules(UniversalCameraData cameraData, RenderPassInputSummary renderPassInputs, bool isDeferred, bool requiresDepthPrepass, bool hasFullPrepass) + private TextureCopySchedules CalculateTextureCopySchedules(UniversalCameraData cameraData, in RenderPassInputSummary renderPassInputs, bool requiresDepthPrepass, bool hasFullPrepass, bool requireDepthTexture) { - // If Camera's PostProcessing is enabled and if there any enabled PostProcessing requires depth texture as shader read resource (Motion Blur/DoF) - bool cameraHasPostProcessingWithDepth = CameraHasPostProcessingWithDepth(cameraData); - - // Determine if we read the contents of the depth texture at some point in the frame - bool depthTextureUsed = (cameraData.requiresDepthTexture || cameraHasPostProcessingWithDepth || renderPassInputs.requiresDepthTexture) || - DebugHandlerRequireDepthPass(frameData.Get()); - // Assume the depth texture is unused and no copy is needed until we determine otherwise DepthCopySchedule depth = DepthCopySchedule.None; // If the depth texture is read during the frame, determine when the copy should occur - if (depthTextureUsed) + if (requireDepthTexture) { - // In forward, the depth prepass typically writes directly to the depth texture so no copy is needed. However, when depth priming is enabled, - // the prepass targets the depth attachment instead, so we still have to perform a depth copy to populate the depth texture. - // In deferred, the depth prepass writes to the depth attachment so a copy must happen later in the frame. - bool depthTextureRequiresCopy = (isDeferred || (!requiresDepthPrepass || useDepthPriming)); + //The prepass will render directly to the depthTexture when not using depth priming. Therefore we don't need a copy in that case. + bool depthTextureRequiresCopy = (!requiresDepthPrepass || useDepthPriming); depth = depthTextureRequiresCopy ? CalculateDepthCopySchedule(renderPassInputs.requiresDepthTextureEarliestEvent, hasFullPrepass) : DepthCopySchedule.DuringPrepass; @@ -1136,7 +947,7 @@ private void ExecuteScheduledDepthCopyWithMotion(RenderGraph renderGraph, Univer RenderMotionVectors(renderGraph, resourceData); } - private void OnMainRendering(RenderGraph renderGraph, ScriptableRenderContext context) + private void OnMainRendering(RenderGraph renderGraph, ScriptableRenderContext context, in RenderPassInputSummary renderPassInputs, bool requiresPrepass, bool requireDepthTexture) { UniversalRenderingData renderingData = frameData.Get(); UniversalResourceData resourceData = frameData.Get(); @@ -1157,28 +968,22 @@ private void OnMainRendering(RenderGraph renderGraph, ScriptableRenderContext co RecordCustomRenderGraphPasses(renderGraph, RenderPassEvent.BeforeRenderingPrePasses); - RenderPassInputSummary renderPassInputs = GetRenderPassInputs(cameraData.IsTemporalAAEnabled(), postProcessingData.isEnabled, cameraData.isSceneViewCamera); - - if (m_RenderingLayerProvidesByDepthNormalPass) - renderPassInputs.requiresNormalsTexture = true; - - bool requiresDepthPrepass = RequireDepthPrepass(cameraData, ref renderPassInputs); - bool isDepthOnlyPrepass = requiresDepthPrepass && !renderPassInputs.requiresNormalsTexture; - bool isDepthNormalPrepass = requiresDepthPrepass && renderPassInputs.requiresNormalsTexture; + bool isDepthOnlyPrepass = requiresPrepass && !renderPassInputs.requiresNormalsTexture; + bool isDepthNormalPrepass = requiresPrepass && renderPassInputs.requiresNormalsTexture; // The depth prepass is considered "full" (renders the entire scene, not a partial subset), when we either: // - Have a depth only prepass (URP always renders the full scene in depth only mode) // - Have a depth normals prepass that does not allow the partial prepass optimization - bool hasFullPrepass = isDepthOnlyPrepass || (isDepthNormalPrepass && !AllowPartialDepthNormalsPrepass(usesDeferredLighting, renderPassInputs.requiresDepthNormalAtEvent)); + bool hasFullPrepass = isDepthOnlyPrepass || (isDepthNormalPrepass && !AllowPartialDepthNormalsPrepass(usesDeferredLighting, renderPassInputs.requiresDepthNormalAtEvent, useDepthPriming)); - TextureCopySchedules copySchedules = CalculateTextureCopySchedules(cameraData, renderPassInputs, usesDeferredLighting, requiresDepthPrepass, hasFullPrepass); + TextureCopySchedules copySchedules = CalculateTextureCopySchedules(cameraData, renderPassInputs, requiresPrepass, hasFullPrepass, requireDepthTexture); // Decide if & when to use GPU Occlusion Culling. // In deferred, do it during gbuffer laydown unless we are forced to do a *full* prepass by a render pass. // In forward, if there's a depth prepass, we prefer to do it there, otherwise we do it during the opaque pass. bool requiresDepthAfterGbuffer = RenderPassEvent.AfterRenderingGbuffer <= renderPassInputs.requiresDepthNormalAtEvent && renderPassInputs.requiresDepthNormalAtEvent <= RenderPassEvent.BeforeRenderingOpaques; - bool occlusionTestDuringPrepass = requiresDepthPrepass && (!usesDeferredLighting || !requiresDepthAfterGbuffer); + bool occlusionTestDuringPrepass = requiresPrepass && (!usesDeferredLighting || !requiresDepthAfterGbuffer); OccluderPass occluderPass = OccluderPass.None; @@ -1205,15 +1010,12 @@ private void OnMainRendering(RenderGraph renderGraph, ScriptableRenderContext co } #endif - if (requiresDepthPrepass) + if (requiresPrepass) { - // If we're in deferred mode, prepasses always render directly to the depth attachment rather than the camera depth texture. - // In non-deferred mode, we only render to the depth attachment directly when depth priming is enabled and we're starting with an empty depth buffer. - bool isDepthPrimingTarget = (useDepthPriming && (cameraData.renderType == CameraRenderType.Base || cameraData.clearDepth)); - bool renderToAttachment = (usesDeferredLighting || isDepthPrimingTarget); - TextureHandle depthTarget = renderToAttachment ? resourceData.activeDepthTexture : resourceData.cameraDepthTexture; + TextureHandle depthTarget = useDepthPriming ? resourceData.activeDepthTexture : resourceData.cameraDepthTexture; + // Prepare stencil buffer for stencil-based cross-fade lod in depth normal prepass. Depth prepass doesn't use stencil test (same as shadow). - if (renderingData.stencilLodCrossFadeEnabled && isDepthNormalPrepass && !renderToAttachment) + if (renderingData.stencilLodCrossFadeEnabled && isDepthNormalPrepass && !useDepthPriming) m_StencilCrossFadeRenderPass.Render(renderGraph, context, resourceData.cameraDepthTexture); bool needsOccluderUpdate = occluderPass == OccluderPass.DepthPrepass; @@ -1236,11 +1038,11 @@ private void OnMainRendering(RenderGraph renderGraph, ScriptableRenderContext co // When we render to the depth attachment, a copy must happen later to populate the camera depth texture and the copy will handle setting globals. // If we're rendering to the camera depth texture, we can set the globals immediately. - bool setGlobalDepth = isLastPass && !renderToAttachment; + bool setGlobalDepth = isLastPass && !useDepthPriming; // There's no special copy logic for the camera normals texture, so we can set the global as long as we're not performing a partial prepass. // In the case of a partial prepass, the global will be set later by the gbuffer pass once it completes the data in the texture. - bool setGlobalTextures = isLastPass && (!usesDeferredLighting || hasFullPrepass); + bool setGlobalTextures = isLastPass && hasFullPrepass; if (isDepthNormalPrepass) DepthNormalPrepassRender(renderGraph, renderPassInputs, depthTarget, batchLayerMask, setGlobalDepth, setGlobalTextures); @@ -1280,7 +1082,7 @@ private void OnMainRendering(RenderGraph renderGraph, ScriptableRenderContext co // We need to be sure there are no custom passes in between GBuffer/Deferred passes, if there are - we disable fb fetch just to be safe` m_DeferredLights.UseFramebufferFetch = renderGraph.nativeRenderPassesEnabled; m_DeferredLights.HasNormalPrepass = isDepthNormalPrepass; - m_DeferredLights.HasDepthPrepass = requiresDepthPrepass; + m_DeferredLights.HasDepthPrepass = requiresPrepass; m_DeferredLights.ResolveMixedLightingMode(lightData); RecordCustomRenderGraphPasses(renderGraph, RenderPassEvent.BeforeRenderingGbuffer); @@ -1470,7 +1272,7 @@ private void OnMainRendering(RenderGraph renderGraph, ScriptableRenderContext co } } - private void OnAfterRendering(RenderGraph renderGraph) + private void OnAfterRendering(RenderGraph renderGraph, bool applyPostProcessing) { UniversalResourceData resourceData = frameData.Get(); UniversalRenderingData renderingData = frameData.Get(); @@ -1490,7 +1292,6 @@ private void OnAfterRendering(RenderGraph renderGraph) RecordCustomRenderGraphPasses(renderGraph, RenderPassEvent.BeforeRenderingPostProcessing); bool cameraTargetResolved = false; - bool applyPostProcessing = ShouldApplyPostProcessing(cameraData.postProcessEnabled); // There's at least a camera in the camera stack that applies post-processing bool anyPostProcessing = postProcessingData.isEnabled && m_PostProcessPasses.isCreated; @@ -1703,42 +1504,89 @@ private void OnAfterRendering(RenderGraph renderGraph) } } - bool RequireDepthPrepass(UniversalCameraData cameraData, ref RenderPassInputSummary renderPassInputs) + //Require Depth Prepass for depth, normals or layer texture + bool RequirePrepassForTextures(UniversalCameraData cameraData, in RenderPassInputSummary renderPassInputs, bool requireDepthTexture) { - // If Camera's PostProcessing is enabled and if there any enabled PostProcessing requires depth texture as shader read resource (Motion Blur/DoF) - bool cameraHasPostProcessingWithDepth = CameraHasPostProcessingWithDepth(cameraData); - - bool forcePrepass = (m_CopyDepthMode == CopyDepthMode.ForcePrepass); - bool depthPrimingEnabled = IsDepthPrimingEnabled(cameraData); - - bool requiresDepthTexture = cameraData.requiresDepthTexture || renderPassInputs.requiresDepthTexture || depthPrimingEnabled; - bool requiresDepthPrepass = (requiresDepthTexture || cameraHasPostProcessingWithDepth) && (!CanCopyDepth(cameraData) || forcePrepass); - requiresDepthPrepass |= renderPassInputs.requiresDepthPrepass; - requiresDepthPrepass |= renderPassInputs.requiresNormalsTexture; // This must be checked explicitly because some features inject normal requirements later in the frame - requiresDepthPrepass |= depthPrimingEnabled; - return requiresDepthPrepass; + bool requiresDepthTexturePrepass = requireDepthTexture && !CanCopyDepth(cameraData); + requiresDepthTexturePrepass |= m_CopyDepthMode == CopyDepthMode.ForcePrepass; + requiresDepthTexturePrepass |= renderPassInputs.requiresDepthPrepass; + requiresDepthTexturePrepass |= DebugHandlerRequireDepthPass(cameraData); + requiresDepthTexturePrepass |= renderPassInputs.requiresNormalsTexture; // This must be checked explicitly because some features inject normal requirements later in the frame + return requiresDepthTexturePrepass; } - bool RequireDepthTexture(UniversalCameraData cameraData, bool requiresDepthPrepass, ref RenderPassInputSummary renderPassInputs) + //Check if _CameraDepthTexture (the copy) is required. This is not the depth attachment (ie, the intermediate texture). + static bool RequireDepthTexture(UniversalCameraData cameraData, in RenderPassInputSummary renderPassInputs, bool applyPostProcessing) { - bool depthPrimingEnabled = IsDepthPrimingEnabled(cameraData); - bool requiresDepthTexture = cameraData.requiresDepthTexture || renderPassInputs.requiresDepthTexture || depthPrimingEnabled; - bool cameraHasPostProcessingWithDepth = CameraHasPostProcessingWithDepth(cameraData); + bool requiresDepthTexture = cameraData.requiresDepthTexture || renderPassInputs.requiresDepthTexture; + bool cameraHasPostProcessingWithDepth = applyPostProcessing && cameraData.postProcessingRequiresDepthTexture; - var createDepthTexture = (requiresDepthTexture || cameraHasPostProcessingWithDepth) && !requiresDepthPrepass; - createDepthTexture |= !cameraData.resolveFinalTarget; - // Deferred renderer always need to access depth buffer. - createDepthTexture |= (usesDeferredLighting && !useRenderPassEnabled); - // An intermediate depth target is required when depth priming is enabled because we can't copy out of backbuffer depth if it's needed later - createDepthTexture |= depthPrimingEnabled; - // TODO: seems like with mrt depth is not taken from first target. Investigate if this is needed - createDepthTexture |= m_RenderingLayerProvidesRenderObjectPass; - - createDepthTexture |= DebugHandlerRequireDepthPass(cameraData); + var createDepthTexture = requiresDepthTexture || cameraHasPostProcessingWithDepth; return createDepthTexture; } + /// + /// When true the pipeline needs to add a prepass that renders depth to the currentCameraDepth. + /// Depth priming is an optimization (on certain devices/platforms). Features that want to leverage this as an optimization + /// need to check UniversalRender.useDepthPriming (which equal to the result of this function) + /// to ensure that the pipeline will actually do depth priming. + /// When this is true then we are sure that after RenderPassEvent.AfterRenderingPrePasses the currentCameraDepth has been primed. + /// + static bool IsDepthPrimingEnabledRenderGraph(UniversalCameraData cameraData, in RenderPassInputSummary renderPassInputs, DepthPrimingMode depthPrimingMode, bool requireDepthTexture, bool requirePrepassForTextures, bool usesDeferredLighting) + { +#if UNITY_EDITOR + // We need to disable depth-priming for DrawCameraMode.Wireframe, since depth-priming forces ZTest to Equal + // for opaques rendering, which breaks wireframe rendering. + if (cameraData.isSceneViewCamera) + { + foreach (var sceneViewObject in UnityEditor.SceneView.sceneViews) + { + var sceneView = sceneViewObject as UnityEditor.SceneView; + if (sceneView != null && sceneView.camera == cameraData.camera && sceneView.cameraMode.drawMode == UnityEditor.DrawCameraMode.Wireframe) + return false; + } + } +#endif + +#if UNITY_ANDROID || UNITY_IOS || UNITY_TVOS || UNITY_EMBEDDED_LINUX + bool depthPrimingRecommended = false; +#else + bool depthPrimingRecommended = true; +#endif + + // We only do one depth prepass per camera. If the texture requires a prepass, and priming is on, then we do priming and a copy afterwards to the cameraDepthTexture. + // However, some platforms don't support this copy (like GLES when MSAA is on). When a copy is not supported we turn off priming so the prepass will target the cameraDepthTexture, avoiding the copy. + if (requireDepthTexture && !CanCopyDepth(cameraData)) + return false; + + // Depth Priming causes rendering errors with WebGL and WebGPU on Apple Arm64 GPUs. + bool isNotWebGL = !IsWebGL(); + bool depthPrimingRequested = (depthPrimingRecommended && depthPrimingMode == DepthPrimingMode.Auto) || depthPrimingMode == DepthPrimingMode.Forced; + bool isNotMSAA = cameraData.cameraTargetDescriptor.msaaSamples == 1; + + { + //TODO this need to be further investigated. This moved here from the MainRendering to consolidate all the depth priming logic in one place. The PR that landed this aimed to refactor without unnecessarily changing behavior. + //The prepass and gbuffer logic should have an alternative path that can handle depth priming off. This way, we can respect the user setting Never and Forced. + //Priming is bad for performance when using deferred so we don't allow it. However, when a prepass for textures is required, the gbuffer pass currently + //relies on the prepass writing the same (activeCameraDepth) depth resource. + bool needsPrimingForDeferredWithPartialPrepass = usesDeferredLighting + && ((RenderPassEvent.AfterRenderingGbuffer <= renderPassInputs.requiresDepthNormalAtEvent) && + (renderPassInputs.requiresDepthNormalAtEvent <= RenderPassEvent.BeforeRenderingOpaques)) + && requirePrepassForTextures; + if (needsPrimingForDeferredWithPartialPrepass && isNotMSAA) + return true; + } + + bool isFirstCameraToWriteDepth = cameraData.renderType == CameraRenderType.Base || cameraData.clearDepth; + // Enabled Depth priming when baking Reflection Probes causes artefacts (UUM-12397) + bool isNotReflectionCamera = cameraData.cameraType != CameraType.Reflection; + // Depth is not rendered in a depth-only camera setup with depth priming (UUM-38158) + bool isNotOffscreenDepthTexture = !IsOffscreenDepthTexture(cameraData); + + return depthPrimingRequested && !usesDeferredLighting && isFirstCameraToWriteDepth && isNotReflectionCamera && isNotOffscreenDepthTexture && isNotWebGL && isNotMSAA; + } + internal void SetRenderingLayersGlobalTextures(RenderGraph renderGraph) { UniversalResourceData resourceData = frameData.Get(); @@ -1747,6 +1595,230 @@ internal void SetRenderingLayersGlobalTextures(RenderGraph renderGraph) RenderGraphUtils.SetGlobalTexture(renderGraph, Shader.PropertyToID(m_RenderingLayersTextureName), resourceData.renderingLayersTexture, "Set Global Rendering Layers Texture"); } + void ImportBackBuffers(RenderGraph renderGraph, UniversalCameraData cameraData, Color clearBackgroundColor, bool isCameraTargetOffscreenDepth) + { + UniversalResourceData resourceData = frameData.Get(); + + // The final output back buffer should be cleared by the graph on first use only if we have no final blit pass. + // If there is a final blit, that blit will write the buffers so on first sight an extra clear should not be problem, + // blit will simply blit over the cleared values. BUT! the final blit may not write the whole buffer in case of a camera + // with a Viewport Rect smaller than the full screen. So the existing backbuffer contents need to be preserved in this case. + // Finally for non-base cameras the backbuffer should never be cleared. (Note that there might still be two base cameras + // rendering to the same screen. See e.g. test foundation 014 that renders a minimap) + bool clearBackbufferOnFirstUse = (cameraData.renderType == CameraRenderType.Base) && !m_RequiresIntermediateAttachments; + + // force the clear if we are rendering to an offscreen depth texture + clearBackbufferOnFirstUse |= isCameraTargetOffscreenDepth; + + // UI Overlay is rendered by native engine if not done within SRP + // To check if the engine does it natively post-URP, we look at SupportedRenderingFeatures + // and restrict it to cases where we resolve to screen and render UI overlay, i.e mostly final camera for game view + // We cannot use directly !cameraData.rendersOverlayUI but this is similar logic + bool isNativeUIOverlayRenderingAfterURP = !SupportedRenderingFeatures.active.rendersUIOverlay && cameraData.resolveToScreen; + bool isNativeRenderingAfterURP = UnityEngine.Rendering.Watermark.IsVisible() || isNativeUIOverlayRenderingAfterURP; + // If MSAA > 1, no extra native rendering after SRP and we target the BB directly (!m_RequiresIntermediateAttachments) + // then we can discard MSAA buffers and only resolve, otherwise we must store and resolve + bool noStoreOnlyResolveBBColor = !m_RequiresIntermediateAttachments && !isNativeRenderingAfterURP && (cameraData.cameraTargetDescriptor.msaaSamples > 1); + + ImportResourceParams importBackbufferColorParams = new ImportResourceParams(); + importBackbufferColorParams.clearOnFirstUse = clearBackbufferOnFirstUse; + importBackbufferColorParams.clearColor = clearBackgroundColor; + importBackbufferColorParams.discardOnLastUse = noStoreOnlyResolveBBColor; + + ImportResourceParams importBackbufferDepthParams = new ImportResourceParams(); + importBackbufferDepthParams.clearOnFirstUse = clearBackbufferOnFirstUse; + importBackbufferDepthParams.clearColor = clearBackgroundColor; + importBackbufferDepthParams.discardOnLastUse = !isCameraTargetOffscreenDepth; + +#if UNITY_EDITOR + // UUM-47698, UUM-97414: on TBDR GPUs like Apple M1/M2, we need to preserve the backbuffer depth for overlay cameras in Editor for Gizmos & preview grid + if (cameraData.isSceneViewCamera || cameraData.isPreviewCamera) + importBackbufferDepthParams.discardOnLastUse = false; +#endif +#if ENABLE_VR && ENABLE_XR_MODULE + // some XR devices require depth data to composite the final image. In such case, we need to preserve the eyetexture(backbuffer) depth. + if (cameraData.xr.enabled && cameraData.xr.copyDepth) + { + importBackbufferDepthParams.discardOnLastUse = false; + } +#endif + + // For BuiltinRenderTextureType wrapping RTHandles RenderGraph can't know what they are so we have to pass it in. + RenderTargetInfo importInfo = new RenderTargetInfo(); + RenderTargetInfo importInfoDepth = new RenderTargetInfo(); + + bool isBuiltInTexture = (cameraData.targetTexture == null); + +#if ENABLE_VR && ENABLE_XR_MODULE + if (cameraData.xr.enabled) + { + isBuiltInTexture = false; + } +#endif + // So the render target we pass into render graph is + // RTHandles(RenderTargetIdentifier(BuiltinRenderTextureType.CameraTarget)) + // or + // RTHandles(RenderTargetIdentifier(RenderTexture(cameraData.targetTexture))) + // + // Because of the RenderTargetIdentifier in the "wrapper chain" the graph can't know + // the size of the passed in textures so we need to provide it for the graph. + // The amount of texture handle wrappers and their subtleties is probably something to be investigated. + if (isBuiltInTexture) + { + // Backbuffer is the final render target, we obtain its number of MSAA samples through Screen API + // in some cases we disable multisampling for optimization purpose + int numSamples = AdjustAndGetScreenMSAASamples(renderGraph, m_RequiresIntermediateAttachments); + + //BuiltinRenderTextureType.CameraTarget so this is either system render target or camera.targetTexture if non null + //NOTE: Careful what you use here as many of the properties bake-in the camera rect so for example + //cameraData.cameraTargetDescriptor.width is the width of the rectangle but not the actual render target + //same with cameraData.camera.pixelWidth + importInfo.width = Screen.width; + importInfo.height = Screen.height; + importInfo.volumeDepth = 1; + importInfo.msaaSamples = numSamples; + importInfo.format = cameraData.cameraTargetDescriptor.graphicsFormat; + + importInfoDepth = importInfo; + importInfoDepth.format = cameraData.cameraTargetDescriptor.depthStencilFormat; + } + else + { +#if ENABLE_VR && ENABLE_XR_MODULE + if (cameraData.xr.enabled) + { + importInfo.width = cameraData.xr.renderTargetDesc.width; + importInfo.height = cameraData.xr.renderTargetDesc.height; + importInfo.volumeDepth = cameraData.xr.renderTargetDesc.volumeDepth; + importInfo.msaaSamples = cameraData.xr.renderTargetDesc.msaaSamples; + importInfo.format = cameraData.xr.renderTargetDesc.graphicsFormat; + + importInfoDepth = importInfo; + importInfoDepth.format = cameraData.xr.renderTargetDesc.depthStencilFormat; + } + else +#endif + { + importInfo.width = cameraData.targetTexture.width; + importInfo.height = cameraData.targetTexture.height; + importInfo.volumeDepth = cameraData.targetTexture.volumeDepth; + importInfo.msaaSamples = cameraData.targetTexture.antiAliasing; + importInfo.format = cameraData.targetTexture.graphicsFormat; + + importInfoDepth = importInfo; + importInfoDepth.format = cameraData.targetTexture.depthStencilFormat; + } + + // We let users know that a depth format is required for correct usage, but we fallback to the old default depth format behaviour to avoid regressions + if (importInfoDepth.format == GraphicsFormat.None) + { + importInfoDepth.format = SystemInfo.GetGraphicsFormat(DefaultFormat.DepthStencil); + Debug.LogWarning("In the render graph API, the output Render Texture must have a depth buffer. When you select a Render Texture in any camera's Output Texture property, the Depth Stencil Format property of the texture must be set to a value other than None."); + } + } + + if (!isCameraTargetOffscreenDepth) + resourceData.backBufferColor = renderGraph.ImportTexture(m_TargetColorHandle, importInfo, importBackbufferColorParams); + + resourceData.backBufferDepth = renderGraph.ImportTexture(m_TargetDepthHandle, importInfoDepth, importBackbufferDepthParams); + } + + void CreateIntermediateCameraColorAttachment(RenderGraph renderGraph, UniversalCameraData cameraData, bool clearColor, Color clearBackgroundColor) + { + UniversalResourceData resourceData = frameData.Get(); + + bool lastCameraInTheStack = cameraData.resolveFinalTarget; + + var cameraTargetDescriptor = cameraData.cameraTargetDescriptor; + cameraTargetDescriptor.useMipMap = false; + cameraTargetDescriptor.autoGenerateMips = false; + cameraTargetDescriptor.depthStencilFormat = GraphicsFormat.None; + + RenderingUtils.ReAllocateHandleIfNeeded(ref m_RenderGraphCameraColorHandles[0], cameraTargetDescriptor, FilterMode.Bilinear, TextureWrapMode.Clamp, name: _CameraTargetAttachmentAName); + RenderingUtils.ReAllocateHandleIfNeeded(ref m_RenderGraphCameraColorHandles[1], cameraTargetDescriptor, FilterMode.Bilinear, TextureWrapMode.Clamp, name: _CameraTargetAttachmentBName); + + // Make sure that the base camera always starts rendering to the ColorAttachmentA for deterministic frame results. + // Not doing so makes the targets look different every frame, causing the frame debugger to flash, and making debugging harder. + if (cameraData.renderType == CameraRenderType.Base) + { + m_CurrentColorHandle = 0; + + // Base camera rendering always starts with a pre-upscale size color target + // If upscaling happens during the frame, we'll switch to the post-upscale color target size and any overlay camera that renders on top should inherit the upscaled size + m_UseUpscaledColorHandle = false; + } + + ImportResourceParams importColorParams = new ImportResourceParams(); + importColorParams.clearOnFirstUse = clearColor; + importColorParams.clearColor = clearBackgroundColor; + importColorParams.discardOnLastUse = lastCameraInTheStack; + resourceData.cameraColor = renderGraph.ImportTexture(currentRenderGraphCameraColorHandle, importColorParams); + resourceData.activeColorID = UniversalResourceData.ActiveID.Camera; + + // If STP is enabled, we'll be upscaling the rendered frame during the post processing logic. + // Once upscaling occurs, we must use different set of color handles that reflect the upscaled size. + if (cameraData.IsSTPEnabled()) + { + var upscaledTargetDesc = cameraTargetDescriptor; + upscaledTargetDesc.width = cameraData.pixelWidth; + upscaledTargetDesc.height = cameraData.pixelHeight; + + RenderingUtils.ReAllocateHandleIfNeeded(ref m_RenderGraphUpscaledCameraColorHandles[0], upscaledTargetDesc, FilterMode.Point, TextureWrapMode.Clamp, name: _CameraUpscaledTargetAttachmentAName); + RenderingUtils.ReAllocateHandleIfNeeded(ref m_RenderGraphUpscaledCameraColorHandles[1], upscaledTargetDesc, FilterMode.Point, TextureWrapMode.Clamp, name: _CameraUpscaledTargetAttachmentBName); + } + } + + void CreateIntermediateCameraDepthAttachment(RenderGraph renderGraph, UniversalCameraData cameraData, bool clearDepth, Color clearBackgroundDepth, bool depthTextureIsDepthFormat) + { + UniversalResourceData resourceData = frameData.Get(); + + bool lastCameraInTheStack = cameraData.resolveFinalTarget; + + var depthDescriptor = cameraData.cameraTargetDescriptor; + depthDescriptor.useMipMap = false; + depthDescriptor.autoGenerateMips = false; + + bool hasMSAA = depthDescriptor.msaaSamples > 1; + bool resolveDepth = RenderingUtils.MultisampleDepthResolveSupported() && renderGraph.nativeRenderPassesEnabled; + + // If we aren't using hardware depth resolves and we have MSAA, we need to resolve depth manually by binding as an MSAA texture. + depthDescriptor.bindMS = !resolveDepth && hasMSAA; + + // binding MS surfaces is not supported by the GLES backend, and it won't be fixed after investigating + // the high performance impact of potential fixes, which would make it more expensive than depth prepass (fogbugz 1339401 for more info) + if (IsGLESDevice()) + depthDescriptor.bindMS = false; + + depthDescriptor.graphicsFormat = GraphicsFormat.None; + depthDescriptor.depthStencilFormat = cameraDepthAttachmentFormat; + + RenderingUtils.ReAllocateHandleIfNeeded(ref m_RenderGraphCameraDepthHandle, depthDescriptor, FilterMode.Point, TextureWrapMode.Clamp, name: "_CameraDepthAttachment"); + + ImportResourceParams importDepthParams = new ImportResourceParams(); + importDepthParams.clearOnFirstUse = clearDepth; + importDepthParams.clearColor = clearBackgroundDepth; + importDepthParams.discardOnLastUse = lastCameraInTheStack; +#if UNITY_EDITOR + // scene filtering will reuse "camera" depth from the normal pass for the "filter highlight" effect + if (cameraData.isSceneViewCamera && CoreUtils.IsSceneFilteringEnabled()) + importDepthParams.discardOnLastUse = false; +#endif + + resourceData.cameraDepth = renderGraph.ImportTexture(m_RenderGraphCameraDepthHandle, importDepthParams); + resourceData.activeDepthID = UniversalResourceData.ActiveID.Camera; + + // Configure the copy depth pass based on the allocated depth texture + m_CopyDepthPass.MsaaSamples = depthDescriptor.msaaSamples; + m_CopyDepthPass.CopyToDepth = depthTextureIsDepthFormat; + + var copyResolvedDepth = !depthDescriptor.bindMS; + m_CopyDepthPass.m_CopyResolvedDepth = copyResolvedDepth; + +#if ENABLE_VR && ENABLE_XR_MODULE + m_XRCopyDepthPass.m_CopyResolvedDepth = copyResolvedDepth; +#endif + } + void CreateCameraDepthCopyTexture(RenderGraph renderGraph, RenderTextureDescriptor descriptor, bool isDepthTexture) { UniversalResourceData resourceData = frameData.Get(); @@ -1854,9 +1926,9 @@ void DepthNormalPrepassRender(RenderGraph renderGraph, RenderPassInputSummary re } if (usesDeferredLighting) - { + { // Only render forward-only geometry, as standard geometry will be rendered as normal into the gbuffer. - if (AllowPartialDepthNormalsPrepass(true, renderPassInputs.requiresDepthNormalAtEvent)) + if (AllowPartialDepthNormalsPrepass(usesDeferredLighting, renderPassInputs.requiresDepthNormalAtEvent, useDepthPriming)) m_DepthNormalPrepass.shaderTagIds = k_DepthNormalsOnly; // TODO RENDERGRAPH: commented this out since would be equivalent to the current behaviour? Double check diff --git a/Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/DepthBlit/DepthBlitFeature.cs b/Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/DepthBlit/DepthBlitFeature.cs index 67cb04e93f1..6eda638d413 100644 --- a/Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/DepthBlit/DepthBlitFeature.cs +++ b/Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/DepthBlit/DepthBlitFeature.cs @@ -4,26 +4,30 @@ using UnityEngine.Rendering.RenderGraphModule; using UnityEngine.Rendering.Universal; -// This Renderer Feature enqueues either the DepthBlitCopyDepthPass or the DepthBlitDepthOnlyPass depending on the current platform support. -// DepthBlitCopyPass is a simplified version of URP CopyDepthPass. The pass copies the depth texture to an RTHandle. -// DepthBlitDepthOnlyPass is a simplified version of the URP DepthOnlyPass. The pass renders depth values to an RTHandle. -// The Renderer Feature also enqueues the DepthBlitEdgePass which takes the RTHandle as input to create an effect to visualize depth, and output it to the screen. +// Create a Scriptable Renderer Feature that either copies the depth texture to a render texture (RTHandle), or renders depth values to a render texture. +// The Scriptable Renderer Feature then outputs the render texture to the screen, using a material that renders an edge effect. +// For more information about creating scriptable renderer features, refer to https://docs.unity3d.com/Manual/urp/customizing-urp.html public class DepthBlitFeature : ScriptableRendererFeature { + // Set the injection points for the render passes public RenderPassEvent evt_Depth = RenderPassEvent.AfterRenderingOpaques; public RenderPassEvent evt_Edge = RenderPassEvent.AfterRenderingOpaques; - public UniversalRendererData rendererDataAsset; // The field for accessing opaqueLayerMask on the renderer asset + + // Create a property for a Universal Renderer asset that sets the opaque layers to draw. + public UniversalRendererData rendererDataAsset; + // Create a property for the shader that copies the depth texture. public Shader copyDepthShader; + // Create a property for the material that renders the edge effect. public Material m_DepthEdgeMaterial; - // The properties for creating the depth texture + // Set the properties of the destination depth texture. private const string k_DepthRTName = "_MyDepthTexture"; private FilterMode m_DepthRTFilterMode = FilterMode.Bilinear; private TextureWrapMode m_DepthRTWrapMode = TextureWrapMode.Clamp; - // This class is for keeping the TextureHandle reference in the frame data so that it can be shared with multiple passes in the render graph system. + // Create a class that keeps the reference to the depth texture in the frame data, so multiple passes in the render graph system can share the texture. public class TexRefData : ContextItem { public TextureHandle depthTextureHandle = TextureHandle.nullHandle; @@ -34,12 +38,13 @@ public override void Reset() } } - // The passes for the effect + // Declare the render passes. + // The script uses DepthOnlyPass for platforms that run OpenGL ES, which doesn't support copying from a depth texture. private DepthBlitCopyDepthPass m_CopyDepthPass; - private DepthBlitDepthOnlyPass m_DepthOnlyPass; // DepthOnlyPass is for platforms that run OpenGL ES, which does not support CopyDepth. + private DepthBlitDepthOnlyPass m_DepthOnlyPass; private DepthBlitEdgePass m_DepthEdgePass; - // Check if the platform supports CopyDepthPass + // Check if the platform supports copying from a depth texture. private bool CanCopyDepth(ref CameraData cameraData) { bool msaaEnabledForCamera = cameraData.cameraTargetDescriptor.msaaSamples > 1; @@ -49,7 +54,7 @@ private bool CanCopyDepth(ref CameraData cameraData) bool msaaDepthResolve = msaaEnabledForCamera && SystemInfo.supportsMultisampledTextures != 0; - // Avoid copying MSAA depth on GLES3 platform to avoid invalid results + // Avoid copying MSAA depth on GLES3 platforms to avoid invalid results if (IsGLESDevice() && msaaDepthResolve) return false; @@ -61,13 +66,15 @@ private bool IsGLESDevice() return SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLES3; } + // Override the AddRenderPasses method to inject passes into the renderer. Unity calls AddRenderPasses once per camera. public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) { + // Skip rendering if the camera is not a game camera. var cameraData = renderingData.cameraData; if (renderingData.cameraData.cameraType != CameraType.Game) return; - // Setup RenderTextureDescriptor for creating the depth RTHandle + // Set up a RenderTextureDescriptor with the properties of the depth texture. var desc = renderingData.cameraData.cameraTargetDescriptor; if (CanCopyDepth(ref cameraData)) { @@ -80,11 +87,13 @@ public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingD desc.msaaSamples = 1; } - // Setup passes + // Create the DepthBlitCopyDepthPass or DepthBlitDepthOnlyPass render pass, and inject it into the renderer. RTHandle depthRTHandle; if (CanCopyDepth(ref cameraData)) { if (m_CopyDepthPass == null) + // Create a new instance of a render pass that copies the depth texture to the new render texture. + // This render pass is a simplified version of CopyDepthPass in URP. m_CopyDepthPass = new DepthBlitCopyDepthPass(evt_Depth, copyDepthShader, desc, m_DepthRTFilterMode, m_DepthRTWrapMode, name: k_DepthRTName); @@ -94,6 +103,8 @@ public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingD else { if (m_DepthOnlyPass == null) + // Create a new instance of a render pass that renders depth values to the new render texture. + // This render pass is a simplified version of DepthOnlyPass in URP. m_DepthOnlyPass = new DepthBlitDepthOnlyPass(evt_Depth, RenderQueueRange.opaque, rendererDataAsset.opaqueLayerMask, desc, m_DepthRTFilterMode, m_DepthRTWrapMode, name: k_DepthRTName); @@ -101,16 +112,18 @@ public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingD depthRTHandle = m_DepthOnlyPass.depthRT; } - // Pass the RTHandle for the DepthEdge effect + // Pass the render texture to the edge effect render pass, and inject the render pass into the renderer. m_DepthEdgePass.SetRTHandle(ref depthRTHandle); renderer.EnqueuePass(m_DepthEdgePass); } public override void Create() { + // Create a new instance of the render pass that renders the edge effect. m_DepthEdgePass = new DepthBlitEdgePass(m_DepthEdgeMaterial, evt_Edge); } + // Free the resources the render passes use. protected override void Dispose(bool disposing) { m_CopyDepthPass?.Dispose(); diff --git a/Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/DistortTunnel/DistortTunnelRendererFeature.cs b/Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/DistortTunnel/DistortTunnelRendererFeature.cs index 54f4361b509..af33d4a25bb 100644 --- a/Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/DistortTunnel/DistortTunnelRendererFeature.cs +++ b/Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/DistortTunnel/DistortTunnelRendererFeature.cs @@ -3,26 +3,33 @@ using UnityEngine.Rendering.RenderGraphModule; using UnityEngine.Rendering.Universal; -// This Renderer Feature creates an RTHandle which stores a Texture2DArray with 2 slices for the final effect. -// The RTHandle is being set as input or output for the 3 passes: -// 1. CopyColor pass: Blit the screen color texture to the RTHandle's first slice. -// 2. Tunnel pass: Render a "tunnel" object from the scene to the RTHandle's second slice. -// 3. Distort pass: Uses the two slices to create the final effect, and blits the result back to screen. +// Create a Scriptable Renderer Feature that renders a distorted tunnel effect. +// This Scriptable Renderer Feature is used in the Universal Render Pipeline (URP) package samples. For more information, https://docs.unity3d.com/Manual/urp/package-sample-urp-package-samples.html. +// For more information about creating scriptable renderer features, refer to https://docs.unity3d.com/Manual/urp/customizing-urp.html. public class DistortTunnelRendererFeature : ScriptableRendererFeature { + // Create a property to set the injection point for the render passes. public RenderPassEvent passEvent = RenderPassEvent.AfterRenderingSkybox; + // Create a property to set the shader to use for the distortion effect. public Shader distortShader; + + // Set the material to use for the distortion effect. private Material m_DistortMaterial; + // Declare the three render passes. + // 1. CopyColorPass blits the screen color texture to the first slice of a 2D render texture array. + // 2. TunnelPass renders a tunnel GameObject from the scene to the second slice of a 2D render texture array. + // 3. DistortPass uses the two slices to create the final effect, and blits the result back to the screen. private DistortTunnelPass_CopyColor m_CopyColorPass; private DistortTunnelPass_Tunnel m_TunnelPass; private DistortTunnelPass_Distort m_DistortPass; + // Declare and name the render texture that stores the render pass outputs. private RTHandle m_DistortTunnelTexHandle; private const string k_DistortTunnelTexName = "_DistortTunnelTexture"; - // This class stores TextureHandle references in the frame data so that they can be shared with multiple passes in the render graph system. + // Create a class that keeps the TextureHandle reference in the frame data, so multiple passes in the render graph system can share the texture. public class TexRefData : ContextItem { public TextureHandle distortTunnelTexHandle = TextureHandle.nullHandle; @@ -33,20 +40,24 @@ public override void Reset() } } + public override void Create() { + // Set the resources the render passes use. m_CopyColorPass = new DistortTunnelPass_CopyColor(passEvent); m_TunnelPass = new DistortTunnelPass_Tunnel(passEvent); m_DistortMaterial = CoreUtils.CreateEngineMaterial(distortShader); m_DistortPass = new DistortTunnelPass_Distort(m_DistortMaterial, passEvent); } + // Override the AddRenderPasses method to inject passes into the renderer. Unity calls AddRenderPasses once per camera. public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) { + // Skip rendering if the camera isn't a game camera. if (renderingData.cameraData.cameraType != CameraType.Game) return; - // Create RTHandle with 2 slices + // Create a 2D render texture array that contains 2 slices. var desc = renderingData.cameraData.cameraTargetDescriptor; desc.depthBufferBits = 0; desc.msaaSamples = 1; @@ -54,16 +65,18 @@ public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingD desc.volumeDepth = 2; RenderingUtils.ReAllocateHandleIfNeeded(ref m_DistortTunnelTexHandle, desc, FilterMode.Bilinear, TextureWrapMode.Clamp, name: k_DistortTunnelTexName ); - // Provide the necessary RTHandles to the passes + // Set the 2D texture array and its slices as inputs and outputs for the render passes. m_CopyColorPass.SetRTHandles(ref m_DistortTunnelTexHandle,0); m_TunnelPass.SetRTHandles(ref m_DistortTunnelTexHandle,1); m_DistortPass.SetRTHandles(ref m_DistortTunnelTexHandle); + // Inject the render passes into the renderer. renderer.EnqueuePass(m_CopyColorPass); renderer.EnqueuePass(m_TunnelPass); renderer.EnqueuePass(m_DistortPass); } + // Free the resources the Scriptable Renderer Feature uses. protected override void Dispose(bool disposing) { CoreUtils.Destroy(m_DistortMaterial); diff --git a/Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/KeepFrame/KeepFrameFeature.cs b/Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/KeepFrame/KeepFrameFeature.cs index 3ed56cc3c4c..f6dfa33a969 100644 --- a/Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/KeepFrame/KeepFrameFeature.cs +++ b/Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/KeepFrame/KeepFrameFeature.cs @@ -7,18 +7,18 @@ using UnityEngine.Rendering.RenderGraphModule.Util; using UnityEngine.Rendering.Universal; -// This renderer feature will replicate a "don't clear" behaviour by injecting two passes into the pipeline: -// One pass that copies color at the end of a frame -// Another pass that draws the content of the copied texture at the beginning of a new frame -// In this version of the sample we provide implementations for both RenderGraph and non-RenderGraph pipelines. -// This way you can easily see what changed and how to manage code bases with backwards compatibility +// Create a Scriptable Renderer Feature that replicates Don't Clear behavior by injecting two render passes into the pipeline. +// The first pass copies the camera color target at the end of a frame. The second pass draws the contents of the copied texture at the beginning of a new frame. +// For more information about creating Scriptable Renderer Features, refer to https://docs.unity3d.com/Manual/urp/customizing-urp.html. public class KeepFrameFeature : ScriptableRendererFeature { - // This pass is responsible for copying color to a specified destination + // Create the custom render pass that copies the camera color to a destination texture. class CopyFramePass : ScriptableRenderPass { + // Declare the destination texture. RTHandle m_Destination; + // Declare the resources the render pass uses. public void Setup(RTHandle destination) { m_Destination = destination; @@ -26,55 +26,61 @@ public void Setup(RTHandle destination) #pragma warning disable 618, 672 // Type or member is obsolete, Member overrides obsolete member - // Unity calls the Execute method in the Compatibility mode + // Override the Execute method to implement the rendering logic. + // This method is used only in the Compatibility Mode path. public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) { + // Skip rendering if the camera isn't a game camera. if (renderingData.cameraData.camera.cameraType != CameraType.Game) return; + // Set the source texture as the camera color target. var source = renderingData.cameraData.renderer.cameraColorTargetHandle; + // Get a command buffer. CommandBuffer cmd = CommandBufferPool.Get("CopyFramePass"); + // Blit the camera color target to the destination texture. Blit(cmd, source, m_Destination); + // Execute the command buffer. context.ExecuteCommandBuffer(cmd); CommandBufferPool.Release(cmd); } #pragma warning restore 618, 672 - // RecordRenderGraph is called for the RenderGraph path. - // Because RenderGraph has to calculate internally how resources are used we must be aware of 2 - // distinct timelines inside this method: one for recording resource usage and one for recording draw commands. - // It is important to scope resources correctly as global state may change between the execution times of each. + // Override the RecordRenderGraph method to implement the rendering logic. + // This method is used only in the render graph system path. public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { + // Get the resources the pass uses. UniversalResourceData resourceData = frameData.Get(); UniversalCameraData cameraData = frameData.Get(); + // Skip rendering if the camera isn't a game camera. if (cameraData.camera.cameraType != CameraType.Game) return; + // Set the source texture as the camera color target. TextureHandle source = resourceData.activeColorTexture; - // When using the RenderGraph API the lifetime and ownership of resources is managed by the render graph system itself. - // This allows for optimal resource usage and other optimizations to be done automatically for the user. - // In the cases where resources must persist across frames, between different cameras or when users want - // to manage their lifetimes themselves, the resources must be imported when recording the render pass. + // Import the texture that persists across frames, so the render graph system can use it. TextureHandle destination = renderGraph.ImportTexture(m_Destination); if (!source.IsValid() || !destination.IsValid()) return; + // Blit the content of the copied texture to the camera color target with a material. RenderGraphUtils.BlitMaterialParameters para = new(source, destination, Blitter.GetBlitMaterial(TextureDimension.Tex2D), 0); renderGraph.AddBlitPass(para, "Copy Frame Pass"); } } - // This pass is responsible for drawing the old color to a full screen quad + // Create the custom render pass that draws the contents of the copied texture at the beginning of a new frame. class DrawOldFramePass : ScriptableRenderPass { + // Declare the resources the render pass uses. class PassData { public TextureHandle source; @@ -86,6 +92,7 @@ class PassData RTHandle m_Handle; string m_TextureName; + // Set up the resources the render pass uses. public void Setup(Material drawOldFrameMaterial, RTHandle handle, string textureName) { m_DrawOldFrameMaterial = drawOldFrameMaterial; @@ -93,62 +100,75 @@ public void Setup(Material drawOldFrameMaterial, RTHandle handle, string texture m_Handle = handle; } - // This is an example of how to share code between RenderGraph and older non-RenderGraph setups. - // The common draw commands are extracted in a private static method that gets called from both - // Execute and render graph builder's SetRenderFunc. + // Blit the copied texture to the camera color target. + // This method uses common draw commands that both the render graph system and Compatibility Mode paths can use. static void ExecutePass(RasterCommandBuffer cmd, RTHandle source, Material material) { if (material == null) return; + // Get the viewport scale. Vector2 viewportScale = source.useScaling ? new Vector2(source.rtHandleProperties.rtHandleScale.x, source.rtHandleProperties.rtHandleScale.y) : Vector2.one; + + // Blit the copied texture to the camera color target. Blitter.BlitTexture(cmd, source, viewportScale, material, 0); } #pragma warning disable 618, 672 // Type or member is obsolete, Member overrides obsolete member - // Unity calls the Execute method in the Compatibility mode + // Override the Execute method to implement the rendering logic. + // This method is used only in the Compatibility Mode path. public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) { + // Get a command buffer. CommandBuffer cmd = CommandBufferPool.Get(nameof(DrawOldFramePass)); cmd.SetGlobalTexture(m_TextureName, m_Handle); + // Set the source texture as the camera color target. var source = renderingData.cameraData.renderer.cameraColorTargetHandle; + + // Blit the camera color target to the destination texture. ExecutePass(CommandBufferHelpers.GetRasterCommandBuffer(cmd), source, m_DrawOldFrameMaterial); + // Execute the command buffer. context.ExecuteCommandBuffer(cmd); CommandBufferPool.Release(cmd); } #pragma warning restore 618, 672 + // Override the RecordRenderGraph method to implement the rendering logic. + // This method is used only in the render graph system path. public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { + // Get the resources the pass uses. UniversalResourceData resourceData = frameData.Get(); UniversalCameraData cameraData = frameData.Get(); - TextureHandle oldFrameTextureHandle = renderGraph.ImportTexture(m_Handle); + // Import the texture that persists across frames, so the render graph system can use it. + TextureHandle oldFrameTextureHandle = renderGraph.ImportTexture(m_Handle); using (var builder = renderGraph.AddRasterRenderPass("Draw Old Frame Pass", out var passData)) { + // Set the destination texture as the camera color target. TextureHandle destination = resourceData.activeColorTexture; if (!oldFrameTextureHandle.IsValid() || !destination.IsValid()) return; + // Set the resources the pass uses. passData.material = m_DrawOldFrameMaterial; passData.source = oldFrameTextureHandle; passData.name = m_TextureName; + // Set the render graph system to read the copied texture, and write to the camera color target. builder.UseTexture(oldFrameTextureHandle, AccessFlags.Read); builder.SetRenderAttachment(destination, 0, AccessFlags.Write); - // Normally global state modifications are not allowed when using RenderGraph and will result in errors. - // In the exceptional cases where this is intentional we must let the RenderGraph API know by calling - // AllowGlobalStateModification(true). Use this only where necessary as it will introduce a sync point - // in the frame which may have a negative impact on performance. + // Allow global state modifications. Use this only where necessary as it introduces a synchronization point in the frame, which might have an impact on performance. builder.AllowGlobalStateModification(true); + // Set the render method. builder.SetRenderFunc((PassData data, RasterGraphContext context) => { context.cmd.SetGlobalTexture(data.name, data.source); @@ -161,9 +181,9 @@ public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer [Serializable] public class Settings { - [Tooltip("The material that is used when the old frame is redrawn at the start of the new frame (before opaques).")] + [Tooltip("Sets the material to use to draw the previous frame.")] public Material displayMaterial; - [Tooltip("The name of the texture used for referencing the copied frame. (Defaults to _FrameCopyTex if empty)")] + [Tooltip("Sets the texture to copy each frame into. The default it _FrameCopyTex.")] public string textureName; } @@ -200,12 +220,6 @@ public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingD renderer.EnqueuePass(m_DrawOldFrame); } - public override void SetupRenderPasses(ScriptableRenderer renderer, in RenderingData renderingData) - { - // This path is not taken when using render graph. - // The code to reallocate m_OldFrameHandle has been moved to AddRenderPasses in order to avoid duplication. - } - protected override void Dispose(bool disposing) { m_OldFrameHandle?.Release(); diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.hlsl b/Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.hlsl index 3702c970110..c8d1a76dd51 100644 --- a/Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.hlsl +++ b/Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.hlsl @@ -59,12 +59,7 @@ if(intensity < 1)\ {\ half4 shadowTex = SAMPLE_TEXTURE2D(_ShadowTex, sampler_ShadowTex, input.shadowUV); \ - half shadowFinalValue = dot(half4(1,0,0,0), shadowTex.rgba);\ - half unshadowValue = dot(half4(0,1,0,0), shadowTex.rgba);\ - half unshadowGTEOne = unshadowValue > 1;\ - half spriteAlpha = dot(half4(0,0,1,0), shadowTex.rgba);\ - half unshadowFinalValue = unshadowGTEOne * (unshadowValue - (1-spriteAlpha)) + (1-unshadowGTEOne) * (unshadowValue * spriteAlpha);\ - half shadowIntensity = 1-saturate(shadowFinalValue - unshadowFinalValue); \ + half4 shadowIntensity = 1-max(shadowTex.r, shadowTex.g * 1-shadowTex.b);\ color.rgb = (color.rgb * shadowIntensity) + (color.rgb * intensity*(1 - shadowIntensity));\ } diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Projected.shader b/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Projected.shader index a1fb28b109a..666cae6a45a 100644 --- a/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Projected.shader +++ b/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Projected.shader @@ -10,11 +10,18 @@ Shader "Hidden/ShadowProjected2D" Tags { "RenderType"="Transparent" } Cull Off - BlendOp Add + BlendOp Max Blend One One, One One ZWrite Off ZTest Always + Stencil + { + Ref 1 + Comp NotEqual + Pass Keep + } + // This pass draws the projected shadows Pass { @@ -65,7 +72,7 @@ Shader "Hidden/ShadowProjected2D" } - Name "Projected Unshadow (R) - Stencil: Ref 1, Comp Eq, Pass Keep" + Name "Projected Unshadow (G) - Stencil: Ref 1, Comp Eq, Pass Keep" // Draw the shadow ColorMask G diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Shadow-Geometry.shader b/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Shadow-Geometry.shader index ec55d6f041d..5d1adab8130 100644 --- a/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Shadow-Geometry.shader +++ b/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Shadow-Geometry.shader @@ -9,7 +9,7 @@ Shader "Hidden/Shadow2DShadowGeometry" Tags { "RenderType"="Opaque" } Cull Off - BlendOp Add + BlendOp Max Blend One One ZWrite Off ZTest Always diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Shadow-Sprite.shader b/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Shadow-Sprite.shader index 1fed62c1372..437d29896f5 100644 --- a/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Shadow-Sprite.shader +++ b/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Shadow-Sprite.shader @@ -11,7 +11,7 @@ Shader "Hidden/Shadow2DShadowSprite" Tags { "RenderType"="Opaque" } Cull Off - BlendOp Add + BlendOp Max Blend One One ZWrite Off ZTest Always diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Unshadow-Sprite.shader b/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Unshadow-Sprite.shader index 6bf23672cd5..5cbdeb887f6 100644 --- a/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Unshadow-Sprite.shader +++ b/Packages/com.unity.render-pipelines.universal/Shaders/2D/Shadow2D-Unshadow-Sprite.shader @@ -25,9 +25,9 @@ Shader "Hidden/Shadow2DUnshadowSprite" ZWrite Off ZTest Always - ColorMask GB // Clear the unshadow color (G), and set the sprite alpha (B) + ColorMask B - Name "Sprite Unshadow (GB) - Stencil: Ref 1, Comp Always, Pass Replace" + Name "Sprite Unshadow (B) - Stencil: Ref 1, Comp Always, Pass Replace" HLSLPROGRAM #pragma vertex vert @@ -70,7 +70,7 @@ Shader "Hidden/Shadow2DUnshadowSprite" if (main.a <= _ShadowAlphaCutoff) discard; - return half4(0, 0, 0, 0); + return half4(0, 0, main.a, 0); } ENDHLSL } @@ -90,7 +90,7 @@ Shader "Hidden/Shadow2DUnshadowSprite" ZWrite Off ZTest Always - ColorMask B + ColorMask 0 Name "Sprite Unshadow (B) - Stencil: Ref 0, Comp Always, Pass Replace" @@ -135,7 +135,7 @@ Shader "Hidden/Shadow2DUnshadowSprite" if (main.a <= _ShadowAlphaCutoff) discard; - return half4(1,1,main.a,1); + return half4(1, 1, 1, 1); } ENDHLSL } diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/ScalingSetup.shader b/Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/ScalingSetup.shader index 338f8624602..5d215ecf42d 100644 --- a/Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/ScalingSetup.shader +++ b/Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/ScalingSetup.shader @@ -45,7 +45,7 @@ Shader "Hidden/Universal Render Pipeline/Scaling Setup" // In HDR output mode, the colors are expressed in nits, which can go up to 10k nits. // We divide by the display max nits to get a max value closer to 1.0 but it could still be > 1.0. // Finally, use FastTonemap() to squash everything < 1.0. - color = FastTonemap(color * OneOverPaperWhite); + color = half4(FastTonemap(color.rgb * OneOverPaperWhite), color.a); #endif // EASU expects perceptually encoded color data so either encode to gamma 2.0 here if the input // data is linear, or let it pass through unchanged if it's already gamma encoded. diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainDetailLitPasses.hlsl b/Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainDetailLitPasses.hlsl index 26570604d91..fc3f65a8384 100644 --- a/Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainDetailLitPasses.hlsl +++ b/Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainDetailLitPasses.hlsl @@ -159,7 +159,8 @@ Varyings TerrainLitVertex(Attributes input) diffuseColor += LightingLambert(attenuatedLightColor, mainLight.direction, NormalWS); } - #if defined(_ADDITIONAL_LIGHTS) || defined(_ADDITIONAL_LIGHTS_VERTEX) + // Adding !defined(USE_CLUSTER_LIGHT_LOOP): in Forward+ we can't possibly get the light list in a vertex shader. + #if (defined(_ADDITIONAL_LIGHTS) || defined(_ADDITIONAL_LIGHTS_VERTEX)) && !defined(USE_CLUSTER_LIGHT_LOOP) if (IsLightingFeatureEnabled(DEBUGLIGHTINGFEATUREFLAGS_ADDITIONAL_LIGHTS)) { int pixelLightCount = GetAdditionalLightsCount(); diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitAdd.shader b/Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitAdd.shader index cc7ddb8ad76..afbfe21e34e 100644 --- a/Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitAdd.shader +++ b/Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitAdd.shader @@ -105,7 +105,6 @@ Shader "Hidden/Universal Render Pipeline/Terrain/Lit (Add Pass)" Tags{"LightMode" = "UniversalGBuffer"} Blend One One - HLSLPROGRAM #pragma target 4.5 @@ -116,11 +115,11 @@ Shader "Hidden/Universal Render Pipeline/Terrain/Lit (Add Pass)" #pragma vertex SplatmapVert #pragma fragment SplatmapFragment + //Note that the GBuffer pass in TerrainLitAdd disables all of the lighting related features + //as any deferred lighting is calculated in the base pass or later in the lighting shaders // ------------------------------------- // Universal Pipeline keywords #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN - //#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS - //#pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING #pragma multi_compile_fragment _ _SHADOWS_SOFT _SHADOWS_SOFT_LOW _SHADOWS_SOFT_MEDIUM _SHADOWS_SOFT_HIGH #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE diff --git a/Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitPasses.hlsl b/Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitPasses.hlsl index 8228e7413f1..ca123a43366 100644 --- a/Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitPasses.hlsl +++ b/Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitPasses.hlsl @@ -481,11 +481,27 @@ void SplatmapFragment( brdfData.diffuse.rgb *= alpha; brdfData.specular.rgb *= alpha; brdfData.reflectivity *= alpha; - inputData.normalWS = inputData.normalWS * alpha; + inputData.normalWS = inputData.normalWS * alpha; //Note that normal blending is completely incorrect with 'Accurate G-Buffer Normals' enabled (since octahedral mapping is not linear) smoothness *= alpha; - return PackGBuffersBRDFData(brdfData, inputData, smoothness, color.rgb, occlusion); + GBufferFragOutput gbuffer = PackGBuffersBRDFData(brdfData, inputData, smoothness, color.rgb, occlusion); + #ifdef TERRAIN_SPLAT_ADDPASS + //These parameters cannot be alpha blended, so we allow them to be set them in the base pass and zero them out in the add-pass: + gbuffer.gBuffer0.a = 0.0f; //materialFlags + //gbuffer.color.rgb = half3(0.0f, 0.0f, 0.0f); //globalIllumination + #if defined(GBUFFER_FEATURE_DEPTH) + gbuffer.depth = 0.0f; + #endif + #if defined(GBUFFER_FEATURE_SHADOWMASK) + gbuffer.shadowMask = half4(0.0f, 0.0f, 0.0f, 0.0f); + #endif + #if defined(GBUFFER_FEATURE_RENDERING_LAYERS) + gbuffer.meshRenderingLayers = half4(0.0f, 0.0f, 0.0f, 0.0f); + #endif + #endif + + return gbuffer; #else half4 color = UniversalFragmentPBR(inputData, albedo, metallic, /* specular */ half3(0.0h, 0.0h, 0.0h), smoothness, occlusion, /* emission */ half3(0, 0, 0), alpha); diff --git a/Packages/com.unity.render-pipelines.universal/Tests/Editor/PostProcessDataTests/PostProcessDataAnalyticsTests.cs b/Packages/com.unity.render-pipelines.universal/Tests/Editor/PostProcessDataTests/PostProcessDataAnalyticsTests.cs index 89456dd2d01..c83902499f0 100644 --- a/Packages/com.unity.render-pipelines.universal/Tests/Editor/PostProcessDataTests/PostProcessDataAnalyticsTests.cs +++ b/Packages/com.unity.render-pipelines.universal/Tests/Editor/PostProcessDataTests/PostProcessDataAnalyticsTests.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; using System.Linq; using NUnit.Framework; -using UnityEngine.Pool; +using UnityEngine; +using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; using Assert = UnityEngine.Assertions.Assert; @@ -67,11 +68,38 @@ class PostProcessDataAnalyticsTests }, s_Datas[2]); } + + RenderPipelineAsset asset; + bool wasCreated = false; + + [SetUp] + public void SetUp() + { + if (GraphicsSettings.currentRenderPipelineAssetType == typeof(UniversalRenderPipelineAsset)) + return; + + asset = QualitySettings.renderPipeline; + QualitySettings.renderPipeline = UniversalRenderPipelineAsset.Create(); + wasCreated = true; + } + + [TearDown] + public void TearDown() + { + if (!wasCreated) + return; + + var current = (UniversalRenderPipelineAsset)QualitySettings.renderPipeline; + QualitySettings.renderPipeline = asset; + foreach (var rendererData in current.rendererDataList) + Object.DestroyImmediate(rendererData); + Object.DestroyImmediate(current); + } [Test][TestCaseSource(nameof(TestDataExtractData))] public void DataIsExtractedCorrectly((string[] input, PostProcessDataAnalytics.Analytic.PropertyToGUIDs expected) testCase) { - using (ListPool.Get(out var tmp)) + using (UnityEngine.Pool.ListPool.Get(out var tmp)) { foreach (var i in testCase.input) { diff --git a/Packages/com.unity.render-pipelines.universal/Tests/Editor/ScriptTemplateTests.cs b/Packages/com.unity.render-pipelines.universal/Tests/Editor/ScriptTemplateTests.cs new file mode 100644 index 00000000000..3da843578b6 --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Tests/Editor/ScriptTemplateTests.cs @@ -0,0 +1,26 @@ +using UnityEditor; +using NUnit.Framework; +using UnityEditor.Rendering.Universal; + +namespace UnityEngine.Rendering.Tests +{ + class ScriptTemplatesTests + { + string[] paths = new string[] + { + $"{ScriptTemplates.ScriptTemplatePath}UnlitURP.txt", + $"{ScriptTemplates.ScriptTemplatePath}ScriptableRendererFeature.txt" + }; + + [Test] + public void ScriptTemplatesExist() + { + for (int i = 0; i < paths.Length; i++) + { + var asset = AssetDatabase.LoadAssetAtPath(paths[i]); + + Assert.NotNull(asset); + } + } + } +} diff --git a/Packages/com.unity.render-pipelines.universal/Tests/Editor/ScriptTemplateTests.cs.meta b/Packages/com.unity.render-pipelines.universal/Tests/Editor/ScriptTemplateTests.cs.meta new file mode 100644 index 00000000000..df8bb6e059a --- /dev/null +++ b/Packages/com.unity.render-pipelines.universal/Tests/Editor/ScriptTemplateTests.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 4c477f36e726e48d986eb1c7d1281549 \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Tests/Editor/ShaderBuildPreprocessorTests.cs b/Packages/com.unity.render-pipelines.universal/Tests/Editor/ShaderBuildPreprocessorTests.cs index 3aaffa0c22c..87730a9c74b 100644 --- a/Packages/com.unity.render-pipelines.universal/Tests/Editor/ShaderBuildPreprocessorTests.cs +++ b/Packages/com.unity.render-pipelines.universal/Tests/Editor/ShaderBuildPreprocessorTests.cs @@ -19,8 +19,7 @@ private class TestHelper internal UniversalRendererData rendererData; internal ScriptableRendererData scriptableRendererData; internal UniversalRenderPipelineAsset urpAsset; - internal ScriptableRenderer ScriptableRenderer; - internal UniversalRenderer universalRenderer; + internal ScriptableRenderer scriptableRenderer; internal List rendererShaderFeatures; internal List ssaoRendererFeatures; internal List rendererFeatures; @@ -70,10 +69,9 @@ public TestHelper() urpAsset.name = "TestHelper_URPAsset"; GraphicsSettings.defaultRenderPipeline = urpAsset; - ScriptableRenderer = urpAsset.GetRenderer(0); - universalRenderer = ScriptableRenderer as UniversalRenderer; + scriptableRenderer = urpAsset.GetRenderer(0); stripUnusedVariants = true; - Assert.AreNotEqual(null, universalRenderer); + Assert.AreNotEqual(null, scriptableRenderer); ssaoRendererFeatures = new List(); rendererFeatures = new List(); @@ -89,7 +87,7 @@ public TestHelper() internal RendererRequirements GetRendererRequirements() { - return ShaderBuildPreprocessor.GetRendererRequirements(ref urpAsset, ref ScriptableRenderer, ref scriptableRendererData); + return ShaderBuildPreprocessor.GetRendererRequirements(ref urpAsset, ref scriptableRendererData); } internal void GetEveryVolumeFeatures(ref VolumeFeatures volumeFeatures) @@ -210,9 +208,9 @@ internal void ResetData() rendererData.renderingMode = RenderingMode.Forward; - ScriptableRenderer.useRenderPassEnabled = false; - ScriptableRenderer.stripAdditionalLightOffVariants = true; - ScriptableRenderer.stripShadowsOffVariants = true; + scriptableRenderer.useRenderPassEnabled = false; + scriptableRendererData.stripAdditionalLightOffVariants = true; + scriptableRendererData.stripShadowsOffVariants = true; for (int i = 0; i < rendererFeatures.Count; i++) { @@ -434,7 +432,7 @@ public void TestGetRendererRequirements() // Native Render Pass m_TestHelper.rendererData.renderingMode = RenderingMode.Forward; - m_TestHelper.ScriptableRenderer.useRenderPassEnabled = true; + m_TestHelper.scriptableRenderer.useRenderPassEnabled = true; expected = m_TestHelper.defaultRendererRequirements; expected.renderingMode = m_TestHelper.rendererData.renderingMode; expected.needsRenderPass = false; @@ -442,7 +440,7 @@ public void TestGetRendererRequirements() m_TestHelper.AssertRendererRequirementsAndReset(expected, actual); m_TestHelper.rendererData.renderingMode = RenderingMode.ForwardPlus; - m_TestHelper.ScriptableRenderer.useRenderPassEnabled = true; + m_TestHelper.scriptableRenderer.useRenderPassEnabled = true; expected = m_TestHelper.defaultRendererRequirements; expected.renderingMode = m_TestHelper.rendererData.renderingMode; expected.needsRenderPass = false; @@ -450,7 +448,7 @@ public void TestGetRendererRequirements() m_TestHelper.AssertRendererRequirementsAndReset(expected, actual); m_TestHelper.rendererData.renderingMode = RenderingMode.Deferred; - m_TestHelper.ScriptableRenderer.useRenderPassEnabled = true; + m_TestHelper.scriptableRenderer.useRenderPassEnabled = true; expected = m_TestHelper.defaultRendererRequirements; expected.renderingMode = m_TestHelper.rendererData.renderingMode; expected.needsRenderPass = true; @@ -539,26 +537,26 @@ public void TestGetRendererRequirements() m_TestHelper.AssertRendererRequirementsAndReset(expected, actual); // Shadows Off - m_TestHelper.ScriptableRenderer.stripShadowsOffVariants = false; + m_TestHelper.scriptableRendererData.stripShadowsOffVariants = false; expected = m_TestHelper.defaultRendererRequirements; expected.needsShadowsOff = true; actual = m_TestHelper.GetRendererRequirements(); m_TestHelper.AssertRendererRequirementsAndReset(expected, actual); - m_TestHelper.ScriptableRenderer.stripShadowsOffVariants = true; + m_TestHelper.scriptableRendererData.stripShadowsOffVariants = true; expected = m_TestHelper.defaultRendererRequirements; expected.needsShadowsOff = false; actual = m_TestHelper.GetRendererRequirements(); m_TestHelper.AssertRendererRequirementsAndReset(expected, actual); // Additional Lights Off - m_TestHelper.ScriptableRenderer.stripAdditionalLightOffVariants = false; + m_TestHelper.scriptableRendererData.stripAdditionalLightOffVariants = false; expected = m_TestHelper.defaultRendererRequirements; expected.needsAdditionalLightsOff = true; actual = m_TestHelper.GetRendererRequirements(); m_TestHelper.AssertRendererRequirementsAndReset(expected, actual); - m_TestHelper.ScriptableRenderer.stripAdditionalLightOffVariants = true; + m_TestHelper.scriptableRendererData.stripAdditionalLightOffVariants = true; expected = m_TestHelper.defaultRendererRequirements; expected.needsAdditionalLightsOff = false; actual = m_TestHelper.GetRendererRequirements(); diff --git a/Packages/com.unity.render-pipelines.universal/Tests/Editor/URPGlobalSettingsMigrationTests/.buginfo b/Packages/com.unity.render-pipelines.universal/Tests/Editor/URPGlobalSettingsMigrationTests/.buginfo index 716a23b6629..f9acb0adfcd 100644 --- a/Packages/com.unity.render-pipelines.universal/Tests/Editor/URPGlobalSettingsMigrationTests/.buginfo +++ b/Packages/com.unity.render-pipelines.universal/Tests/Editor/URPGlobalSettingsMigrationTests/.buginfo @@ -1 +1 @@ -area: SRP Workflow \ No newline at end of file +area: SRP Settings \ No newline at end of file diff --git a/Packages/com.unity.render-pipelines.universal/Tests/Runtime/LightTests.cs b/Packages/com.unity.render-pipelines.universal/Tests/Runtime/LightTests.cs index 0055383c902..c72fa64e33d 100644 --- a/Packages/com.unity.render-pipelines.universal/Tests/Runtime/LightTests.cs +++ b/Packages/com.unity.render-pipelines.universal/Tests/Runtime/LightTests.cs @@ -16,20 +16,20 @@ public void TestMainLightRenderingLayerMaskSyncWithUniversalLightAndShadowLayers lightData.shadowRenderingLayers = (1 << 2); lightData.customShadowLayers = false; - Assert.AreEqual(light.renderingLayerMask, lightData.renderingLayers); + Assert.AreEqual(light.renderingLayerMask, (int)lightData.renderingLayers); lightData.customShadowLayers = true; - Assert.AreEqual(light.renderingLayerMask, lightData.shadowRenderingLayers); + Assert.AreEqual(light.renderingLayerMask, (int)lightData.shadowRenderingLayers); lightData.customShadowLayers = false; lightData.renderingLayers = (1 << 3); lightData.shadowRenderingLayers = (1 << 4); - Assert.AreEqual(light.renderingLayerMask, lightData.renderingLayers); + Assert.AreEqual(light.renderingLayerMask, (int)lightData.renderingLayers); lightData.customShadowLayers = true; lightData.renderingLayers = (1 << 5); lightData.shadowRenderingLayers = (1 << 6); - Assert.AreEqual(light.renderingLayerMask, lightData.shadowRenderingLayers); + Assert.AreEqual(light.renderingLayerMask, (int)lightData.shadowRenderingLayers); Object.DestroyImmediate(lightObject); } diff --git a/Packages/com.unity.shadergraph/Documentation~/Create-Shader-Graph.md b/Packages/com.unity.shadergraph/Documentation~/Create-Shader-Graph.md index 1e8df26e36b..3b0a32c6085 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Create-Shader-Graph.md +++ b/Packages/com.unity.shadergraph/Documentation~/Create-Shader-Graph.md @@ -13,7 +13,7 @@ The following options are always available: A sub menu for each installed render pipeline may be present containing template stacks for standard shading models ( Lit, Unlit, etc ). -For a full list of provided options, refer to the [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest) and [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest) documentation. +For a full list of provided options, refer to the [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html) and [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest) documentation. For this example, Universal is installed so a Unversal Lit Shader Graph has been created. diff --git a/Packages/com.unity.shadergraph/Documentation~/Fresnel-Effect-Node.md b/Packages/com.unity.shadergraph/Documentation~/Fresnel-Effect-Node.md index b5630cb3779..4b31739c3f6 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Fresnel-Effect-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Fresnel-Effect-Node.md @@ -20,6 +20,6 @@ The following example code represents one possible outcome of this node. ``` void Unity_FresnelEffect_float(float3 Normal, float3 ViewDir, float Power, out float Out) { - Out = pow((1.0 - saturate(dot(normalize(Normal), normalize(ViewDir)))), Power); + Out = pow((1.0 - saturate(dot(normalize(Normal), ViewDir))), Power); } ``` diff --git a/Packages/com.unity.shadergraph/Documentation~/Getting-Started.md b/Packages/com.unity.shadergraph/Documentation~/Getting-Started.md index eb9171b14a0..cd100678fe1 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Getting-Started.md +++ b/Packages/com.unity.shadergraph/Documentation~/Getting-Started.md @@ -3,7 +3,7 @@ Use Shader Graph with either of the Scriptable Render Pipelines (SRPs) available in Unity version 2018.1 and later: - The [High Definition Render Pipeline (HDRP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest) -- The [Universal Render Pipeline (URP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest) +- The [Universal Render Pipeline (URP)](https://docs.unity3d.com/Manual/urp/urp-introduction.html) As of Unity version 2021.2, you can also use Shader Graph with the [Built-In Render Pipeline](https://docs.unity3d.com/Documentation/Manual/built-in-render-pipeline.html). @@ -12,4 +12,4 @@ As of Unity version 2021.2, you can also use Shader Graph with the [Built-In Ren When you install HDRP or URP into your project, Unity also installs the Shader Graph package automatically. You can manually install Shader Graph for use with the Built-In Render Pipeline on Unity version 2021.2 and later with the Package Manager. For more information on how to install a package, see [Adding and removing packages](https://docs.unity3d.com/Manual/upm-ui-actions.html) in the Unity User Manual. -For more information about how to set up a Scriptable Render Pipeline, see [Getting started with HDRP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@17.0/manual/getting-started-in-hdrp.html) or [Getting started with URP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/manual/InstallingAndConfiguringURP.html). +For more information about how to set up a Scriptable Render Pipeline, see [Getting started with HDRP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@17.0/manual/getting-started-in-hdrp.html) or [Getting started with URP](https://docs.unity3d.com/Manual/urp/InstallingAndConfiguringURP). diff --git a/Packages/com.unity.shadergraph/Documentation~/Graph-Settings-Tab.md b/Packages/com.unity.shadergraph/Documentation~/Graph-Settings-Tab.md index 78d145f0c1e..038ddf6665a 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Graph-Settings-Tab.md +++ b/Packages/com.unity.shadergraph/Documentation~/Graph-Settings-Tab.md @@ -12,4 +12,4 @@ The **Graph Settings** tab on the **[Graph Inspector](Internal-Inspector.md)** m |:----------|:------------| | Precision | A [Precision Mode](Precision-Modes.md) drop-down menu that lets you set the default precision for the entire graph. You can override the Precision setting here at the node level in your graph.| | Preview Mode | (Subgraphs only) Your options are **Inherit**, **Preview 2D**, and **Preview 3D**. | -| Active Targets | A list that contains the Targets you've selected. You can add or remove entries using the Add (**+**) and Remove (**-**) buttons.
Shader Graph supports three targets: the [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.0/manual/index.html), the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@12.0/manual/index.html), and [Built-In Render Pipeline](https://docs.unity3d.com/2020.3/Documentation/Manual/render-pipelines.html). Target-specific settings appear below the standard setting options. The displayed Target-specific settings change according to which Targets you select. | +| Active Targets | A list that contains the Targets you've selected. You can add or remove entries using the Add (**+**) and Remove (**-**) buttons.
Shader Graph supports three targets: the [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html), the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@12.0/manual/index.html), and [Built-In Render Pipeline](https://docs.unity3d.com/2020.3/Documentation/Manual/render-pipelines). Target-specific settings appear below the standard setting options. The displayed Target-specific settings change according to which Targets you select. | diff --git a/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md b/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md index 63b2305a31a..652b6b20eb4 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md +++ b/Packages/com.unity.shadergraph/Documentation~/Graph-Target.md @@ -10,7 +10,7 @@ Target Settings are specific to each Target, and can vary between assets dependi Typically, each Target you select generates a valid subshader from the graph. For example, a Shader Graph asset with both URP and HDRP Targets will generate two subshaders. When you use a graph that targets multiple render pipelines, you must reimport the Shader Graph asset if you change the active render pipeline. This updates the Material Inspector for any Materials that use your graph. -Shader Graph supports three targets: the [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.0/manual/index.html), the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@12.0/manual/index.html), and the [Built-In Render Pipeline](https://docs.unity3d.com/2020.3/Documentation/Manual/render-pipelines.html). +Shader Graph supports three targets: the [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html), the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@12.0/manual/index.html), and the [Built-In Render Pipeline](https://docs.unity3d.com/2020.3/Documentation/Manual/render-pipelines). Not all blocks are compatible with all targets. If a block in your graph becomes inactive when you choose a target, that block is not compatible with that target. diff --git a/Packages/com.unity.shadergraph/Documentation~/Position-Node.md b/Packages/com.unity.shadergraph/Documentation~/Position-Node.md index 116449a0274..5982556c6cc 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Position-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Position-Node.md @@ -21,7 +21,7 @@ The Position Node provides drop-down options for both **World** and **Absolute W The [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html) uses [Camera Relative](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?preview=1&subfolder=/manual/Camera-Relative-Rendering.html) as its default world space. -The [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html) uses **Absolute World** as its default world space. +The [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html) uses **Absolute World** as its default world space. ### Upgrading from previous versions If you use a Position Node in **World** space on a graph authored in Shader Graph version 6.7.0 or earlier, it automatically upgrades the selection to **Absolute World**. This ensures that the calculations on your graph remain accurate to your expectations, since the **World** output might change. diff --git a/Packages/com.unity.shadergraph/Documentation~/Posterize-Node.md b/Packages/com.unity.shadergraph/Documentation~/Posterize-Node.md index 0f51078c949..a36c78c942d 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Posterize-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Posterize-Node.md @@ -23,6 +23,6 @@ The following example code represents one possible outcome of this node. ``` void Unity_Posterize_float4(float4 In, float4 Steps, out float4 Out) { - Out = floor(In / (1 / Steps)) * (1 / Steps); + Out = floor(In * Steps) / Steps; } ``` diff --git a/Packages/com.unity.shadergraph/Documentation~/Rotate-About-Axis-Node.md b/Packages/com.unity.shadergraph/Documentation~/Rotate-About-Axis-Node.md index fef208686c8..2d0100e03da 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Rotate-About-Axis-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Rotate-About-Axis-Node.md @@ -28,17 +28,10 @@ The following example code represents one possible outcome of this node per **Un ``` void Unity_RotateAboutAxis_Radians_float(float3 In, float3 Axis, float Rotation, out float3 Out) { - float s = sin(Rotation); - float c = cos(Rotation); - float one_minus_c = 1.0 - c; - + float s, c; + sincos(Rotation, s, c); Axis = normalize(Axis); - float3x3 rot_mat = - { one_minus_c * Axis.x * Axis.x + c, one_minus_c * Axis.x * Axis.y - Axis.z * s, one_minus_c * Axis.z * Axis.x + Axis.y * s, - one_minus_c * Axis.x * Axis.y + Axis.z * s, one_minus_c * Axis.y * Axis.y + c, one_minus_c * Axis.y * Axis.z - Axis.x * s, - one_minus_c * Axis.z * Axis.x - Axis.y * s, one_minus_c * Axis.y * Axis.z + Axis.x * s, one_minus_c * Axis.z * Axis.z + c - }; - Out = mul(rot_mat, In); + Out = In * c + cross(Axis, In) * s + Axis * dot(Axis, In) * (1 - c); } ``` @@ -48,16 +41,9 @@ void Unity_RotateAboutAxis_Radians_float(float3 In, float3 Axis, float Rotation, void Unity_RotateAboutAxis_Degrees_float(float3 In, float3 Axis, float Rotation, out float3 Out) { Rotation = radians(Rotation); - float s = sin(Rotation); - float c = cos(Rotation); - float one_minus_c = 1.0 - c; - + float s, c; + sincos(Rotation, s, c); Axis = normalize(Axis); - float3x3 rot_mat = - { one_minus_c * Axis.x * Axis.x + c, one_minus_c * Axis.x * Axis.y - Axis.z * s, one_minus_c * Axis.z * Axis.x + Axis.y * s, - one_minus_c * Axis.x * Axis.y + Axis.z * s, one_minus_c * Axis.y * Axis.y + c, one_minus_c * Axis.y * Axis.z - Axis.x * s, - one_minus_c * Axis.z * Axis.x - Axis.y * s, one_minus_c * Axis.y * Axis.z + Axis.x * s, one_minus_c * Axis.z * Axis.z + c - }; - Out = mul(rot_mat, In); + Out = In * c + cross(Axis, In) * s + Axis * dot(Axis, In) * (1 - c); } ``` diff --git a/Packages/com.unity.shadergraph/Documentation~/Rotate-Node.md b/Packages/com.unity.shadergraph/Documentation~/Rotate-Node.md index a9851024b0c..04d5a26b0ed 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Rotate-Node.md +++ b/Packages/com.unity.shadergraph/Documentation~/Rotate-Node.md @@ -29,15 +29,13 @@ The following example code represents one possible outcome of this node per **Un void Unity_Rotate_Radians_float(float2 UV, float2 Center, float Rotation, out float2 Out) { UV -= Center; - float s = sin(Rotation); - float c = cos(Rotation); - float2x2 rMatrix = float2x2(c, -s, s, c); - rMatrix *= 0.5; - rMatrix += 0.5; - rMatrix = rMatrix * 2 - 1; - UV.xy = mul(UV.xy, rMatrix); - UV += Center; - Out = UV; + float s, c; + sincos(Rotation, s, c); + float3 r3 = float(-s, c, s); + float2 r1; + r1.y = dot(UV, r3.xy); + r1.x = dot(UV, r3.yz); + Out = r1 + Center; } ``` @@ -48,14 +46,12 @@ void Unity_Rotate_Degrees_float(float2 UV, float2 Center, float Rotation, out fl { Rotation = Rotation * (3.1415926f/180.0f); UV -= Center; - float s = sin(Rotation); - float c = cos(Rotation); - float2x2 rMatrix = float2x2(c, -s, s, c); - rMatrix *= 0.5; - rMatrix += 0.5; - rMatrix = rMatrix * 2 - 1; - UV.xy = mul(UV.xy, rMatrix); - UV += Center; - Out = UV; + float s, c; + sincos(Rotation, s, c); + float3 r3 = float(-s, c, s); + float2 r1; + r1.y = dot(UV, r3.xy); + r1.x = dot(UV, r3.yz); + Out = r1 + Center; } ``` diff --git a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Production-Ready-Decal.md b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Production-Ready-Decal.md index bcd3e81a8ee..ac30f503e25 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Production-Ready-Decal.md +++ b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Production-Ready-Decal.md @@ -1,7 +1,7 @@ # Decals Decals allow you to apply local material modifications to specific places in the world. You might think of things like applying graffiti tags to a wall or scattering fallen leaves below a tree. But decals can be used for a lot more. In these examples, we see decals making things look wet, making surfaces appear to have flowing water across them, projecting water caustics, and blending specific materials onto other objects. -Decals are available to use in both HDRP and URP, but they need to be enabled in both render pipelines. To use decals, refer to the documentation in both [HDRP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@17.0/manual/decals.html) and [URP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/manual/renderer-feature-decal.html). +Decals are available to use in both HDRP and URP, but they need to be enabled in both render pipelines. To use decals, refer to the documentation in both [HDRP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@17.0/manual/decals.html) and [URP](https://docs.unity3d.com/Manual/urp/renderer-feature-decal.html). #### Material Projection This decal uses triplanar projection to project a material in 3D space. It projects materials correctly onto any mesh that intersects the decal volume. It can be used to apply terrain materials on to other objects like rocks so that they blend in better with the terrain. diff --git a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Production-Ready-Detail.md b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Production-Ready-Detail.md index 59de6ba7216..1e454e51a9c 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Production-Ready-Detail.md +++ b/Packages/com.unity.shadergraph/Documentation~/Shader-Graph-Sample-Production-Ready-Detail.md @@ -54,7 +54,7 @@ This custom GUI script enables the small texture thumbnails and other features i ## Decals Decals allow you to apply local material modifications to specific places in the world. You might think of things like applying graffiti tags to a wall or scattering fallen leaves below a tree. But decals can be used for a lot more. In these examples, we see decals making things look wet, making surfaces appear to have flowing water across them, projecting water caustics, and blending specific materials onto other objects. -Decals are available to use in both HDRP and URP, but they need to be enabled in both render pipelines. To use decals, see the documentation in both [HDRP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@17.0/manual/decals.html) and [URP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/manual/renderer-feature-decal.html). +Decals are available to use in both HDRP and URP, but they need to be enabled in both render pipelines. To use decals, see the documentation in both [HDRP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@17.0/manual/decals.html) and [URP](https://docs.unity3d.com/Manual/urp/renderer-feature-decal.html). #### Material Projection This decal uses triplanar projection to project a material in 3D space. It projects materials correctly onto any mesh that intersects the decal volume. It can be used to apply terrain materials on to other objects like rocks so that they blend in better with the terrain. diff --git a/Packages/com.unity.shadergraph/Documentation~/SpeedTree8-SubGraphAssets.md b/Packages/com.unity.shadergraph/Documentation~/SpeedTree8-SubGraphAssets.md index 3429efa03ff..ddfd332c278 100644 --- a/Packages/com.unity.shadergraph/Documentation~/SpeedTree8-SubGraphAssets.md +++ b/Packages/com.unity.shadergraph/Documentation~/SpeedTree8-SubGraphAssets.md @@ -18,7 +18,7 @@ Shader Graph has three built-in SpeedTree Sub Graph Assets: * [SpeedTree8Wind](#SpeedTree8Wind) * [SpeedTree8Billboard](#SpeedTree8Billboard) -These Sub Graph Assets provide SpeedTree 8 functionality for both the [Universal Render Pipeline (URP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.0/manual/index.html) and [High Definition Render Pipeline (HDRP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@12.0/manual/index.html), so that you can work with SpeedTree 8 assets and create your own custom SpeedTree 8 Shader Graphs. +These Sub Graph Assets provide SpeedTree 8 functionality for both the [Universal Render Pipeline (URP)](https://docs.unity3d.com/Manual/urp/urp-introduction.html) and [High Definition Render Pipeline (HDRP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@12.0/manual/index), so that you can work with SpeedTree 8 assets and create your own custom SpeedTree 8 Shader Graphs. **Note:** The URP-specific versions of these SpeedTree 8 Sub Graph Assets use transparent billboard back faces instead of culling billboard back faces. These Sub Graph Assets can only replace their URP equivalents as a default once URP supports per-material culling overrides in Shader Graphs. diff --git a/Packages/com.unity.shadergraph/Documentation~/Upgrade-Guide-10-0-x.md b/Packages/com.unity.shadergraph/Documentation~/Upgrade-Guide-10-0-x.md index eff56487221..1d3332b5b05 100644 --- a/Packages/com.unity.shadergraph/Documentation~/Upgrade-Guide-10-0-x.md +++ b/Packages/com.unity.shadergraph/Documentation~/Upgrade-Guide-10-0-x.md @@ -35,7 +35,7 @@ After the upgrade, you can add any required Block nodes that went missing, and r ### Upgrade cross-pipeline Master Nodes to the Master Stack -If your graph contains PBR or Unlit Master Nodes that are compatible with both the [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest) (URP) and the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest) (HDRP), Shader Graph automatically upgrades them to the Master Stack based on the render pipeline currently available in your project. With Master Stacks, when you switch from one render pipeline to another, you must reimport your Shader Graph assets to update the Material Inspector for any Materials in your project. +If your graph contains PBR or Unlit Master Nodes that are compatible with both the [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html) (URP) and the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest) (HDRP), Shader Graph automatically upgrades them to the Master Stack based on the render pipeline currently available in your project. With Master Stacks, when you switch from one render pipeline to another, you must reimport your Shader Graph assets to update the Material Inspector for any Materials in your project. In URP, you can now find all PBR Master Node settings in the URP Lit Target. The Unlit Master Node settings are in the URP Unlit Target. These settings are the same, and the final shader should appear the same as before the upgrade. diff --git a/Packages/com.unity.shadergraph/Documentation~/index.md b/Packages/com.unity.shadergraph/Documentation~/index.md index b03b1738ca1..44e968d904d 100644 --- a/Packages/com.unity.shadergraph/Documentation~/index.md +++ b/Packages/com.unity.shadergraph/Documentation~/index.md @@ -6,7 +6,7 @@ Shader Graph enables you to build shaders visually. Instead of writing code, you For an introduction to Shader Graph, see [Getting Started](Getting-Started.md). -Shader Graph is available through the Package Manager window in supported versions of the Unity Editor. If you install a Scriptable Render Pipeline (SRP) such as the [Universal Render Pipeline (URP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest) or the [High Definition Render Pipeline (HDRP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest), Unity automatically installs Shader Graph in your project. +Shader Graph is available through the Package Manager window in supported versions of the Unity Editor. If you install a Scriptable Render Pipeline (SRP) such as the [Universal Render Pipeline (URP)](https://docs.unity3d.com/Manual/urp/urp-introduction.html) or the [High Definition Render Pipeline (HDRP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest), Unity automatically installs Shader Graph in your project. Shader Graph package versions on Unity Engine 2018.x are *Preview* versions, which do not receive bug fixes and feature maintenance. To work with an actively supported version of Shader Graph, use Unity Engine 2019.1 or higher. @@ -14,7 +14,7 @@ Shader Graph package versions on Unity Engine 2018.x are *Preview* versions, whi With the release of Unity 2021.1, graphics packages are relocating to the core of Unity. This move simplifies the experience of working with new Unity graphics features, as well as ensuring that your projects are always running on the latest verified graphics code. -For each release of Unity (alpha / beta / patch release) graphics packages are embedded within the main Unity installer. When you install the latest release of Unity, you also get the latest [Universal Render Pipeline (URP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest), [High Definition Render Pipeline (HDRP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest), Shader Graph, [Visual Effect (VFX) Graph](https://docs.unity3d.com/Packages/com.unity.visualeffectgraph@latest) packages, among others. +For each release of Unity (alpha / beta / patch release) graphics packages are embedded within the main Unity installer. When you install the latest release of Unity, you also get the latest [Universal Render Pipeline (URP)](https://docs.unity3d.com/Manual/urp/urp-introduction.html), [High Definition Render Pipeline (HDRP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest), Shader Graph, [Visual Effect (VFX) Graph](https://docs.unity3d.com/Packages/com.unity.visualeffectgraph@latest) packages, among others. Tying graphics packages to the main Unity release allows better testing to ensure that the graphics packages you use have been tested extensively with the version of Unity you have downloaded. diff --git a/Packages/com.unity.shadergraph/Documentation~/surface-options.md b/Packages/com.unity.shadergraph/Documentation~/surface-options.md index f49bd2ca652..e1df7e53e70 100644 --- a/Packages/com.unity.shadergraph/Documentation~/surface-options.md +++ b/Packages/com.unity.shadergraph/Documentation~/surface-options.md @@ -9,12 +9,12 @@ Enable **Allow Material Override** to modify a specific set of properties for Un - + - + diff --git a/Packages/com.unity.shadergraph/Editor/Data/Graphs/GraphConcretization.cs b/Packages/com.unity.shadergraph/Editor/Data/Graphs/GraphConcretization.cs index 2b570d1300c..98dccfb8755 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/Graphs/GraphConcretization.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/Graphs/GraphConcretization.cs @@ -17,7 +17,17 @@ public static void ConcretizeProperties(GraphData graph) // get all property nodes whose property doesn't exist? var propertyNodes = graph.GetNodes().Where(n => !graph.m_Properties.Any(p => p.value == n.property || n.property != null && p.value.objectId == n.property.objectId)).ToArray(); foreach (var pNode in propertyNodes) - graph.ReplacePropertyNodeWithConcreteNodeNoValidate(pNode); + { + if (graph.replaceInProgress) + { + // If the graph is being replaced, the replacement graph should already contain a concrete node for this property node. + graph.RemoveNodeNoValidate(pNode); + } + else + { + graph.ReplacePropertyNodeWithConcreteNodeNoValidate(pNode); + } + } } public static void ConcretizeGraph(GraphData graph) diff --git a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Input/Lighting/BakedGINode.cs b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Input/Lighting/BakedGINode.cs index 3c2e861c097..0cde32f1a8e 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Input/Lighting/BakedGINode.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Input/Lighting/BakedGINode.cs @@ -76,7 +76,7 @@ public sealed override void UpdateNodeAfterDeserialization() public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode) { - if (generationMode == GenerationMode.ForReals) + if (generationMode == GenerationMode.ForReals || generationMode == GenerationMode.VFX) { sb.AppendLine("$precision3 {6} = SHADERGRAPH_BAKED_GI({0}, {1}, IN.{2}.xy, {3}, {4}, {5});", GetSlotValue(kPositionWSInputSlotId, generationMode), diff --git a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Math/Advanced/PosterizeNode.cs b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Math/Advanced/PosterizeNode.cs index 204bf62a6da..e88cb64a0fe 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Math/Advanced/PosterizeNode.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Math/Advanced/PosterizeNode.cs @@ -23,7 +23,7 @@ static string Unity_Posterize( return @" { - Out = floor(In / (1 / Steps)) * (1 / Steps); + Out = floor(In * Steps) / Steps; } "; } diff --git a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Math/Vector/FresnelEffectNode.cs b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Math/Vector/FresnelEffectNode.cs index 3d766131eda..7b26caeb02b 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Math/Vector/FresnelEffectNode.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Math/Vector/FresnelEffectNode.cs @@ -26,7 +26,7 @@ static string Unity_FresnelEffect( return @" { - Out = pow((1.0 - saturate(dot(normalize(Normal), normalize(ViewDir)))), Power); + Out = pow((1.0 - saturate(dot(normalize(Normal), ViewDir))), Power); } "; } diff --git a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Math/Vector/RotateAboutAxisNode.cs b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Math/Vector/RotateAboutAxisNode.cs index 17680e2c3f2..651cbb5b056 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Math/Vector/RotateAboutAxisNode.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Math/Vector/RotateAboutAxisNode.cs @@ -50,19 +50,10 @@ static string Unity_Rotate_About_Axis_Degrees( @" { Rotation = radians(Rotation); - - $precision s = sin(Rotation); - $precision c = cos(Rotation); - $precision one_minus_c = 1.0 - c; - + $precision s, c; + sincos(Rotation, s, c); Axis = normalize(Axis); - - $precision3x3 rot_mat = { one_minus_c * Axis.x * Axis.x + c, one_minus_c * Axis.x * Axis.y - Axis.z * s, one_minus_c * Axis.z * Axis.x + Axis.y * s, - one_minus_c * Axis.x * Axis.y + Axis.z * s, one_minus_c * Axis.y * Axis.y + c, one_minus_c * Axis.y * Axis.z - Axis.x * s, - one_minus_c * Axis.z * Axis.x - Axis.y * s, one_minus_c * Axis.y * Axis.z + Axis.x * s, one_minus_c * Axis.z * Axis.z + c - }; - - Out = mul(rot_mat, In); + Out = In * c + cross(Axis, In) * s + Axis * dot(Axis, In) * (1 - c); } "; } @@ -77,18 +68,10 @@ static string Unity_Rotate_About_Axis_Radians( return @" { - $precision s = sin(Rotation); - $precision c = cos(Rotation); - $precision one_minus_c = 1.0 - c; - + $precision s, c; + sincos(Rotation, s, c); Axis = normalize(Axis); - - $precision3x3 rot_mat = { one_minus_c * Axis.x * Axis.x + c, one_minus_c * Axis.x * Axis.y - Axis.z * s, one_minus_c * Axis.z * Axis.x + Axis.y * s, - one_minus_c * Axis.x * Axis.y + Axis.z * s, one_minus_c * Axis.y * Axis.y + c, one_minus_c * Axis.y * Axis.z - Axis.x * s, - one_minus_c * Axis.z * Axis.x - Axis.y * s, one_minus_c * Axis.y * Axis.z + Axis.x * s, one_minus_c * Axis.z * Axis.z + c - }; - - Out = mul(rot_mat, In); + Out = In * c + cross(Axis, In) * s + Axis * dot(Axis, In) * (1 - c); } "; } diff --git a/Packages/com.unity.shadergraph/Editor/Data/Nodes/UV/RotateNode.cs b/Packages/com.unity.shadergraph/Editor/Data/Nodes/UV/RotateNode.cs index 2f98f068004..fe72ac76fc4 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/Nodes/UV/RotateNode.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/Nodes/UV/RotateNode.cs @@ -56,22 +56,14 @@ static string Unity_Rotate_Radians( return @" { - //rotation matrix UV -= Center; - $precision s = sin(Rotation); - $precision c = cos(Rotation); - - //center rotation matrix - $precision2x2 rMatrix = $precision2x2(c, -s, s, c); - rMatrix *= 0.5; - rMatrix += 0.5; - rMatrix = rMatrix*2 - 1; - - //multiply the UVs by the rotation matrix - UV.xy = mul(UV.xy, rMatrix); - UV += Center; - - Out = UV; + $precision s, c; + sincos(Rotation, s, c); + $precision3 r3 = $precision3(-s, c, s); + $precision2 r1; + r1.y = dot(UV, r3.xy); + r1.x = dot(UV, r3.yz); + Out = r1 + Center; }"; } @@ -85,23 +77,15 @@ static string Unity_Rotate_Degrees( return @" { - //rotation matrix Rotation = Rotation * (3.1415926f/180.0f); UV -= Center; - $precision s = sin(Rotation); - $precision c = cos(Rotation); - - //center rotation matrix - $precision2x2 rMatrix = $precision2x2(c, -s, s, c); - rMatrix *= 0.5; - rMatrix += 0.5; - rMatrix = rMatrix*2 - 1; - - //multiply the UVs by the rotation matrix - UV.xy = mul(UV.xy, rMatrix); - UV += Center; - - Out = UV; + $precision s, c; + sincos(Rotation, s, c); + $precision3 r3 = $precision3(-s, c, s); + $precision2 r1; + r1.y = dot(UV, r3.xy); + r1.x = dot(UV, r3.yz); + Out = r1 + Center; }"; } } diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboardCategory.cs b/Packages/com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboardCategory.cs index e5bd09891a7..20755251c8b 100644 --- a/Packages/com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboardCategory.cs +++ b/Packages/com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboardCategory.cs @@ -366,20 +366,37 @@ void OnHoverEndEvent(MouseLeaveEvent evt) RemoveFromClassList("hovered"); } + static bool SelectionContainsAny(IList selection) where T : ISelectable + { + for (var i = 0; i < selection.Count; i++) + { + if (selection[i] is T) + { + return true; + } + } + + return false; + } + void OnDragUpdatedEvent(DragUpdatedEvent evt) { - var selection = DragAndDrop.GetGenericData("DragSelection") as List; + if (DragAndDrop.GetGenericData("DragSelection") is not List dragSelection) + { + SetDragIndicatorVisible(false); + return; + } // Don't show drag indicator if selection has categories, // We don't want category drag & drop to be ambiguous with shader input drag & drop - if (selection.OfType().Any()) + if (SelectionContainsAny(dragSelection)) { SetDragIndicatorVisible(false); return; } // If can't find at least one blackboard field in the selection, don't update drag indicator - if (selection.OfType().Any() == false) + if (!SelectionContainsAny(dragSelection)) { SetDragIndicatorVisible(false); return; @@ -455,13 +472,17 @@ void OnDragUpdatedEvent(DragUpdatedEvent evt) void OnDragPerformEvent(DragPerformEvent evt) { - var selection = DragAndDrop.GetGenericData("DragSelection") as List; - m_IsDragInProgress = false; + if (DragAndDrop.GetGenericData("DragSelection") is not List dragSelection) + { + SetDragIndicatorVisible(false); + return; + } + // Don't show drag indicator if selection has categories, // We don't want category drag & drop to be ambiguous with shader input drag & drop - if (selection.OfType().Any()) + if (SelectionContainsAny(dragSelection)) { SetDragIndicatorVisible(false); return; @@ -476,7 +497,7 @@ void OnDragPerformEvent(DragPerformEvent evt) // Map of containing categories to the actual dragged elements within them SortedDictionary> draggedElements = new SortedDictionary>(); - foreach (ISelectable selectedElement in selection) + foreach (ISelectable selectedElement in dragSelection) { var draggedElement = selectedElement as VisualElement; if (draggedElement == null) @@ -588,7 +609,7 @@ void OnDragPerformEvent(DragPerformEvent evt) m_ViewModel.requestModelChangeAction(moveShaderInputAction); // Make sure to remove the element from the selection so it doesn't get re-handled by the blackboard as well, leads to duplicates - selection.Remove(blackboardField); + dragSelection.Remove(blackboardField); if (insertIndex > indexOfDraggedElement) continue; @@ -647,7 +668,7 @@ void OnDragPerformEvent(DragPerformEvent evt) m_ViewModel.requestModelChangeAction(addItemToCategoryAction); // Make sure to remove the element from the selection so it doesn't get re-handled by the blackboard as well, leads to duplicates - selection.Remove(blackboardField); + dragSelection.Remove(blackboardField); // If adding to the end of the list, we no longer need to increment the index if (insertIndex != -1) diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs b/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs index fc49da8a9da..fb557751a89 100644 --- a/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs +++ b/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs @@ -63,6 +63,7 @@ public MaterialGraphView() Vector3 lkgScale; void OnTransformChanged(GraphView graphView) { +#pragma warning disable CS0618 // Type or member is obsolete if (!graphView.viewTransform.position.Equals(Vector3.zero)) { lkgPosition = graphView.viewTransform.position; @@ -72,6 +73,7 @@ void OnTransformChanged(GraphView graphView) { graphView.UpdateViewTransform(lkgPosition, lkgScale); } +#pragma warning restore CS0618 // Type or member is obsolete } protected internal override bool canCutSelection diff --git a/Packages/com.unity.shadergraph/Editor/Importers/ShaderGraphImporter.cs b/Packages/com.unity.shadergraph/Editor/Importers/ShaderGraphImporter.cs index 902978d272e..aae75129fcc 100644 --- a/Packages/com.unity.shadergraph/Editor/Importers/ShaderGraphImporter.cs +++ b/Packages/com.unity.shadergraph/Editor/Importers/ShaderGraphImporter.cs @@ -20,6 +20,7 @@ class ShaderGraphImporter : ScriptedImporter { public const string Extension = "shadergraph"; public const string LegacyExtension = "ShaderGraph"; + const string IconBasePath = "Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_graph_icon.png"; public const string k_ErrorShader = @" Shader ""Hidden/GraphErrorShader2"" @@ -236,8 +237,11 @@ public override void OnImportAsset(AssetImportContext ctx) mainObject = ShaderUtil.CreateShaderAsset(ctx, k_ErrorShader, false); } - Texture2D texture = Resources.Load("Icons/sg_graph_icon"); - ctx.AddObjectToAsset("MainAsset", mainObject, texture); + if (EditorGUIUtility.IconContent(IconBasePath)?.image is Texture2D icon) + { + ctx.AddObjectToAsset("MainAsset", mainObject, icon); + } + ctx.SetMainObject(mainObject); var graphDataReadOnly = new GraphDataReadOnly(graph); @@ -699,7 +703,7 @@ static ShaderGraphVfxAsset GenerateVfxShaderGraphAsset(GraphData graph) // foreach (var node in source.nodes) // { // message.AppendLine($"{node.name} ({node.objectId}): {node.concretePrecision}"); - // } + // } // throw new InvalidOperationException(message.ToString()); //} diff --git a/Packages/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs b/Packages/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs index 4244b49d3ac..04001304d70 100644 --- a/Packages/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs +++ b/Packages/com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs @@ -23,6 +23,7 @@ namespace UnityEditor.ShaderGraph class ShaderSubGraphImporter : ScriptedImporter { public const string Extension = "shadersubgraph"; + const string IconBasePath = "Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_subgraph_icon.png"; [SuppressMessage("ReSharper", "UnusedMember.Local")] static string[] GatherDependenciesFromSourceFile(string assetPath) @@ -112,8 +113,11 @@ public override void OnImportAsset(AssetImportContext ctx) messageManager.ClearAll(); } - Texture2D texture = Resources.Load("Icons/sg_subgraph_icon"); - ctx.AddObjectToAsset("MainAsset", graphAsset, texture); + if (EditorGUIUtility.IconContent(IconBasePath)?.image is Texture2D icon) + { + ctx.AddObjectToAsset("MainAsset", graphAsset, icon); + } + ctx.SetMainObject(graphAsset); var metadata = ScriptableObject.CreateInstance(); diff --git a/Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_graph_icon@2x.png b/Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_graph_icon@2x.png new file mode 100644 index 00000000000..40064d03a42 Binary files /dev/null and b/Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_graph_icon@2x.png differ diff --git a/Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_graph_icon@2x.png.meta b/Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_graph_icon@2x.png.meta new file mode 100644 index 00000000000..d9de57b2b9e --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_graph_icon@2x.png.meta @@ -0,0 +1,117 @@ +fileFormatVersion: 2 +guid: c1e1b751487e43d43923f055990214ea +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_subgraph_icon@2x.png b/Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_subgraph_icon@2x.png new file mode 100644 index 00000000000..f6ed8352b39 Binary files /dev/null and b/Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_subgraph_icon@2x.png differ diff --git a/Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_subgraph_icon@2x.png.meta b/Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_subgraph_icon@2x.png.meta new file mode 100644 index 00000000000..704dd1e5d93 --- /dev/null +++ b/Packages/com.unity.shadergraph/Editor/Resources/Icons/sg_subgraph_icon@2x.png.meta @@ -0,0 +1,117 @@ +fileFormatVersion: 2 +guid: 890b62dea83f90749a7d048c0e5c298b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.shadergraph/Editor/ShaderGraphProjectSettings.cs b/Packages/com.unity.shadergraph/Editor/ShaderGraphProjectSettings.cs index 876c46bf427..229f0d87113 100644 --- a/Packages/com.unity.shadergraph/Editor/ShaderGraphProjectSettings.cs +++ b/Packages/com.unity.shadergraph/Editor/ShaderGraphProjectSettings.cs @@ -31,15 +31,15 @@ class ShaderGraphProjectSettingsProvider : SettingsProvider { private static int kMaxChannelThreshold = 32; private static int kMinChannelThreshold = 8; - private static string kCustomInterpolatorHelpBox = "Unity uses these options to help ShaderGraph users maintain known compatibilities with target platform(s) when using Custom Interpolators."; + private static string kCustomInterpolatorHelpBox = "Unity uses these options to help Shader Graph users maintain known compatibilities with target platform(s) when using Custom Interpolators."; private static string kCustomInterpolatorDocumentationURL = UnityEngine.Rendering.ShaderGraph.Documentation.GetPageLink("Custom-Interpolators"); private class Styles { public static readonly GUIContent shaderVariantLimitLabel = L10n.TextContent("Shader Variant Limit", ""); public static readonly GUIContent CustomInterpLabel = L10n.TextContent("Custom Interpolator Channel Settings", ""); - public static readonly GUIContent CustomInterpWarnThresholdLabel = L10n.TextContent("Warning Threshold", $"ShaderGraph displays a warning when the user creates more custom interpolators than permitted by this setting. The number of interpolators that trigger this warning must be between {kMinChannelThreshold} and the Error Threshold."); - public static readonly GUIContent CustomInterpErrorThresholdLabel = L10n.TextContent("Error Threshold", $"ShaderGraph displays an error message when the user tries to create more custom interpolators than permitted by this setting. The number of interpolators that trigger this error must be between {kMinChannelThreshold} and {kMaxChannelThreshold}."); + public static readonly GUIContent CustomInterpWarnThresholdLabel = L10n.TextContent("Warning Threshold", $"Shader Graph displays a warning when the user creates more custom interpolators than permitted by this setting. The number of interpolators that trigger this warning must be between {kMinChannelThreshold} and the Error Threshold."); + public static readonly GUIContent CustomInterpErrorThresholdLabel = L10n.TextContent("Error Threshold", $"Shader Graph displays an error message when the user tries to create more custom interpolators than permitted by this setting. The number of interpolators that trigger this error must be between {kMinChannelThreshold} and {kMaxChannelThreshold}."); public static readonly GUIContent ReadMore = L10n.TextContent("Read more"); public static readonly GUIContent HeatmapSectionLabel = L10n.TextContent("Heatmap Color Mode Settings", ""); @@ -136,7 +136,7 @@ void OnGUIHandler(string searchContext) [SettingsProvider] public static SettingsProvider CreateShaderGraphProjectSettingsProvider() { - var provider = new ShaderGraphProjectSettingsProvider("Project/ShaderGraph", SettingsScope.Project); + var provider = new ShaderGraphProjectSettingsProvider("Project/Shader Graph", SettingsScope.Project); return provider; } } diff --git a/Packages/com.unity.shadergraph/README.md b/Packages/com.unity.shadergraph/README.md index 2afc4b14d91..6964f3bc42d 100644 --- a/Packages/com.unity.shadergraph/README.md +++ b/Packages/com.unity.shadergraph/README.md @@ -10,7 +10,7 @@ Unless you intend to modify Shader Graph or want to try out the latest and unsup 2. Open the **Package Manager** window (**Window** > **Package Manager**). 3. In the **Package Manager** window, in the **Packages** menu, select **Unity Registry**. 4. Do one of the following, based on your project needs: - - To use Shader Graph and the [Universal Render Pipeline (URP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest) in your project, select **Universal RP**. + - To use Shader Graph and the [Universal Render Pipeline (URP)](https://docs.unity3d.com/Manual/urp/urp-introduction.html) in your project, select **Universal RP**. - To use Shader Graph and the [High Definition Render Pipeline (HDRP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest), select **High Definition RP**. - To use Shader Graph with Unity's [Built-In Render Pipeline](https://docs.unity3d.com/2020.3/Documentation/Manual/built-in-render-pipeline.html), select **Shader Graph**. diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Block-CustomHLSL.md b/Packages/com.unity.visualeffectgraph/Documentation~/Block-CustomHLSL.md index b16d8f88d73..efd79866d9b 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Block-CustomHLSL.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Block-CustomHLSL.md @@ -51,10 +51,6 @@ VFX Graph exposes the following macros that you can use to generate random numbe | VFXRAND2 | float2 | Generate a random 2D vector value for each particle. | | VFXRAND3 | float3 | Generate a random 3D vector value for each particle. | | VFXRAND4 | float4 | Generate a random 4D vector value for each particle. | -| VFXFIXED_RAND | float | Generate a random scalar value for each VFX Graph system. | -| VFXFIXED_RAND2 | float2 | Generate a random 2D vector value for each VFX Graph system. | -| VFXFIXED_RAND3 | float3 | Generate a random 3D vector value for each VFX Graph system. | -| VFXFIXED_RAND4 | float4 | Generate a random 4D vector value for each VFX Graph system. | To generate a random scalar value (range from 0 to 1) for each particle, use the following syntax: diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Block-Orient.md b/Packages/com.unity.visualeffectgraph/Documentation~/Block-Orient.md index 75fd55ee2d4..eeb3c2e5af1 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Block-Orient.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Block-Orient.md @@ -10,7 +10,7 @@ The **Orient** Block makes particles orient themselves to face a certain way. It Particles orient to face forward towards the camera plane. This mode works for most use cases, however the facing illusion can break sometimes at the edges of the screen. -![](Images/Block-OrientFaceCameraPlane.png) +![A row of downward-facing arrows above a camera and a camera plane. The direction of the arrows all point downwards towards the camera plane.](Images/Block-OrientFaceCameraPlane.png) @@ -18,7 +18,7 @@ Particles orient to face forward towards the camera plane. This mode works for m Particles orient to face forward towards the camera position. Similar to the **Face Camera Plane** mode, however, here particles face towards the camera itself, appearing identical even at the edge of the screen. -![](Images/Block-OrientFaceCameraPosition.png) +![A row of downward-facing arrows above a camera plane and a camera. The direction of the arrows all point to converge towards the camera position.](Images/Block-OrientFaceCameraPosition.png) @@ -26,7 +26,7 @@ Particles orient to face forward towards the camera position. Similar to the **F Particles orient to face towards a specified position. -![](Images/Block-OrientLookAtPosition.gif) +![A row of downward-facing arrows above a camera plane and a camera. A small circle moves between the arrows and camera. The direction of the arrows point towards the circle, and change direction to follow its movement.](Images/Block-OrientLookAtPosition.gif) @@ -34,7 +34,7 @@ Particles orient to face towards a specified position. Particles orient to face towards the nearest point along the direction of an infinite line. -![](Images/Block-OrientLookAtLine.gif) +![A row of downward-facing arrows above a camera plane and a camera. A line between the arrows and the camera is initially horizontal but hinges on a point to swing and become diagonal, before swinging back. As the line swings, the direction of the arrows follow the nearest point on the line it's hinged on.](Images/Block-OrientLookAtLine.gif) @@ -42,11 +42,11 @@ Particles orient to face towards the nearest point along the direction of an inf Particles orient to a custom particle space defined using two specified axes. The first axis is immutable and the Block uses the second axis to derive the third. It then recalculates the second axis to create an orthogonal particle space. -![](Images/Block-OrientAdvancedAxisBuilding.gif) +![Four different modes of axes. 1 is First Axis, represented by a single arrow. 2 is Second Axis, which adds to 1 with a second arrow originating from the same point. 3 is Derive Third Axis, which adds to 2 with a third arrow originating from the same point. 4 is Orthogonalize, which changes the second axis arrow to create an orthogonal space.](Images/Block-OrientAdvancedAxisBuilding.gif) This is an advanced mode and you can use it to create custom orientation behaviors. -![](Images/Block-OrientAdvanced.gif) +![A row of arrows above a camera plane and a camera. For XY, the direction of the arrows point left. For YZ, the direction of the arrows converge towards the center. For ZX, the direction of the arrows converge towards the center.](Images/Block-OrientAdvanced.gif) @@ -54,7 +54,7 @@ This is an advanced mode and you can use it to create custom orientation behavio Particles orient themselves on the specified ‘up’ axis and rotate on it to face the camera. This is useful for effects like grass where the up axis is generally known and particles should rotate on it to face the camera without falling flat if observed from the top. -![](Images/Block-OrientFixedAxis.png) +![A row of upward-facing arrows above a camera plane and a camera. The direction of the arrows point outwards.](Images/Block-OrientFixedAxis.png) @@ -62,7 +62,7 @@ Particles orient themselves on the specified ‘up’ axis and rotate on it to f Particles orient to face forward towards the direction they are moving in based on the **Velocity** attribute. The up axis is set to the velocity, and particles rotate on it to orient themselves to the camera as needed. -![](Images/Block-OrientAlongVelocity.gif) +![A row of arrows above a camera plane and a camera. The arrows point towards the direction they're moving in and rotate to orient themselves to the camera.](Images/Block-OrientAlongVelocity.gif) ## Block compatibility diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Block-TileWarpPositions.md b/Packages/com.unity.visualeffectgraph/Documentation~/Block-TileWarpPositions.md index cb9906f2544..5b40d6239c2 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Block-TileWarpPositions.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Block-TileWarpPositions.md @@ -8,7 +8,7 @@ If you move the AABox, this Block warps particles around as the box moves, creat This Block can be useful to create infinitely tiling effects that need to stay close to the camera or the player in an application, such as rain or snow. -![](Images/Block-TileWarpPositionsMain.gif) +![Three different states of an AABox that contains particles. When Tile/Warp is disabled, the particles are not contained to the box. When Tile/Warp is enabled, the particles are contained in the box as they warp to the other side. When moving the AABox around with the Tile/Warp volume, the particles warp as the box moves.](Images/Block-TileWarpPositionsMain.gif) ## Block compatibility diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Block-TriggerEventAlways.md b/Packages/com.unity.visualeffectgraph/Documentation~/Block-TriggerEventAlways.md index 29f035f17a6..2b3fbdec50b 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Block-TriggerEventAlways.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Block-TriggerEventAlways.md @@ -8,7 +8,7 @@ The **Trigger Event Always** Block triggers the continual creation of a specifie You can also use the Trigger Block with various conditions to create more complex spawning behavior. For example: -![](Images/Block-TriggerEventAlwaysExample.png) +![A Visual Effect Graph window which shows the Trigger Event Always Block executing under complex conditions. An Age Over Lifetime Operator returns the age of a particle relative to its lifetime, which uses a Compare Operator to compare if the value is less than 0.1. The connected Branch then outputs 5 when the Predicate is true or 0 when the Predicate is false, which connects to the Trigger Event Always Block inside the Update Particle Context.](Images/Block-TriggerEventAlwaysExample.png) ## Block compatibility diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Images/PlayControls.png b/Packages/com.unity.visualeffectgraph/Documentation~/Images/PlayControls.png deleted file mode 100644 index 96795a57b8c..00000000000 Binary files a/Packages/com.unity.visualeffectgraph/Documentation~/Images/PlayControls.png and /dev/null differ diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Images/PropertyGizmosInspector.png b/Packages/com.unity.visualeffectgraph/Documentation~/Images/PropertyGizmosInspector.png deleted file mode 100644 index 989d8468533..00000000000 Binary files a/Packages/com.unity.visualeffectgraph/Documentation~/Images/PropertyGizmosInspector.png and /dev/null differ diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Images/WhatsNew_17_1_Instanced_Explosions.mp4 b/Packages/com.unity.visualeffectgraph/Documentation~/Images/WhatsNew_17_1_Instanced_Explosions.mp4 new file mode 100644 index 00000000000..b8c43878cf3 Binary files /dev/null and b/Packages/com.unity.visualeffectgraph/Documentation~/Images/WhatsNew_17_1_Instanced_Explosions.mp4 differ diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Images/WhatsNew_17_1_Instancing_Marker.png b/Packages/com.unity.visualeffectgraph/Documentation~/Images/WhatsNew_17_1_Instancing_Marker.png new file mode 100644 index 00000000000..3c46219438b Binary files /dev/null and b/Packages/com.unity.visualeffectgraph/Documentation~/Images/WhatsNew_17_1_Instancing_Marker.png differ diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Images/WhatsNew_17_1_VFXLearning_Strips.mp4 b/Packages/com.unity.visualeffectgraph/Documentation~/Images/WhatsNew_17_1_VFXLearning_Strips.mp4 new file mode 100644 index 00000000000..4420fba9697 Binary files /dev/null and b/Packages/com.unity.visualeffectgraph/Documentation~/Images/WhatsNew_17_1_VFXLearning_Strips.mp4 differ diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-PerlinNoise.md b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-PerlinNoise.md index 9ff7bd65395..483507ad93f 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-PerlinNoise.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-PerlinNoise.md @@ -4,7 +4,7 @@ Menu Path : **Operator > Noise > Perlin Noise** The **Perlin Noise** Operator allows you to specify coordinates to sample a noise value within a specified range in one, two, or three dimensions. Perlin noise is a type of gradient noise which has a good distribution of values which makes it rarer to have similar adjacent values. -![](Images/Operator-PerlinNoiseAnimation.gif) +![Three cubes representing one, two, and three dimensional noise.](Images/Operator-PerlinNoiseAnimation.gif) You can use this Operator to introduce variety to your particle attributes. A common use case is to use each particle’s position as a coordinate to sample the noise to output a new color, velocity, or position value. @@ -19,12 +19,12 @@ You can use this Operator to introduce variety to your particle attributes. A co | **Input** | **Type** | **Description** | | -------------- | ----------------------------- | ------------------------------------------------------------ | -| **Coordinate** | Float
Vector2
Vector3 | The coordinate in the noise field to sample from.
![](Images/Operator-PerlinNoiseCoordinate.gif)
The **Type** changes to match the number of **Dimensions**. | -| **Frequency** | Float | The period in which Unity samples the noise. A higher frequency results in more frequent noise change.
![](Images/Operator-PerlinNoiseFrequency.gif) | -| **Octaves** | Int | The number of layers of noise. More octaves create a more varied look but are also more resource-intensive to calculate.
![](Images/Operator-PerlinNoiseOctaves.gif) | -| **Roughness** | Float | The scaling factor Unity applies to each octave. Unity only uses roughness when **Octaves** is set to a value higher than 1.
![](Images/Operator-PerlinNoiseRoughness.gif) | -| **Lacunarity** | Float | The rate of change of the frequency for each successive octave. A lacunarity value of 1 results in each octave having the same frequency.
![](Images/Operator-PerlinNoiseLacunarity.gif) | -| **Range** | Vector2 | The range within which Unity calculates the noise. The noise stays between the X and Y value you specify here, where X is the minimum and Y is the maximum.
![](Images/Operator-PerlinNoiseRange.gif) | +| **Coordinate** | Float
Vector2
Vector3 | The coordinate in the noise field to sample from.
![A cursor moving across the noise field, showing the different coordinates.](Images/Operator-PerlinNoiseCoordinate.gif)
The **Type** changes to match the number of **Dimensions**. | +| **Frequency** | Float | The period in which Unity samples the noise. A higher frequency results in more frequent noise change.
![As the value of the frequency increases, the noise increases.](Images/Operator-PerlinNoiseFrequency.gif) | +| **Octaves** | Int | The number of layers of noise. More octaves create a more varied look but are also more resource-intensive to calculate.
![As the value of the octaves increases, the noise is more varied.](Images/Operator-PerlinNoiseOctaves.gif) | +| **Roughness** | Float | The scaling factor Unity applies to each octave. Unity only uses roughness when **Octaves** is set to a value higher than 1.
![As the value of the roughness increases, the noise is more visibly detailed.](Images/Operator-PerlinNoiseRoughness.gif) | +| **Lacunarity** | Float | The rate of change of the frequency for each successive octave. A lacunarity value of 1 results in each octave having the same frequency.
![As the value of the lacunarity increases, the noise is more visibly detailed.](Images/Operator-PerlinNoiseLacunarity.gif) | +| **Range** | Vector2 | The range within which Unity calculates the noise. The noise stays between the X and Y value you specify here, where X is the minimum and Y is the maximum.
![As the range increases, the noise is more visible.](Images/Operator-PerlinNoiseRange.gif) | | **Output** | **Type** | **Description** | | --------------- | ----------------------------- | ------------------------------------------------------------ | diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-SampleBuffer.md b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-SampleBuffer.md index 21f3c1c3339..6a9a7a3e883 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-SampleBuffer.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-SampleBuffer.md @@ -1,10 +1,10 @@ -# Sample Buffer +# Sample Graphics Buffer -**Menu Path : Operator > Sampling > Sample Buffer** +**Menu Path : Operator > Sampling > Sample Graphics Buffer** -The Sample Buffer Operator enables you to fetch and sample a structured buffer. A structured buffer is a [GraphicsBuffer](https://docs.unity3d.com/ScriptReference/GraphicsBuffer.html) created using the [Structured](https://docs.unity3d.com/ScriptReference/GraphicsBuffer.Target.Structured.html) target. +The Sample Graphics Buffer Operator enables you to fetch and sample a structured buffer. A structured buffer is a [GraphicsBuffer](https://docs.unity3d.com/ScriptReference/GraphicsBuffer.html) created using the [Structured](https://docs.unity3d.com/ScriptReference/GraphicsBuffer.Target.Structured.html) target. ## Operator settings @@ -17,7 +17,7 @@ The Sample Buffer Operator enables you to fetch and sample a structured buffer. | **Input** | **Type** | **Description** | | ---------- | --------------------------------------- | ------------------------------------------------------------ | | **Input** | [Configurable](#operator-configuration) | The structure type. | -| **Buffer** | GraphicsBuffer | The structured buffer to fetch. You can only connect an exposed property to this input port. | +| **Buffer** | Graphics Buffer [property](Properties.md)| The structured buffer to fetch. You can only connect an exposed property to this input port. | | **Index** | uint | The index of the element to fetch. | | **Output** | **Type** | **Description** | @@ -26,32 +26,34 @@ The Sample Buffer Operator enables you to fetch and sample a structured buffer. ## Operator configuration -To view the Operator's configuration, click the **cog** icon in the Operator's header. +To set the struct type, select the cog icon. The available types are: -### Available types -This Operator supports sampling structured buffers that use blittable types. The list of built-in blittable types is: - - float - - int - - uint - - Vector2 - - Vector3 - - Vector4 - - Matrix4x4 +- float +- int +- uint +- Vector2 +- Vector3 +- Vector4 +- Matrix4x4 -You can also declare custom types. To do this, add the `[VFXType]` attribute to a struct, and use the `VFXTypeAttribute.Usage.GraphicsBuffer` type. For example: +### Add a custom type + +To add a custom type to the list, add the `[VFXType(VFXTypeAttribute.Usage.GraphicsBuffer)]` attribute to a struct. For example, the following script adds a **MyCustomData** type: ```c# using UnityEngine; using UnityEngine.VFX; [VFXType(VFXTypeAttribute.Usage.GraphicsBuffer)] -struct CustomData +struct MyCustomData { - public Vector3 color; - public Vector3 position; + public Vector3 myColor; + public Vector3 myPosition; } ``` +After you set a custom type, open the **s** dropdown to display the properties of the struct and connect them to other Operators and [Contexts](Contexts.md). + ## Limitations The Operator has the following limitations: diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-SquareWave.md b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-SquareWave.md index e1ee2009d25..7246570961f 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-SquareWave.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-SquareWave.md @@ -4,7 +4,7 @@ Menu Path : **Operator > Math > Wave > Square Wave** The Square Wave Operator allows you to generate a value which alternates between a minimum and a maximum value at steady intervals based on a provided input and a set frequency. -![](Images/Operator-SquareWaveAnimation.gif) +![A lower line representing the minimum and a higher line representing the maximum, with a square wave at regular intervals. A blue dot travels across the minimum line of the square wave for a few seconds, then moves to the maximum lines for the same amount of time, before repeating the cycle.](Images/Operator-SquareWaveAnimation.gif) If **Frequency** is set to 1, the blue dot remains at **Min** with an **Input** value from 0 to almost 0.5. Then, with an **Input** value from 0.5 to almost 1, the dot remains at **Max**. After that, the wave repeats. diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-ValueNoise.md b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-ValueNoise.md index b5db7b102c7..eb44c562d0a 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-ValueNoise.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-ValueNoise.md @@ -4,7 +4,7 @@ Menu Path : **Operator > Noise > Value Noise** The **Value Noise** Operator allows you to specify coordinates to sample a noise value within a specified range in one, two, or three dimensions. Value noise uses simple interpolated values, which means that adjacent values are likely to be similar. -![](Images/Operator-ValueNoiseAnimation.gif) +![Three cubes representing one, two, and three dimensional noise.](Images/Operator-ValueNoiseAnimation.gif) You can use this Operator to introduce variety to your particle attributes. A common use case is to sample using each particle’s position as a coordinate to output a new color, velocity, or position value. @@ -19,12 +19,12 @@ You can use this Operator to introduce variety to your particle attributes. A co | **Input** | **Type** | **Description** | | -------------- | ----------------------------- | ------------------------------------------------------------ | -| **Coordinate** | Float
Vector2
Vector3 | The coordinate in the noise field to sample from.
![](Images/Operator-ValueNoiseCoordinate.gif)
The **Type** changes to match the number of **Dimensions**. | -| **Frequency** | Float | The period in which Unity samples the noise. A higher frequency results in more frequent noise change.
![](Images/Operator-ValueNoiseFrequency.gif) | -| **Octaves** | Int | The number of layers of noise. More octaves create a more varied look but are also more resource-intensive to calculate.
![](Images/Operator-ValueNoiseOctaves.gif) | -| **Roughness** | Float | The scaling factor Unity applies to each octave. Unity only uses roughness when **Octaves** is set to a value higher than 1.
![](Images/Operator-ValueNoiseRoughness.gif) | -| **Lacunarity** | Float | The rate of change of the frequency for each successive octave. A lacunarity value of 1 results in each octave having the same frequency.
![](Images/Operator-ValueNoiseLacunarity.gif) | -| **Range** | Vector2 | The range within which Unity calculates the noise. The noise stays between the X and Y value you specify here, where X is the minimum and Y is the maximum.
![](Images/Operator-ValueNoiseRange.gif) | +| **Coordinate** | Float
Vector2
Vector3 | The coordinate in the noise field to sample from.
![A cursor moving across the noise field, showing the different coordinates.](Images/Operator-ValueNoiseCoordinate.gif)
The **Type** changes to match the number of **Dimensions**. | +| **Frequency** | Float | The period in which Unity samples the noise. A higher frequency results in more frequent noise change.
![As the value of the frequency increases, the noise increases.](Images/Operator-ValueNoiseFrequency.gif) | +| **Octaves** | Int | The number of layers of noise. More octaves create a more varied look but are also more resource-intensive to calculate.
![As the value of the octaves increases, the noise is more varied.](Images/Operator-ValueNoiseOctaves.gif) | +| **Roughness** | Float | The scaling factor Unity applies to each octave. Unity only uses roughness when **Octaves** is set to a value higher than 1.
![As the value of the roughness increases, the noise is more visibly detailed.](Images/Operator-ValueNoiseRoughness.gif) | +| **Lacunarity** | Float | The rate of change of the frequency for each successive octave. A lacunarity value of 1 results in each octave having the same frequency.
![As the value of the lacunarity increases, the noise is more visibly detailed.](Images/Operator-ValueNoiseLacunarity.gif) | +| **Range** | Vector2 | The range within which Unity calculates the noise. The noise stays between the X and Y value you specify here, where X is the minimum and Y is the maximum.
![As the range increases, the noise is more visible.](Images/Operator-ValueNoiseRange.gif) | | **Output** | **Type** | **Description** | | --------------- | ----------------------------- | ------------------------------------------------------------ | diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/System-Requirements.md b/Packages/com.unity.visualeffectgraph/Documentation~/System-Requirements.md index 32b809aae1d..edf3f0ebcd2 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/System-Requirements.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/System-Requirements.md @@ -39,7 +39,7 @@ The Visual Effect Graph varies in compatibility between the High Definition Rend The Visual Effect Graph supports the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html) (HDRP) from Unity 2018.3 and is verified for HDRP from Unity 2019.3. The Visual Effect Graph supports every platform that HDRP supports. For information on which platforms this includes, see HDRP's [system requirements](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html?subfolder=/manual/System-Requirements.html). -In the [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html) (URP) versions 2019.3. to 2021.1, the Visual Effect Graph supports a subset of platforms that URP supports, and only supports unlit particles. +In the [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html) (URP) versions 2019.3. to 2021.1, the Visual Effect Graph supports a subset of platforms that URP supports, and only supports unlit particles. **Note**: When you download the HDRP package from the Package Manager, Unity automatically installs the Visual Effect Graph package. diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/TableOfContents.md b/Packages/com.unity.visualeffectgraph/Documentation~/TableOfContents.md index e8c394b5b7e..065469d6cfb 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/TableOfContents.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/TableOfContents.md @@ -9,6 +9,7 @@ * [15 / Unity 2023.1](whats-new-15.md) * [16 / Unity 2023.2](whats-new-16.md) * [17 / Unity 2023.3](whats-new-17.md) + * [17.1 / Unity 6.1](whats-new-17-1.md) * [Getting Started](GettingStarted.md) * [Visual Effect Graph Assets](VisualEffectGraphAsset.md) * [Visual Effect Graph Window](VisualEffectGraphWindow.md) diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/VisualEffectComponent.md b/Packages/com.unity.visualeffectgraph/Documentation~/VisualEffectComponent.md index 90f848e8ac4..06eb1be13ba 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/VisualEffectComponent.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/VisualEffectComponent.md @@ -69,8 +69,6 @@ To access property values, edit them using the Inspector, use the [C# API](https The Play Controls window displays UI Elements that give you control over the currently selected instance of a Visual Effect. It is displayed in the bottom-right corner of the Scene View, when a Visual Effect Game Object is selected. -![](Images/PlayControls.png) - The play Controls Window displays the following controls: * Stop (Button) : Resets the effect and set its state to paused. @@ -88,4 +86,3 @@ The play Controls Window displays the following controls: You can edit some properties using Gizmos in the scene. In order to enable gizmo editing, click the **Show Property Gizmos** button in the Inspector. Upon enabling property Gizmos, every property that can be edited using Gizmos will display **Edit Gizmo** buttons next to every property that can be edited using gizmos. -![Property Gizmos Inspector](Images/PropertyGizmosInspector.png) diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/VisualEffectGraphWindow.md b/Packages/com.unity.visualeffectgraph/Documentation~/VisualEffectGraphWindow.md index 865a3384597..a408d611bac 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/VisualEffectGraphWindow.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/VisualEffectGraphWindow.md @@ -32,14 +32,14 @@ The Visual Effect Graph window Toolbar contains functionality to operate on a Vi | Item | Description | | --------------------- | ------------------------------------------------------------ | -| **Save**
![](Images/save.png) | **Action** : Use this button to save the Visual Effect Graph that is currently open and its subgraphs.
**Dropdown**:

• **Save as…**: Saves the Visual Effect Graph under a specified name and/or location.
• **Show in Inspector**: Focuses the Visual Effect Graph's Asset in the Inspector.| -| **Compile**
![](Images/compile.png) | **Action** : Recompiles the open Visual Effect Graph.
**Dropdown**:

• **Auto Compile**: Automatically compiles the Visual Effect Graph.
• **Auto Reinit**: Automatically reinitializes an attached component when a value changes in the **Spawner** or **Init** contexts.
• **Prewarm Time**: Specifies the duration of the prewarm used with **Auto Reinit**. If the VFX already has a runtime prewarm, it ignores this setting.
•**Runtime Mode**: Forces optimized compilation, even when the editor is open.
• **Shader Debug Symbols**: Forces shader debug symbols generation when Unity compiles the authored VFX asset.
• **Shader Validation**: Forces shader compilation when the effect recompiles, even if no visual effect is visible. This displays the Shader errors in the Scene.| -| **Auto Attach**
![](Images/auto-attach.png) | **Toggle**: Toggles the visibility of the Auto Attachment panel. The **Auto Attachment** panel allows you to attach the open Visual Effect Graph to a GameObject by selecting it in the Hierarchy. Once you have attached the visual effect to a GameObject, it enables the Visual Effect controls in the VFX Control panel and allows you to tweak gizmos in the Scene View.| +| **Save**
![Save section](Images/save.png) | **Action** : Use this button to save the Visual Effect Graph that is currently open and its subgraphs.
**Dropdown**:

• **Save as…**: Saves the Visual Effect Graph under a specified name and/or location.
• **Show in Inspector**: Focuses the Visual Effect Graph's Asset in the Inspector.| +| **Compile**
![Compile section](Images/compile.png) | **Action** : Recompiles the open Visual Effect Graph.
**Dropdown**:

• **Auto Compile**: Automatically compiles the Visual Effect Graph.
• **Auto Reinit**: Automatically reinitializes an attached component when a value changes in the **Spawner** or **Init** contexts.
• **Prewarm Time**: Specifies the duration of the prewarm used with **Auto Reinit**. If the VFX already has a runtime prewarm, it ignores this setting.
•**Runtime Mode**: Forces optimized compilation, even when the editor is open.
• **Shader Debug Symbols**: Forces shader debug symbols generation when Unity compiles the authored VFX asset.
• **Shader Validation**: Forces shader compilation when the effect recompiles, even if no visual effect is visible. This displays the Shader errors in the Scene.| +| **Auto Attach**
![Auto Attach section](Images/auto-attach.png) | **Toggle**: Toggles the visibility of the Auto Attachment panel. The **Auto Attachment** panel allows you to attach the open Visual Effect Graph to a GameObject by selecting it in the Hierarchy. Once you have attached the visual effect to a GameObject, it enables the Visual Effect controls in the VFX Control panel and allows you to tweak gizmos in the Scene View.| | **Lock** | **Toggle**: Toggles lock/unlock for auto attachments. If you set the toggle to unlocked - you can attach the open Visual Effect Graph to a GameObject by selecting items in the Hierarchy. If you set the toggle to locked - The GameObject that is currently attached becomes locked and auto attachments are disabled. The Visual Effect Graph then can not be attached by selecting items in the Hierarchy. You can manually keep the lock and change the attachment in the object picker of the Auto Attach panel.| -| **Blackboard**
![](Images/blackboard.png) | **Toggle**: Toggles the visibility of the **Blackboard Panel**.| -| **VFX Control**
![](Images/vfx-control.png) | **Toggle**: Toggles the visibility of the VFX Control.| -| **Help**
![](Images/help.png) | **Toggle**: Opens the Visual Effect Graph [manual](https://docs.unity3d.com/Packages/com.unity.visualeffectgraph@latest/).

**Dropdown**:

**VFX Graph Additions**: Installs pre-made visual effects and utility operators made with Visual Effect Graph. These include Bonfire, Lightning, Smoke and Sparks effect examples. There are also various operators and Subgraph Blocks:

• **Get Strip Progress**: A subgraph that calculates the progress of a particle in the strip in the range 0 to 1. You can use this to sample curves and gradients to modify the strip based on its progress.

• **Encompass (Point)**: A subgraph that grows the bounds of an AABox to encompass a point.

• **Degrees to Radians and Radians to Degrees**: Subgraphs that help you to convert between radians and degrees within your graph.

**Output Event Helpers**: This version of the Visual Effect Graph introduces new helper scripts to the OutputEvent Helpers sample to help you to set up OutputEvents:

• **Cinemachine Camera Shake**: An Output Event Handler script that triggers a Camera shake through a [Cinemachine Impulse Source](https://docs.unity3d.com/Packages/com.unity.cinemachine@latest/index.html?subfolder=/manual/CinemachineImpulseSourceOverview.html), on a given output event.

• **Play audio**: An Output Event Handler script that plays a single AudioSource on a given output event.

• **Spawn a Prefab**: An Output Event Handler script that spawns Prefabs (managed from a pool) on a given output event. It uses position, angle, scale, and lifetime to position the Prefab and disable it after a delay. To synchronize other values, you can use other scripts inside the Prefab:

• **Change Prefab Light**: An example that demonstrates how to synchronize a light with your effect.

• **Change Prefab RigidBody Velocity**: An example that demonstrates how to synchronize changing the velocity of a RigidBody with your effect.

• **RigidBody**: An Output Event Handler script that applies a force or velocity change to a RigidBody on a given output event.

• **Unity Event**: An Output Event Handler that raises a UnityEvent on a given output event.

• **[VFX Graph Home](https://unity.com/visual-effect-graph)**: Opens the Visual Effect Graph home page.

• **[Forum](https://forum.unity.com/forums/visual-effect-graph.428/)**: Opens a Visual Effect Graph sub-forum.

• **[Github] [Spaceship Demo](https://github.com/Unity-Technologies/SpaceshipDemo)**: Opens a repository of AAA Playable First person demo showcasing effects made with Visual Effect Graph and rendered with the High Definition Render Pipeline.

• **[Github] [VFX Graph Samples](https://github.com/Unity-Technologies/VisualEffectGraph-Samples)**: Opens a repository that contains sample scenes and visual effects made with Visual Effect Graph.| -| **Version Control**
![](Images/version-control.png) | **Action**: When you enable [Version Control](https://docs.unity3d.com/Manual/Versioncontrolintegration.html), these buttons become available. Click the main button to check out the changes you made in the asset file.

**Dropdown**:

• **Get Latest**: Updates the asset file with latest changes from the repository.
• **Submit**: Submits the current state of the asset to the Version Control System.
• **Revert**: Discards the changes you made to the asset.| +| **Blackboard**
![Blackboard section](Images/blackboard.png) | **Toggle**: Toggles the visibility of the **Blackboard Panel**.| +| **VFX Control**
![VFX Control section](Images/vfx-control.png) | **Toggle**: Toggles the visibility of the VFX Control.| +| **Help**
![Help section](Images/help.png) | **Toggle**: Opens the Visual Effect Graph [manual](https://docs.unity3d.com/Packages/com.unity.visualeffectgraph@latest/).

**Dropdown**:

**VFX Graph Additions**: Installs pre-made visual effects and utility operators made with Visual Effect Graph. These include Bonfire, Lightning, Smoke and Sparks effect examples. There are also various operators and Subgraph Blocks:

• **Get Strip Progress**: A subgraph that calculates the progress of a particle in the strip in the range 0 to 1. You can use this to sample curves and gradients to modify the strip based on its progress.

• **Encompass (Point)**: A subgraph that grows the bounds of an AABox to encompass a point.

• **Degrees to Radians and Radians to Degrees**: Subgraphs that help you to convert between radians and degrees within your graph.

**Output Event Helpers**: This version of the Visual Effect Graph introduces new helper scripts to the OutputEvent Helpers sample to help you to set up OutputEvents:

• **Cinemachine Camera Shake**: An Output Event Handler script that triggers a Camera shake through a [Cinemachine Impulse Source](https://docs.unity3d.com/Packages/com.unity.cinemachine@latest/index.html?subfolder=/manual/CinemachineImpulseSourceOverview.html), on a given output event.

• **Play audio**: An Output Event Handler script that plays a single AudioSource on a given output event.

• **Spawn a Prefab**: An Output Event Handler script that spawns Prefabs (managed from a pool) on a given output event. It uses position, angle, scale, and lifetime to position the Prefab and disable it after a delay. To synchronize other values, you can use other scripts inside the Prefab:

• **Change Prefab Light**: An example that demonstrates how to synchronize a light with your effect.

• **Change Prefab RigidBody Velocity**: An example that demonstrates how to synchronize changing the velocity of a RigidBody with your effect.

• **RigidBody**: An Output Event Handler script that applies a force or velocity change to a RigidBody on a given output event.

• **Unity Event**: An Output Event Handler that raises a UnityEvent on a given output event.

• **[VFX Graph Home](https://unity.com/visual-effect-graph)**: Opens the Visual Effect Graph home page.

• **[Forum](https://forum.unity.com/forums/visual-effect-graph.428/)**: Opens a Visual Effect Graph sub-forum.

• **[Github] [Spaceship Demo](https://github.com/Unity-Technologies/SpaceshipDemo)**: Opens a repository of AAA Playable First person demo showcasing effects made with Visual Effect Graph and rendered with the High Definition Render Pipeline.

• **[Github] [VFX Graph Samples](https://github.com/Unity-Technologies/VisualEffectGraph-Samples)**: Opens a repository that contains sample scenes and visual effects made with Visual Effect Graph.| +| **Version Control**
![Version Control section](Images/version-control.png) | **Action**: When you enable [Version Control](https://docs.unity3d.com/Manual/Versioncontrolintegration.html), these buttons become available. Click the main button to check out the changes you made in the asset file.

**Dropdown**:

• **Get Latest**: Updates the asset file with latest changes from the repository.
• **Submit**: Submits the current state of the asset to the Version Control System.
• **Revert**: Discards the changes you made to the asset.| ### Node Workspace diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/performance-debug-panel.md b/Packages/com.unity.visualeffectgraph/Documentation~/performance-debug-panel.md index f9ec1ceb02a..8e39ea73411 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/performance-debug-panel.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/performance-debug-panel.md @@ -20,7 +20,7 @@ The Graph Debug Information panel provides information relative to the entire gr | **Texture Usage** | For each system, lists the textures used along with their dimension and memory size. | | **Heatmap parameter** |
  • GPU Time Threshold (ms): This controls the value, in milliseconds, above which the execution times in the panels will turn red. Adjust this value to easily identify expensive parts for your graph.
  • | -Shortcuts to the **Rendering Debugger** [in URP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html?subfolder=/manual/features/rendering-debugger.html) or [in HDRP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html?subfolder=/manual/rendering-debugger-window-reference.html) and to the [Unity Profiler](https://docs.unity3d.com/Manual/Profiler.html) are available through the menu on the top-right of the Graph Debug Information panel. +Shortcuts to the **Rendering Debugger** [in URP](https://docs.unity3d.com/Manual/urp/features/rendering-debugger.html) or [in HDRP](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html?subfolder=/manual/rendering-debugger-window-reference.html) and to the [Unity Profiler](https://docs.unity3d.com/Manual/Profiler.html) are available through the menu on the top-right of the Graph Debug Information panel. ## Particle System Info The Particle System Info panel is attached to the Initialize Context of each system. This panel provides information relative a specific system. diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/sample-learningTemplates.md b/Packages/com.unity.visualeffectgraph/Documentation~/sample-learningTemplates.md index cf47c281262..b4627b47629 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/sample-learningTemplates.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/sample-learningTemplates.md @@ -13,7 +13,7 @@ This sample content is compatible with both URP and HDRP projects, for VFX Graph To install this sample, first [install the Visual Effect Graph](https://docs.unity3d.com/Packages/com.unity.visualeffectgraph@17.0/manual/GettingStarted.html#installing-visual-effect-graph), then: - 1. Go to **Window > Package Manager.** + 1. Go to **Window** > **Package Management** > **Package Manager**. 1. From the [Package list view](https://docs.unity3d.com/2023.3/Documentation/Manual/upm-ui.html), select **Visual Effect Graph**. 1. If it is not there: diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/sdf-bake-tool-window.md b/Packages/com.unity.visualeffectgraph/Documentation~/sdf-bake-tool-window.md index c32b41b47ac..8ef7e669806 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/sdf-bake-tool-window.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/sdf-bake-tool-window.md @@ -8,13 +8,12 @@ To open the SDF Bake Tool window, select **Window** > **Visual Effects** > **Uti In the Unity Editor, in the [Visual Effect Graph window](VisualEffectGraphWindow.md), blocks and operators, such as [Collide With Signed Distance Field](Block-CollideWithSignedDistanceField.md), take an SDF as an input. -![](Images/sdf-update-particle-context.png) - -*A screenshot of the Update Particle context.* +![The Update Particle context.](Images/sdf-update-particle-context.png) +The **Update Particle** context. To create an SDF asset to use in the Unity Editor, you can use the SDF Bake Tool window: -1. Open the SDF Bake Tool window (menu: **Window** > **Visual Effects** > **Utilities** > **SDF Bake Tool**)
    ![](Images/sdf-bake-tool-window.png)
    *The SDF Bake Tool window previewing a Mesh asset and its SDF representation.* +1. Open the SDF Bake Tool window (menu: **Window** > **Visual Effects** > **Utilities** > **SDF Bake Tool**)
    ![The SDF Bake Tool window previewing a Mesh asset and its SDF representation.](Images/sdf-bake-tool-window.png)
    The SDF Bake Tool window previewing a Mesh asset and its SDF representation. 2. Choose an asset to generate an SDF representation for. If you want to generate an SDF to represent a single Mesh asset, set **Model Source** to **Mesh**. If you want to generate an SDF that represents multiple Meshes, set **Model Source** to **Prefab**. This mode generates an SDF that represents the combination of every Mesh in a Prefab's hierarchy. 3. By default, the SDF Bake Tool sets the bounds of the [baking box](sdf-bake-tool.md#baking-box) to be equal to the bounding box of the geometry. To scale the baking box, use **Box Size**. To move the baking box, use **Box Center**. 4. Choose a **Maximal Resolution** for the resulting SDF texture. The **Maximal Resolution** corresponds to the resolution along the longest side of the box. @@ -38,9 +37,9 @@ The SDF Bake Tool window includes default properties, which should suit most use 1. To the right of the window's header, select the **More** menu (⋮). 2. Enable **Advanced Properties**. -![](Images/sdf-bake-tool-additional-properties.png) +![The SDF Bake Tool window and the context menu that includes the advanced properties toggle.](Images/sdf-bake-tool-additional-properties.png) -*The SDF Bake Tool window and the context menu that includes the additional properties toggle.* +The **SDF Bake Tool** window and the context menu that includes the **Advanced Properties** toggle. | **Property** | **Description** | | ----------------------- | ------------------------------------------------------------ | diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/whats-new-14.md b/Packages/com.unity.visualeffectgraph/Documentation~/whats-new-14.md index 20bd78b5701..b1595d7a797 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/whats-new-14.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/whats-new-14.md @@ -8,19 +8,19 @@ The following is a list of features Unity added to version 14 of the Visual Effe ### Six way smoke -![](Images/VFX-WhatsNew14-2-still.png) +![Different smoke effects.](Images/VFX-WhatsNew14-2-still.png) VFX Graph version 14 includes a new way to light smoke effects. You can now use custom lightmaps exported from third-party software to light your smoke texture. VFX Graph bakes six light directions from these lightmaps and uses them to light the smoke from every direction. ### Boolean ports -![](Images/VFX-WhatsNew14-6.png) +![Boolean ports with Blocks in the VFX Graph window.](Images/VFX-WhatsNew14-6.png) Version 14 includes Boolean ports that you can use to activate or deactivate Blocks depending on logic operations. This feature also includes some implicit casts between numeral types and Booleans. ### 2D Shader Graph support -![](Images/VFX-WhatsNew14-3.png) +![A sprite running across a temple.](Images/VFX-WhatsNew14-3.png) In this version, Visual Effect Graph supports Shader Graph’s 2D sub-targets that you can use to render your particles as sprites. To find the new sub-targets, go to **Create** > **Shader Graph** > **URP**. This feature is only available in the Universal Render Pipeline. @@ -30,13 +30,13 @@ The following is a list of improvements Unity made to the Visual Effect Graph in ### Timeline integration -![](Images/VFX-WhatsNew14-4.gif) +![Unity's Timeline UI.](Images/VFX-WhatsNew14-4.gif) VFX Graph 14 improves the workflow of visual effects in Timeline. You can use the new VFX Animation clip to scrub through and control VFX Graph [Events](Events.md). You can also control how the effect reinitializes and pre-warm the effect. For more information, see [Timeline](Timeline.md). ### Skinned mesh sampling -![](Images/VFX-WhatsNew14-5.gif) +![Sample Skinned Mesh Operator in the VFX Graph window and its output of a person with colourful arrows.](Images/VFX-WhatsNew14-5.gif) In VFX Graph 14 improves aspects of the Skinned Mesh Renderer Sampling based on your feedback in the following ways: diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/whats-new-15.md b/Packages/com.unity.visualeffectgraph/Documentation~/whats-new-15.md index 4b4b0019758..2fbfb6ce817 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/whats-new-15.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/whats-new-15.md @@ -20,7 +20,7 @@ To use ray tracing in an HDRP scene, refer to [Getting started with ray tracing] ### Volumetric Fog Output -![](Images/VolumetricFogParticles.gif) +![A scene of a woman statue covered in fog.](Images/VolumetricFogParticles.gif) VFX Graph verision 15.0 adds the [Output Particle HDRP Volumetric Fog](Context-OutputParticleHDRPVolumetricFog.md ) output node which samples [Local Volumetric Fog](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/Local-Volumetric-Fog.html) in the High Definition Render Pipeline (HDRP). diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/whats-new-17-1.md b/Packages/com.unity.visualeffectgraph/Documentation~/whats-new-17-1.md new file mode 100644 index 00000000000..389f171f52f --- /dev/null +++ b/Packages/com.unity.visualeffectgraph/Documentation~/whats-new-17-1.md @@ -0,0 +1,31 @@ +# What's new in version 17.1 / Unity 6.1 + +Visual Effect Graph 17.1 introduces new features and performance improvements, such as instancing support for GPU events and read/write texture support in custom HLSL. + +For a full list of changes and updates in this version, refer to the [Visual Effect Graph changelog](../changelog/CHANGELOG.html). + +## Instancing support for GPU events + +[GPU events](Events#gpu-events) now support instancing, so VFX using GPU events no longer disables instancing by force. This simulates and renders many instances of VFX with GPU events more efficiently as batches. For more information, refer to [instancing](Instancing). + + + +![Marker comparison of VFX instances with VFX instancing enabled and disabled. All the median values for markers are significantly lower with VFX instancing enabled.](Images/WhatsNew_17_1_Instancing_Marker.png) + +## Runtime and compilation optimizations + +VFX Graph now has the following performance optimizations on both the Unity Editor and runtime: + +* Optimized particle data layout for reduced bandwidth usage and smaller memory footprint. +* Improved parallelization in the VFX runtime for faster CPU execution and less computation on the main thread. +* Reduced garbage creation during shader source generation, resulting in faster import and authoring times. + +## Read/write texture support in custom HLSL + +The custom HLSL block and operator now support read/write graphics buffers or textures as input parameters. This allows VFX to write into custom buffers without relying on global bindings. For more information, refer to [Custom HLSL Nodes (block and operator)](CustomHLSL-Common). + +## New examples in Learning Templates + +The Learning Templates sample now includes new examples of the different ways to create particle trails. For more information, refer to [Learning Templates Sample Content](sample-learningTemplates). + + \ No newline at end of file diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/whats-new.md b/Packages/com.unity.visualeffectgraph/Documentation~/whats-new.md index 1a57ea4d3eb..b5602ba2bf4 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/whats-new.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/whats-new.md @@ -11,5 +11,7 @@ The list of pages is as follows: - [14 / Unity 2022.2](whats-new-14.md) - [15 / Unity 2023.1](whats-new-15.md) - [16 / Unity 2023.2](whats-new-16.md) -- [17 / Unity 2023.3](whats-new-17.md) +- [17 / Unity 6](whats-new-17.md) +- [17.1 / Unity 6.1](whats-new-17-1.md) + diff --git a/Packages/com.unity.visualeffectgraph/Editor/Compiler/VFXGraphCompiledData.cs b/Packages/com.unity.visualeffectgraph/Editor/Compiler/VFXGraphCompiledData.cs index bc98eb3dbd1..c2fca93d425 100644 --- a/Packages/com.unity.visualeffectgraph/Editor/Compiler/VFXGraphCompiledData.cs +++ b/Packages/com.unity.visualeffectgraph/Editor/Compiler/VFXGraphCompiledData.cs @@ -914,7 +914,9 @@ private static VFXShaderSourceDesc[] SaveShaderFiles(VisualEffectResource resour var systemName = systemNames.GetUniqueSystemName(generated.context.GetData()); var contextLetter = generated.context.letter; - var contextName = string.IsNullOrEmpty(generated.context.label) ? generated.context.name.Replace('\n', ' ') : generated.context.label; + var contextName = string.IsNullOrEmpty(generated.context.label) ? generated.context.name: generated.context.label; + contextName = contextName.Replace('\n', ' '); + contextName = contextName.Replace('|', ' '); var shaderName = string.Empty; var fileName = string.Empty; diff --git a/Packages/com.unity.visualeffectgraph/Editor/Expressions/VFXExpressionContext.cs b/Packages/com.unity.visualeffectgraph/Editor/Expressions/VFXExpressionContext.cs index 6b6e6eb16aa..bef95fafc5c 100644 --- a/Packages/com.unity.visualeffectgraph/Editor/Expressions/VFXExpressionContext.cs +++ b/Packages/com.unity.visualeffectgraph/Editor/Expressions/VFXExpressionContext.cs @@ -209,14 +209,14 @@ public void Compile() using (s_CompileExpressionContext.Auto()) { - bool needToPatch = HasAny(VFXExpressionContextOption.GPUDataTransformation | VFXExpressionContextOption.PatchReadToEventAttribute); - var gpuTransformation = needToPatch && Has(VFXExpressionContextOption.GPUDataTransformation); - var spawnEventPath = needToPatch && Has(VFXExpressionContextOption.PatchReadToEventAttribute); - foreach (var exp in m_EndExpressions) - { Compile(exp.Key); - if (needToPatch) + + if (HasAny(VFXExpressionContextOption.GPUDataTransformation | VFXExpressionContextOption.PatchReadToEventAttribute)) + { + var gpuTransformation = Has(VFXExpressionContextOption.GPUDataTransformation); + var spawnEventPath = Has(VFXExpressionContextOption.PatchReadToEventAttribute); + foreach (var exp in m_EndExpressions) m_ReducedCache[exp.Key] = PatchVFXExpression(GetReduced(exp.Key), null /* no source in end expression */, gpuTransformation, spawnEventPath, m_GlobalEventAttribute); } } diff --git a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboardFieldBase.cs b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboardFieldBase.cs index dc3a4c6a55b..c71c0eb9daf 100644 --- a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboardFieldBase.cs +++ b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboardFieldBase.cs @@ -39,6 +39,11 @@ public override void OnSelected() m_View.blackboard.UpdateSelection(); } + public override void OnUnselected() + { + m_View.blackboard.UpdateSelection(); + } + protected virtual void OnMouseDown(MouseDownEvent evt) { if (evt.clickCount == 2 && evt.button == (int)MouseButton.LeftMouse) diff --git a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Elements/VFXBlockUI.cs b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Elements/VFXBlockUI.cs index 0915b332aeb..827bbc47ce5 100644 --- a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Elements/VFXBlockUI.cs +++ b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Elements/VFXBlockUI.cs @@ -90,7 +90,7 @@ private void OnMouseHover(EventBase evt) private void UpdateHover(VFXView view, bool isHovered) { var blackboard = view.blackboard; - if (blackboard == null) + if (blackboard == null || controller.model == null) return; var attributes = controller.model is IVFXAttributeUsage attributeUsage diff --git a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/Properties/PropertyRM.cs b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/Properties/PropertyRM.cs index aa9476d9519..5564ff69ccb 100644 --- a/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/Properties/PropertyRM.cs +++ b/Packages/com.unity.visualeffectgraph/Editor/GraphView/Views/Properties/PropertyRM.cs @@ -153,7 +153,7 @@ public virtual bool IsCompatible(IPropertyRMProvider provider) public float GetPreferredLabelWidth() { - if (hasLabel && this.Q
    PropertyURP LitURP UnlitBuilt-In Render Pipeline
    Workflow ModeSee the URP documentation for the Lit URP Shader.Not applicable.Not applicable.
    Workflow ModeSee the URP documentation for the Lit URP Shader.Not applicable.Not applicable.
    Receive Shadows
    Cast ShadowsThis property is only exposed if Allow Material Override is enabled for this Shader Graph. Enable this property to make it possible for a GameObject using this shader to cast shadows onto itself and other GameObjects. This corresponds to the SubShader Tag ForceNoShadowCasting.Not applicable.
    Surface TypeSee the URP documentation for the Lit and Unlit Shaders.In the Built-In Render Pipeline, this feature has the same behavior as in URP. Consult the URP documentation.
    Surface TypeSee the URP documentation for the Lit and Unlit Shaders.In the Built-In Render Pipeline, this feature has the same behavior as in URP. Consult the URP documentation.
    Render FaceIn the Built-In Render Pipeline, this feature has the same behavior as in URP. Consult the URP documentation.