diff --git a/Packages/com.unity.render-pipelines.core/Documentation~/custom-material-inspector.md b/Packages/com.unity.render-pipelines.core/Documentation~/custom-material-inspector.md index 64d6a5bb3d6..69dc9bb9147 100644 --- a/Packages/com.unity.render-pipelines.core/Documentation~/custom-material-inspector.md +++ b/Packages/com.unity.render-pipelines.core/Documentation~/custom-material-inspector.md @@ -6,7 +6,7 @@ Custom Material Inspectors enable you to define how Unity displays properties in The implementation for custom Material Inspectors differs between URP and HDRP. For example, for compatibility purposes, every custom Material Inspector in HDRP must inherit from `HDShaderGUI` which does not exist in URP. For information on how to create custom Material Inspectors for the respective render pipelines, see: -- **HDRP**: [HDRP custom Material Inspectors](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/hdrp-custom-material-inspector.html). +- **HDRP**: [HDRP custom Material Inspectors](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/custom-material-inspectors.html). - **URP**: [Unity Custom Shader GUI](https://docs.unity3d.com/Manual/SL-CustomShaderGUI.html). ## Assigning a custom Material Inspector diff --git a/Packages/com.unity.render-pipelines.core/Documentation~/render-graph-writing-a-render-pipeline.md b/Packages/com.unity.render-pipelines.core/Documentation~/render-graph-writing-a-render-pipeline.md index 32e71759b9b..4d3ede8ac0b 100644 --- a/Packages/com.unity.render-pipelines.core/Documentation~/render-graph-writing-a-render-pipeline.md +++ b/Packages/com.unity.render-pipelines.core/Documentation~/render-graph-writing-a-render-pipeline.md @@ -15,7 +15,7 @@ public class MyRenderPipeline : RenderPipeline void InitializeRenderGraph() { - m_RenderGraph = new RenderGraph(“MyRenderGraph”); + m_RenderGraph = new RenderGraph("MyRenderGraph"); } void CleanupRenderGraph() diff --git a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Frame-Settings-API.md b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Frame-Settings-API.md index 75b6cacd1ae..babd533061c 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Documentation~/Frame-Settings-API.md +++ b/Packages/com.unity.render-pipelines.high-definition/Documentation~/Frame-Settings-API.md @@ -44,7 +44,7 @@ Finally, access the Frame Settings structure itself. This controls the actual va - **Camera**: `HDAdditionalCameraData.renderingPathCustomFrameSettings` - **Reflection Probe**: `HDAdditionalReflectionData.frameSettings` -For information on the API available for `FrameSettings`, including how to edit the value of a Frame Setting, see [FrameSettings Scripting API](framesettings-scripting-api). +For information on the API available for `FrameSettings`, including how to edit the value of a Frame Setting, see [FrameSettings Scripting API](#framesettings-scripting-api). ## Frame Setting enumerations diff --git a/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Hair/Hair.hlsl b/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Hair/Hair.hlsl index dc7a7e76798..2785a6c9b48 100644 --- a/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Hair/Hair.hlsl +++ b/Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Hair/Hair.hlsl @@ -601,8 +601,9 @@ void GetHairAngleLocal(float3 wo, float3 wi, inout HairAngle angles) void GetHairAngleWorld(float3 V, float3 L, float3 T, inout HairAngle angles) { - angles.sinThetaO = dot(T, V); - angles.sinThetaI = dot(T, L); + // It might exceed the range [-1, 1], so explicitly clamp here to prevent nan output from FastASin. + angles.sinThetaO = clamp(dot(T, V), -1.0, 1.0); + angles.sinThetaI = clamp(dot(T, L), -1.0, 1.0); float thetaO = FastASin(angles.sinThetaO); float thetaI = FastASin(angles.sinThetaI); diff --git a/Packages/com.unity.render-pipelines.universal/Documentation~/renderer-features/scriptable-renderer-features/inject-a-pass-using-a-scriptable-renderer-feature.md b/Packages/com.unity.render-pipelines.universal/Documentation~/renderer-features/scriptable-renderer-features/inject-a-pass-using-a-scriptable-renderer-feature.md index 61aa233ef75..f8b49e12679 100644 --- a/Packages/com.unity.render-pipelines.universal/Documentation~/renderer-features/scriptable-renderer-features/inject-a-pass-using-a-scriptable-renderer-feature.md +++ b/Packages/com.unity.render-pipelines.universal/Documentation~/renderer-features/scriptable-renderer-features/inject-a-pass-using-a-scriptable-renderer-feature.md @@ -99,7 +99,7 @@ This section uses the example `RedTintRenderPass` Scriptable Render Pass from th material = CoreUtils.CreateEngineMaterial(shader); redTintRenderPass = new RedTintRenderPass(material); - renderPassEvent = RenderPassEvent.AfterRenderingSkybox; + redTintRenderPass.renderPassEvent = RenderPassEvent.AfterRenderingSkybox; } ``` diff --git a/Packages/com.unity.render-pipelines.universal/Editor/LightExplorer.cs b/Packages/com.unity.render-pipelines.universal/Editor/LightExplorer.cs index 294853a402f..709060aceb5 100644 --- a/Packages/com.unity.render-pipelines.universal/Editor/LightExplorer.cs +++ b/Packages/com.unity.render-pipelines.universal/Editor/LightExplorer.cs @@ -47,6 +47,10 @@ protected override LightingExplorerTableColumn[] GetReflectionProbeColumns() new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Enum, Styles.Resolution, "m_Resolution", 100, (r, prop, dep) => { EditorGUI.IntPopup(r, prop, Styles.ReflectionProbeSizeTitles, Styles.ReflectionProbeSizeValues, GUIContent.none); + }, + (lhs, rhs) => + { + return lhs.intValue.CompareTo(rhs.intValue); }), // 4: Probe Resolution new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Float, Styles.ShadowDistance, "m_ShadowDistance", 100), // 5: Shadow Distance new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Float, Styles.NearPlane, "m_NearClip", 70), // 6: Near Plane diff --git a/Packages/com.unity.shadergraph/Editor/Data/Graphs/GroupData.cs b/Packages/com.unity.shadergraph/Editor/Data/Graphs/GroupData.cs index acab2ec9abb..363ce4000bb 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/Graphs/GroupData.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/Graphs/GroupData.cs @@ -5,7 +5,7 @@ namespace UnityEditor.ShaderGraph { [Serializable] - public class GroupData : JsonObject + public class GroupData : JsonObject, IRectInterface { [SerializeField] string m_Title; @@ -16,6 +16,7 @@ public string title set { m_Title = value; } } + [SerializeField] Vector2 m_Position; @@ -25,6 +26,16 @@ public Vector2 position set { m_Position = value; } } + Rect IRectInterface.rect + { + get => new Rect(position, Vector2.one); + set + { + position = value.position; + } + } + + public GroupData() : base() { } public GroupData(string title, Vector2 position) diff --git a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Artistic/Normal/NormalFromTextureNode.cs b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Artistic/Normal/NormalFromTextureNode.cs index 3e057b02ba1..a9ea64d4887 100644 --- a/Packages/com.unity.shadergraph/Editor/Data/Nodes/Artistic/Normal/NormalFromTextureNode.cs +++ b/Packages/com.unity.shadergraph/Editor/Data/Nodes/Artistic/Normal/NormalFromTextureNode.cs @@ -84,9 +84,9 @@ public void GenerateNodeFunction(FunctionRegistry registry, GenerationMode gener s.AppendLine("$precision2 offsetU = $precision2(UV.x + Offset, UV.y);"); s.AppendLine("$precision2 offsetV = $precision2(UV.x, UV.y + Offset);"); - s.AppendLine("$precision normalSample = SAMPLE_TEXTURE2D(Texture, Sampler, UV);"); - s.AppendLine("$precision uSample = SAMPLE_TEXTURE2D(Texture, Sampler, offsetU);"); - s.AppendLine("$precision vSample = SAMPLE_TEXTURE2D(Texture, Sampler, offsetV);"); + s.AppendLine("$precision normalSample = SAMPLE_TEXTURE2D(Texture, Sampler, UV).r;"); + s.AppendLine("$precision uSample = SAMPLE_TEXTURE2D(Texture, Sampler, offsetU).r;"); + s.AppendLine("$precision vSample = SAMPLE_TEXTURE2D(Texture, Sampler, offsetV).r;"); s.AppendLine("$precision3 va = $precision3(1, 0, (uSample - normalSample) * Strength);"); s.AppendLine("$precision3 vb = $precision3(0, 1, (vSample - normalSample) * Strength);"); diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs b/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs index 1776835b93b..c4e6d43f79e 100644 --- a/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs +++ b/Packages/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs @@ -1478,7 +1478,12 @@ internal static void InsertCopyPasteGraph(this MaterialGraphView graphView, Copy { var nodeList = copyGraph.GetNodes(); - ClampNodesWithinView(graphView, new List().Union(nodeList).Union(copyGraph.stickyNotes)); + ClampNodesWithinView(graphView, + new List() + .Union(nodeList) + .Union(copyGraph.stickyNotes) + .Union(copyGraph.groups) + ); graphView.graph.PasteGraph(copyGraph, remappedNodes, remappedEdges); diff --git a/Packages/com.unity.shadergraph/Editor/Drawing/Views/ShaderGroup.cs b/Packages/com.unity.shadergraph/Editor/Drawing/Views/ShaderGroup.cs index 92c3b46df6b..02b2fda1376 100644 --- a/Packages/com.unity.shadergraph/Editor/Drawing/Views/ShaderGroup.cs +++ b/Packages/com.unity.shadergraph/Editor/Drawing/Views/ShaderGroup.cs @@ -53,5 +53,13 @@ public override bool AcceptsElement(GraphElement element, ref string reasonWhyNo return true; } + + protected override void SetScopePositionOnly(Rect newPos) + { + base.SetScopePositionOnly(newPos); + + userData.position = newPos.position; + } + } } diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(ChangeSpeed).md b/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(ChangeSpeed).md index adf7746ed54..521c89111f9 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(ChangeSpeed).md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(ChangeSpeed).md @@ -1,5 +1,8 @@ # Velocity from Direction & Speed (Change Speed) +> [!IMPORTANT] +> This feature is experimental. To use this feature, open the **Preferences** window, go to the **Visual Effects** tab, and enable **Experimental Operators/Blocks**. + Menu Path : **Velocity > [Set/Add] Velocity from Direction & Speed (Change Speed)** The **Velocity from Direction And Speed : Change Speed** Block calculates a velocity for the particle based on the direction attribute. diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(NewDirection).md b/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(NewDirection).md index 663e65f8807..1b16ce6c763 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(NewDirection).md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(NewDirection).md @@ -1,5 +1,8 @@ # Velocity from Direction & Speed (New Direction) +> [!IMPORTANT] +> This feature is experimental. To use this feature, open the **Preferences** window, go to the **Visual Effects** tab, and enable **Experimental Operators/Blocks**. + Menu Path : **Velocity > [Set/Add] Velocity from Direction & Speed (New Direction)** The **Velocity from Direction And Speed (New Direction)** Block calculates a velocity for the particle based on a blend ratio between a given direction, and the direction attribute. diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(RandomDirection).md b/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(RandomDirection).md index cebf390f063..69da873c2b1 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(RandomDirection).md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(RandomDirection).md @@ -1,5 +1,8 @@ # Velocity from Direction & Speed (Random Direction) +> [!IMPORTANT] +> This feature is experimental. To use this feature, open the **Preferences** window, go to the **Visual Effects** tab, and enable **Experimental Operators/Blocks**. + Menu Path : **Velocity > [Set/Add] Velocity from Direction & Speed (Random Direction)** The **Velocity from Direction And Speed (Random Direction)** Block calculates a velocity for the particle based on a blend ratio between a random direction (per-particle), and the direction attribute. diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(Spherical).md b/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(Spherical).md index 303f16ffbe9..c9c6e5e2616 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(Spherical).md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(Spherical).md @@ -1,5 +1,8 @@ # Velocity from Direction & Speed (Spherical) +> [!IMPORTANT] +> This feature is experimental. To use this feature, open the **Preferences** window, go to the **Visual Effects** tab, and enable **Experimental Operators/Blocks**. + Menu Path : **Velocity > [Set/Add] Velocity from Direction & Speed (Spherical)** The **Velocity from Direction And Speed (Spherical)** Block calculates a velocity for the particle based on a blend ratio between the direction attribute and a spherical vector. diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(Tangent).md b/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(Tangent).md index a951cf12914..c9e6e6f332d 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(Tangent).md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Block-VelocityFromDirectionAndSpeed(Tangent).md @@ -1,5 +1,8 @@ # Velocity from Direction & Speed (Tangent) +> [!IMPORTANT] +> This feature is experimental. To use this feature, open the **Preferences** window, go to the **Visual Effects** tab, and enable **Experimental Operators/Blocks**. + Menu Path : **Velocity > [Set/Add] Velocity from Direction & Speed (Tangent)** The **Velocity from Direction And Speed (Tangent)** Block calculates a velocity for the particle based on a blend ratio between the direction attribute and a tangent vector. diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-PointCache.md b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-PointCache.md index e2193371eb2..fbd0d805851 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-PointCache.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-PointCache.md @@ -1,5 +1,8 @@ # Point Cache +> [!IMPORTANT] +> This feature is experimental. To use this feature, open the **Preferences** window, go to the **Visual Effects** tab, and enable **Experimental Operators/Blocks**. + Menu Path : **Operator > Utility > Point Cache** The **Point Cache** Operator exposes the attribute maps and the point count stored into a [Point Cache asset](point-cache-asset.md). diff --git a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-SampleAttributeMap.md b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-SampleAttributeMap.md index 2fbb49b1f47..7599862a42e 100644 --- a/Packages/com.unity.visualeffectgraph/Documentation~/Operator-SampleAttributeMap.md +++ b/Packages/com.unity.visualeffectgraph/Documentation~/Operator-SampleAttributeMap.md @@ -1,5 +1,8 @@ # Sample Attribute Map +> [!IMPORTANT] +> This feature is experimental. To use this feature, open the **Preferences** window, go to the **Visual Effects** tab, and enable **Experimental Operators/Blocks**. + **Menu Path : Operator > Sampling > Attribute Map** The Sample Attribute Map Operator enables you to sample an [attribute map](point-cache-in-vfx-graph.md#attribute-map) from a [Point Cache](point-cache-in-vfx-graph.md). diff --git a/Tests/SRPTests/Projects/ShaderGraph/Assets/CommonAssets/Editor/GroupTests.cs b/Tests/SRPTests/Projects/ShaderGraph/Assets/CommonAssets/Editor/GroupTests.cs new file mode 100644 index 00000000000..0226578be08 --- /dev/null +++ b/Tests/SRPTests/Projects/ShaderGraph/Assets/CommonAssets/Editor/GroupTests.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEngine.UIElements; +using NUnit.Framework; +using UnityEngine; +using UnityEngine.TestTools; +using UnityEditor.Graphing; +using UnityEditor.ShaderGraph.Drawing; +using UnityEditor.ShaderGraph.Internal; + + +namespace UnityEditor.ShaderGraph.UnitTests +{ + [TestFixture] + internal class GroupTests + { + static string kGraphName = "Assets/CommonAssets/Graphs/Group.shadergraph"; + GraphData m_Graph; + + GraphEditorView m_GraphEditorView; + MaterialGraphEditWindow m_Window; + + [OneTimeSetUp] + public void LoadGraph() + { + List lti; + var assetCollection = new AssetCollection(); + ShaderGraphImporter.GetShaderText(kGraphName, out lti, assetCollection, out m_Graph); + Assert.NotNull(m_Graph, $"Invalid graph data found for {kGraphName}"); + + m_Graph.ValidateGraph(); + // Open up the window + if (!ShaderGraphImporterEditor.ShowGraphEditWindow(kGraphName)) + { + Assert.Fail("ShaderGraphImporterEditor.ShowGraphEditWindow could not open " + kGraphName); + } + + m_Window = EditorWindow.GetWindow(); + if (m_Window == null) + { + Assert.Fail("Could not open window"); + } + + // EditorWindow.GetWindow will return a new window if one is not found. A new window will have graphObject == null. + if (m_Window.graphObject == null) + { + Assert.Fail("Existing Shader Graph window of " + kGraphName + " not found."); + } + + m_GraphEditorView = m_Window.graphEditorView; + + } + + class TestExecuteCommandEvent : ExecuteCommandEvent + { + public void SetCommandName(string command) + { + commandName = command; + } + } + + [UnityTest] + public IEnumerator TestEmptyGroupPastePosition() + { + var materialGraphView = m_GraphEditorView.graphView; + var materialGraphViewType = typeof(MaterialGraphView); + + var cutMethodInfo = materialGraphViewType.GetMethod("CutSelectionCallback", + BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy); + var pasteMethodInfo = materialGraphViewType.GetMethod("PasteCallback", + BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy); + + var mousePositionPropertyInfo = materialGraphViewType.GetProperty("cachedMousePosition", + typeof(Vector2)); + + Assert.NotNull(cutMethodInfo, "CutSelectionCallback method not found."); + Assert.NotNull(pasteMethodInfo, "PasteCallback method not found."); + Assert.NotNull(mousePositionPropertyInfo, "cachedMousePosition property not found."); + + var groupList = materialGraphView.Query() + .Where(x => x.userData.title == "Empty Group") + .ToList(); + + Assert.AreEqual(1, groupList.Count()); + + + + materialGraphView.ClearSelection(); + materialGraphView.AddToSelection(groupList[0]); + + cutMethodInfo.Invoke(materialGraphView, null); + yield return null; + + groupList = materialGraphView.Query() + .Where(x => x.userData.title == "Empty Group") + .ToList(); + + Assert.AreEqual(0, groupList.Count()); + + mousePositionPropertyInfo.SetValue(materialGraphView, new Vector2(100,100)); + pasteMethodInfo.Invoke(materialGraphView, null); + yield return null; + + mousePositionPropertyInfo.SetValue(materialGraphView, new Vector2(100,200)); + pasteMethodInfo.Invoke(materialGraphView, null); + yield return null; + + groupList = materialGraphView.Query() + .Where(x => x.userData.title == "Empty Group") + .ToList(); + + Assert.AreEqual(2, groupList.Count()); + + Assert.AreNotEqual(groupList[0].GetPosition().position, groupList[1].GetPosition().position, + "When the cursor position changes, the pasted group's position should be adjusted accordingly"); + } + + } +} diff --git a/Tests/SRPTests/Projects/ShaderGraph/Assets/CommonAssets/Editor/GroupTests.cs.meta b/Tests/SRPTests/Projects/ShaderGraph/Assets/CommonAssets/Editor/GroupTests.cs.meta new file mode 100644 index 00000000000..e68bdf11d62 --- /dev/null +++ b/Tests/SRPTests/Projects/ShaderGraph/Assets/CommonAssets/Editor/GroupTests.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 680b4886bf42f4e469e5be34a62e46df \ No newline at end of file diff --git a/Tests/SRPTests/Projects/ShaderGraph/Assets/CommonAssets/Graphs/Group.shadergraph b/Tests/SRPTests/Projects/ShaderGraph/Assets/CommonAssets/Graphs/Group.shadergraph new file mode 100644 index 00000000000..fa1af318b80 --- /dev/null +++ b/Tests/SRPTests/Projects/ShaderGraph/Assets/CommonAssets/Graphs/Group.shadergraph @@ -0,0 +1,480 @@ +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "2e2fb2d41f3140e6bf6c2cd71c34aae7", + "m_Properties": [], + "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "4502e1e5b9644594b2df22af116ad5ea" + } + ], + "m_Nodes": [ + { + "m_Id": "af0264ee1a9b49c18fdf9101cf9ae081" + }, + { + "m_Id": "c12d6a9b6653476ca32727965d4298cb" + }, + { + "m_Id": "97cc969e84a14cb09a9260436cd21d3c" + }, + { + "m_Id": "f855f815da12498382d7f7fa2bd05ee1" + }, + { + "m_Id": "2c226297ac7b4ec4a7776745f36c9d64" + }, + { + "m_Id": "52e4d268f589446bb73efac7dccf48c7" + } + ], + "m_GroupDatas": [ + { + "m_Id": "f694401d3c6c402d97536e786e32ec07" + } + ], + "m_StickyNoteDatas": [], + "m_Edges": [], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [ + { + "m_Id": "af0264ee1a9b49c18fdf9101cf9ae081" + }, + { + "m_Id": "c12d6a9b6653476ca32727965d4298cb" + }, + { + "m_Id": "97cc969e84a14cb09a9260436cd21d3c" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 0.0, + "y": 200.0 + }, + "m_Blocks": [ + { + "m_Id": "f855f815da12498382d7f7fa2bd05ee1" + }, + { + "m_Id": "2c226297ac7b4ec4a7776745f36c9d64" + }, + { + "m_Id": "52e4d268f589446bb73efac7dccf48c7" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "preventRotation": false + }, + "m_Path": "Shader Graphs", + "m_GraphPrecision": 0, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_SubDatas": [], + "m_ActiveTargets": [ + { + "m_Id": "a9167bc70a5241adb50893132cec17c1" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "1af599a5b6874ae8a4a3c9d3b49e82db", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget", + "m_ObjectId": "20a4d9d22d5145b89d5fc43b68551665" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "2c226297ac7b4ec4a7776745f36c9d64", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Alpha", + "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": "e7f99533600e469cb17d6a460403a30a" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "4502e1e5b9644594b2df22af116ad5ea", + "m_Name": "", + "m_ChildObjectList": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "52e4d268f589446bb73efac7dccf48c7", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.AlphaClipThreshold", + "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": "df4ecaa19f1d40b88c55203480c21185" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "685a41ca509448b0a5afa62b66767f9d", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.7353569269180298, + "y": 0.7353569269180298, + "z": 0.7353569269180298 + }, + "m_DefaultValue": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "97cc969e84a14cb09a9260436cd21d3c", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "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": "1af599a5b6874ae8a4a3c9d3b49e82db" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "a9167bc70a5241adb50893132cec17c1", + "m_Datas": [], + "m_ActiveSubTarget": { + "m_Id": "20a4d9d22d5145b89d5fc43b68551665" + }, + "m_AllowMaterialOverride": false, + "m_SurfaceType": 0, + "m_ZTestMode": 4, + "m_ZWriteControl": 0, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": true, + "m_CastShadows": true, + "m_ReceiveShadows": true, + "m_DisableTint": false, + "m_AdditionalMotionVectorMode": 0, + "m_AlembicMotionVectors": false, + "m_SupportsLODCrossFade": false, + "m_CustomEditorGUI": "", + "m_SupportVFX": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "af0264ee1a9b49c18fdf9101cf9ae081", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "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": "f224ffc6fb50427aaa44ece0fadf34b1" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "b8f3d744ba1c4249a953b9d29df5ea96", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "c12d6a9b6653476ca32727965d4298cb", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Normal", + "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": "b8f3d744ba1c4249a953b9d29df5ea96" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "df4ecaa19f1d40b88c55203480c21185", + "m_Id": 0, + "m_DisplayName": "Alpha Clip Threshold", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AlphaClipThreshold", + "m_StageCapability": 2, + "m_Value": 0.5, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "e7f99533600e469cb17d6a460403a30a", + "m_Id": 0, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "f224ffc6fb50427aaa44ece0fadf34b1", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "f694401d3c6c402d97536e786e32ec07", + "m_Title": "Empty Group", + "m_Position": { + "x": -433.0, + "y": 112.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "f855f815da12498382d7f7fa2bd05ee1", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "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": "685a41ca509448b0a5afa62b66767f9d" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + diff --git a/Tests/SRPTests/Projects/ShaderGraph/Assets/CommonAssets/Graphs/Group.shadergraph.meta b/Tests/SRPTests/Projects/ShaderGraph/Assets/CommonAssets/Graphs/Group.shadergraph.meta new file mode 100644 index 00000000000..5d1a45e9e9e --- /dev/null +++ b/Tests/SRPTests/Projects/ShaderGraph/Assets/CommonAssets/Graphs/Group.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: dc1e3482bafaf6f4eb9452812d08215e +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}