From f4d450b304552e4c7280c0251b2a6fc4de8fb159 Mon Sep 17 00:00:00 2001 From: Chris Tchou Date: Tue, 31 Aug 2021 10:06:36 -0700 Subject: [PATCH 1/5] Merge branch 'sg/fix/noise' into temp/merge --- .../Assets/Scenes/ProceduralNodes.unity | 374 +++++++- .../Graphs/Procedural/Noise/GradientNoise.mat | 33 +- .../Procedural/Noise/GradientNoise.mat.meta | 2 +- .../Noise/GradientNoise.shadergraph | 681 ++++++++++++++- .../Noise/GradientNoise.shadergraph.meta | 2 +- .../Procedural/Noise/GradientNoiseLegacy.mat | 54 ++ .../Noise/GradientNoiseLegacy.mat.meta | 8 + .../Noise/GradientNoiseLegacy.shadergraph | 55 ++ .../GradientNoiseLegacy.shadergraph.meta | 10 + .../Graphs/Procedural/Noise/SimpleNoise.mat | 33 +- .../Procedural/Noise/SimpleNoise.mat.meta | 2 +- .../Procedural/Noise/SimpleNoise.shadergraph | 681 ++++++++++++++- .../Noise/SimpleNoise.shadergraph.meta | 2 +- .../Procedural/Noise/SimpleNoiseLegacy.mat | 54 ++ .../Noise/SimpleNoiseLegacy.mat.meta | 8 + .../Noise/SimpleNoiseLegacy.shadergraph | 55 ++ .../Noise/SimpleNoiseLegacy.shadergraph.meta | 10 + .../Graphs/Procedural/Noise/Voronoi.mat | 33 +- .../Graphs/Procedural/Noise/Voronoi.mat.meta | 2 +- .../Procedural/Noise/Voronoi.shadergraph | 795 ++++++++++++++++-- .../Procedural/Noise/Voronoi.shadergraph.meta | 2 +- .../Graphs/Procedural/Noise/VoronoiLegacy.mat | 57 ++ .../Procedural/Noise/VoronoiLegacy.mat.meta | 8 + .../Noise/VoronoiLegacy.shadergraph | 762 +++++++++++++++++ .../Noise/VoronoiLegacy.shadergraph.meta | 10 + .../ShaderLibrary/Hashes.hlsl | 227 +++++ .../ShaderLibrary/Hashes.hlsl.meta | 7 + com.unity.shadergraph/CHANGELOG.md | 1 + .../Documentation~/Gradient-Noise-Node.md | 6 + .../Documentation~/Simple-Noise-Node.md | 6 + .../Documentation~/Voronoi-Node.md | 6 + .../Procedural/Noise/GradientNoiseNode.cs | 167 +++- .../Nodes/Procedural/Noise/IntegerHashNode.cs | 131 +++ .../Procedural/Noise/IntegerHashNode.cs.meta | 11 + .../Nodes/Procedural/Noise/SimpleNoiseNode.cs | 206 +++-- .../Nodes/Procedural/Noise/VoronoiNode.cs | 190 ++++- .../Editor/Data/Nodes/Procedural/Random.meta | 8 + .../Editor/Data/Util/ScreenSpaceType.cs | 11 +- 38 files changed, 4396 insertions(+), 314 deletions(-) create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.mat create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.mat.meta create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.shadergraph create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.shadergraph.meta create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.mat create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.mat.meta create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.shadergraph create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.shadergraph.meta create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.mat create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.mat.meta create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.shadergraph create mode 100644 TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.shadergraph.meta create mode 100644 com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl create mode 100644 com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl.meta create mode 100644 com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs create mode 100644 com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs.meta create mode 100644 com.unity.shadergraph/Editor/Data/Nodes/Procedural/Random.meta diff --git a/TestProjects/ShaderGraph/Assets/Scenes/ProceduralNodes.unity b/TestProjects/ShaderGraph/Assets/Scenes/ProceduralNodes.unity index 3cd5b90834e..7a57f6b0e56 100644 --- a/TestProjects/ShaderGraph/Assets/Scenes/ProceduralNodes.unity +++ b/TestProjects/ShaderGraph/Assets/Scenes/ProceduralNodes.unity @@ -43,7 +43,7 @@ RenderSettings: --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 11 + serializedVersion: 12 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 @@ -98,7 +98,8 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 0 + m_LightingSettings: {fileID: 4890085278179872738, guid: 2d1d7097c72e31b4a9d0603532ace997, + type: 2} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -118,6 +119,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} @@ -147,6 +150,7 @@ Transform: 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: 1191412549} - {fileID: 600911087} @@ -180,6 +184,7 @@ Transform: 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: 1458809788} - {fileID: 1730378118} @@ -215,8 +220,9 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 473247449} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 2} + m_LocalPosition: {x: 0, y: 0, z: 1} m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 600911087} m_RootOrder: 1 @@ -232,14 +238,16 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: ddf3085d56cfce5469d366a091563ea2, type: 2} + - {fileID: 2100000, guid: 4651240ff79bb5243aa75709a98e7d60, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -260,6 +268,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &473247452 MeshFilter: m_ObjectHideFlags: 0 @@ -279,6 +288,7 @@ GameObject: - component: {fileID: 487053999} - component: {fileID: 487053998} - component: {fileID: 487053997} + - component: {fileID: 487054000} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -299,11 +309,18 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: ImageComparisonSettings: - TargetWidth: 600 + TargetWidth: 1000 TargetHeight: 600 PerPixelCorrectnessThreshold: 0.00075 + PerPixelGammaThreshold: 0.003921569 + PerPixelAlphaThreshold: 0.003921569 AverageCorrectnessThreshold: 0.0001 + IncorrectPixelsThreshold: 0.0000038146973 UseHDR: 0 + UseBackBuffer: 0 + ImageResolution: 0 + ActiveImageTests: 1 + ActivePixelTests: 7 WaitFrames: 0 --- !u!20 &487053998 Camera: @@ -358,10 +375,44 @@ Transform: m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5} m_LocalPosition: {x: 0, y: 60, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0} +--- !u!114 &487054000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 487053996} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 --- !u!1 &600911086 GameObject: m_ObjectHideFlags: 0 @@ -377,7 +428,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!4 &600911087 Transform: m_ObjectHideFlags: 0 @@ -388,10 +439,14 @@ Transform: 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: 1329161682} - {fileID: 473247450} - {fileID: 1943969997} + - {fileID: 1711348498} + - {fileID: 1165197362} + - {fileID: 1341128387} m_Father: {fileID: 24034509} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -421,8 +476,9 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1084323972} m_LocalRotation: {x: -0, y: -0, z: 0.70710576, w: 0.70710784} - m_LocalPosition: {x: 2, y: 0, z: -2} + m_LocalPosition: {x: 2, y: 0, z: -3} m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 386438769} m_RootOrder: 2 @@ -438,10 +494,12 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -466,6 +524,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1084323975 MeshFilter: m_ObjectHideFlags: 0 @@ -474,6 +533,89 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1084323972} m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1165197361 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1165197362} + - component: {fileID: 1165197364} + - component: {fileID: 1165197363} + m_Layer: 0 + m_Name: SimpleNoise-Legacy + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1165197362 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165197361} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 3} + m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 600911087} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1165197363 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165197361} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: ddf3085d56cfce5469d366a091563ea2, type: 2} + 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: 0 + 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1165197364 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1165197361} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &1171912236 GameObject: m_ObjectHideFlags: 0 @@ -500,8 +642,9 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1171912236} m_LocalRotation: {x: -0, y: -0, z: 0.70710576, w: 0.70710784} - m_LocalPosition: {x: 2, y: 0, z: 0} + m_LocalPosition: {x: 2, y: 0, z: -1} m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 386438769} m_RootOrder: 3 @@ -517,10 +660,12 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -545,6 +690,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1171912239 MeshFilter: m_ObjectHideFlags: 0 @@ -579,8 +725,9 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1191412548} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0, z: -1} m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 24034509} m_RootOrder: 0 @@ -596,10 +743,12 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -624,6 +773,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1191412551 MeshFilter: m_ObjectHideFlags: 0 @@ -658,8 +808,9 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1329161681} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -2, y: 0, z: 2} + m_LocalPosition: {x: -2, y: 0, z: 1} m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 600911087} m_RootOrder: 0 @@ -675,14 +826,16 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 1c873ba79b4cd644aab9e51a53dc6539, type: 2} + - {fileID: 2100000, guid: e3e6819163b8ed1429993423820bf20c, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -703,6 +856,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1329161684 MeshFilter: m_ObjectHideFlags: 0 @@ -711,6 +865,89 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1329161681} m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1341128386 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1341128387} + - component: {fileID: 1341128389} + - component: {fileID: 1341128388} + m_Layer: 0 + m_Name: Voronoi-Legacy + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1341128387 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1341128386} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 2, y: 0, z: 3} + m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 600911087} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!23 &1341128388 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1341128386} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 26459e0ffe8ad2c438db2272a289ddb0, type: 2} + 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: 0 + 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1341128389 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1341128386} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &1374942159 GameObject: m_ObjectHideFlags: 0 @@ -738,8 +975,9 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1374942159} m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: -2, y: 0, z: 0} + m_LocalPosition: {x: -2, y: 0, z: -1} m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 386438769} m_RootOrder: 4 @@ -768,10 +1006,12 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -796,6 +1036,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1374942163 MeshFilter: m_ObjectHideFlags: 0 @@ -830,8 +1071,9 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1458809787} m_LocalRotation: {x: -0, y: -0, z: 0.70710576, w: 0.70710784} - m_LocalPosition: {x: -2, y: 0, z: -2} + m_LocalPosition: {x: -2, y: 0, z: -3} m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 386438769} m_RootOrder: 0 @@ -847,10 +1089,12 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -875,6 +1119,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1458809790 MeshFilter: m_ObjectHideFlags: 0 @@ -883,6 +1128,89 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1458809787} m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1711348497 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1711348498} + - component: {fileID: 1711348500} + - component: {fileID: 1711348499} + m_Layer: 0 + m_Name: GradientNoise-Legacy + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1711348498 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1711348497} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2, y: 0, z: 3} + m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 600911087} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1711348499 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1711348497} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1c873ba79b4cd644aab9e51a53dc6539, type: 2} + 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: 0 + 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1711348500 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1711348497} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &1730378117 GameObject: m_ObjectHideFlags: 0 @@ -909,8 +1237,9 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1730378117} m_LocalRotation: {x: -0, y: -0, z: 0.70710576, w: 0.70710784} - m_LocalPosition: {x: 0, y: 0, z: -2} + m_LocalPosition: {x: 0, y: 0, z: -3} m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 386438769} m_RootOrder: 1 @@ -926,10 +1255,12 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: @@ -954,6 +1285,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1730378120 MeshFilter: m_ObjectHideFlags: 0 @@ -987,13 +1319,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1943969996} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 2, y: 0, z: 2} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 2, y: 0, z: 1} + m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 600911087} m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} --- !u!23 &1943969998 MeshRenderer: m_ObjectHideFlags: 0 @@ -1005,14 +1338,16 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 4294967295 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 26459e0ffe8ad2c438db2272a289ddb0, type: 2} + - {fileID: 2100000, guid: 3bb152fc4e436d34880dfadf82f1df87, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1033,6 +1368,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!33 &1943969999 MeshFilter: m_ObjectHideFlags: 0 diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.mat b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.mat index 6c579f34843..ab419d7f055 100644 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.mat +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.mat @@ -1,5 +1,18 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8135984528585924538 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 --- !u!21 &2100000 Material: serializedVersion: 6 @@ -8,7 +21,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: GradientNoise - m_Shader: {fileID: -6465566751694194690, guid: 560fdfa7d20a996419a6e727470d127d, + m_Shader: {fileID: -6465566751694194690, guid: 935f2ae3314ffc645832550a4e0a76b8, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 @@ -19,7 +32,23 @@ Material: disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 - m_TexEnvs: [] + m_TexEnvs: + - 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: - Vector1_4789D2C8: 40 + - _QueueControl: 0 + - _QueueOffset: 0 m_Colors: [] + m_BuildTextureStacks: [] diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.mat.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.mat.meta index 4346ad9e95e..54b0b00a148 100644 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.mat.meta +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1c873ba79b4cd644aab9e51a53dc6539 +guid: e3e6819163b8ed1429993423820bf20c NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.shadergraph b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.shadergraph index 9a337b411e2..29926f8b5f3 100644 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.shadergraph +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.shadergraph @@ -1,55 +1,674 @@ { - "m_SerializedProperties": [ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "147dff3f6e664325872f5830207767be", + "m_Properties": [ { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.Vector1ShaderProperty" - }, - "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f\"\n },\n \"m_Name\": \"Scale\",\n \"m_DefaultReferenceName\": \"Vector1_4789D2C8\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_Hidden\": false,\n \"m_Value\": 10.0,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" + "m_Id": "1739f6f025f7ab8099f6d1403f926489" } ], - "m_SerializableNodes": [ + "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"4cc36436-c68c-4ce4-a2aa-a494b11d28c4\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 456.0,\n \"y\": 43.0,\n \"width\": 200.0,\n \"height\": 149.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 0.5,\\n \\\"z\\\": 0.5\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.Universal.UniversalUnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddVelocityChange\": false\n}" + "m_Id": "c6bc9c7ba50243a08a4c7bbed6b92bbe" + } + ], + "m_Nodes": [ + { + "m_Id": "0b25a3523227598091b1434e9494f9cc" }, { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.PropertyNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"02125932-fc0a-42d0-83d4-dfbd3cb77fe6\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -33.0,\n \"y\": 88.0,\n \"width\": 91.0,\n \"height\": 77.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Scale\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f\"\n}" + "m_Id": "127c8b2c2697aa89b54936f54e106669" }, { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.GradientNoiseNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"a111a76a-bfc6-4e35-bf49-32baf7db2649\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Gradient Noise\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 140.0,\n \"y\": 66.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Scale\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Scale\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 10.0,\\n \\\"m_DefaultValue\\\": 10.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + "m_Id": "25d0cf64b579488dbd7d9c86184dc9f8" + }, + { + "m_Id": "0d9098cfc0e24f8181e409f5299316e5" + }, + { + "m_Id": "2dffb3247bdd4c1a8e802095329dfada" + }, + { + "m_Id": "2d6e838099b64d1691458519c4468e20" + }, + { + "m_Id": "8ab106961c1f4912b1385d4c803a121f" + }, + { + "m_Id": "d2b0de5b622a4f0285396b6b37aa3631" } ], - "m_Groups": [], - "m_StickyNotes": [], - "m_SerializableEdges": [ + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" + "m_OutputSlot": { + "m_Node": { + "m_Id": "0b25a3523227598091b1434e9494f9cc" + }, + "m_SlotId": 0 }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"a111a76a-bfc6-4e35-bf49-32baf7db2649\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4cc36436-c68c-4ce4-a2aa-a494b11d28c4\"\n }\n}" + "m_InputSlot": { + "m_Node": { + "m_Id": "127c8b2c2697aa89b54936f54e106669" + }, + "m_SlotId": 1 + } }, { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" + "m_OutputSlot": { + "m_Node": { + "m_Id": "127c8b2c2697aa89b54936f54e106669" + }, + "m_SlotId": 2 }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"02125932-fc0a-42d0-83d4-dfbd3cb77fe6\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"a111a76a-bfc6-4e35-bf49-32baf7db2649\"\n }\n}" + "m_InputSlot": { + "m_Node": { + "m_Id": "2d6e838099b64d1691458519c4468e20" + }, + "m_SlotId": 0 + } } ], + "m_VertexContext": { + "m_Position": { + "x": 456.0, + "y": 43.0 + }, + "m_Blocks": [ + { + "m_Id": "25d0cf64b579488dbd7d9c86184dc9f8" + }, + { + "m_Id": "0d9098cfc0e24f8181e409f5299316e5" + }, + { + "m_Id": "2dffb3247bdd4c1a8e802095329dfada" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 456.0, + "y": 243.0 + }, + "m_Blocks": [ + { + "m_Id": "2d6e838099b64d1691458519c4468e20" + }, + { + "m_Id": "8ab106961c1f4912b1385d4c803a121f" + }, + { + "m_Id": "d2b0de5b622a4f0285396b6b37aa3631" + } + ] + }, "m_PreviewData": { "serializedMesh": { "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", "m_Guid": "" - } + }, + "preventRotation": false }, "m_Path": "Shader Graph Tests/Procedural/Noise", - "m_ConcretePrecision": 0, - "m_ActiveOutputNodeGuidSerialized": "4cc36436-c68c-4ce4-a2aa-a494b11d28c4" -} \ No newline at end of file + "m_GraphPrecision": 0, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_ActiveTargets": [ + { + "m_Id": "22063476c6484145bc434b8d06cc2d7e" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "0b25a3523227598091b1434e9494f9cc", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -33.0, + "y": 88.0, + "width": 91.0, + "height": 77.0 + } + }, + "m_Slots": [ + { + "m_Id": "a446d9c10a97428e8061ec2886e48a3c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "1739f6f025f7ab8099f6d1403f926489" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "0d9098cfc0e24f8181e409f5299316e5", + "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": "d17b3eacf77b4c68bf7fb3ce64484e43" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.GradientNoiseNode", + "m_ObjectId": "127c8b2c2697aa89b54936f54e106669", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Gradient Noise", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 140.0, + "y": 66.0, + "width": 208.0, + "height": 302.0 + } + }, + "m_Slots": [ + { + "m_Id": "a7b78de5107db18fa6bf499fd3578978" + }, + { + "m_Id": "a7d2183b13784f8db1a60f31775d3009" + }, + { + "m_Id": "4942e2e11b8b5c8697483dcd4f59d708" + } + ], + "synonyms": [ + "perlin noise" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_HashType": 0 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "1739f6f025f7ab8099f6d1403f926489", + "m_Guid": { + "m_GuidSerialized": "56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f" + }, + "m_Name": "Scale", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_4789D2C8", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 10.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "22063476c6484145bc434b8d06cc2d7e", + "m_ActiveSubTarget": { + "m_Id": "6b50cfa9dc50441cb85e30e4209f117b" + }, + "m_AllowMaterialOverride": false, + "m_SurfaceType": 0, + "m_ZTestMode": 4, + "m_ZWriteControl": 0, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": false, + "m_CastShadows": true, + "m_ReceiveShadows": true, + "m_CustomEditorGUI": "" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "25d0cf64b579488dbd7d9c86184dc9f8", + "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": "44638223ab1943f2aa03c7368f3a25a6" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "2d6e838099b64d1691458519c4468e20", + "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": "3c03c9a70d774d0db6ac95125106909f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "2dffb3247bdd4c1a8e802095329dfada", + "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": "f28c8ea27dd145bbadf0817730277248" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "3c03c9a70d774d0db6ac95125106909f", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "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.PositionMaterialSlot", + "m_ObjectId": "44638223ab1943f2aa03c7368f3a25a6", + "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.Vector1MaterialSlot", + "m_ObjectId": "4942e2e11b8b5c8697483dcd4f59d708", + "m_Id": 2, + "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": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget", + "m_ObjectId": "6b50cfa9dc50441cb85e30e4209f117b" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "8ab106961c1f4912b1385d4c803a121f", + "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": "8e682b8a41be48b495b60c99bb93bcea" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "8e682b8a41be48b495b60c99bb93bcea", + "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.Vector1MaterialSlot", + "m_ObjectId": "a446d9c10a97428e8061ec2886e48a3c", + "m_Id": 0, + "m_DisplayName": "Scale", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "a7b78de5107db18fa6bf499fd3578978", + "m_Id": 0, + "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": [ + "X", + "Y" + ], + "m_Channel": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a7d2183b13784f8db1a60f31775d3009", + "m_Id": 1, + "m_DisplayName": "Scale", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Scale", + "m_StageCapability": 3, + "m_Value": 10.0, + "m_DefaultValue": 10.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "aef649d7b1ca400fb1fe8f037da18586", + "m_Id": 0, + "m_DisplayName": "Alpha Clip Threshold", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AlphaClipThreshold", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "c6bc9c7ba50243a08a4c7bbed6b92bbe", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "1739f6f025f7ab8099f6d1403f926489" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "d17b3eacf77b4c68bf7fb3ce64484e43", + "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": "d2b0de5b622a4f0285396b6b37aa3631", + "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": "aef649d7b1ca400fb1fe8f037da18586" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "f28c8ea27dd145bbadf0817730277248", + "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 +} + diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.shadergraph.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.shadergraph.meta index 16319adbaa6..b9d22c56212 100644 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.shadergraph.meta +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoise.shadergraph.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 560fdfa7d20a996419a6e727470d127d +guid: 935f2ae3314ffc645832550a4e0a76b8 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.mat b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.mat new file mode 100644 index 00000000000..8674ec815ad --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.mat @@ -0,0 +1,54 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2516326076133851799 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: GradientNoiseLegacy + m_Shader: {fileID: -6465566751694194690, guid: 560fdfa7d20a996419a6e727470d127d, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - 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: + - Vector1_4789D2C8: 40 + - _QueueControl: 0 + - _QueueOffset: 0 + m_Colors: [] + m_BuildTextureStacks: [] diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.mat.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.mat.meta new file mode 100644 index 00000000000..4346ad9e95e --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1c873ba79b4cd644aab9e51a53dc6539 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.shadergraph b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.shadergraph new file mode 100644 index 00000000000..9a337b411e2 --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.shadergraph @@ -0,0 +1,55 @@ +{ + "m_SerializedProperties": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.Vector1ShaderProperty" + }, + "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f\"\n },\n \"m_Name\": \"Scale\",\n \"m_DefaultReferenceName\": \"Vector1_4789D2C8\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_Hidden\": false,\n \"m_Value\": 10.0,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" + } + ], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"4cc36436-c68c-4ce4-a2aa-a494b11d28c4\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 456.0,\n \"y\": 43.0,\n \"width\": 200.0,\n \"height\": 149.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 0.5,\\n \\\"z\\\": 0.5\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.Universal.UniversalUnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddVelocityChange\": false\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.PropertyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"02125932-fc0a-42d0-83d4-dfbd3cb77fe6\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -33.0,\n \"y\": 88.0,\n \"width\": 91.0,\n \"height\": 77.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Scale\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f\"\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.GradientNoiseNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"a111a76a-bfc6-4e35-bf49-32baf7db2649\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Gradient Noise\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 140.0,\n \"y\": 66.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Scale\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Scale\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 10.0,\\n \\\"m_DefaultValue\\\": 10.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"a111a76a-bfc6-4e35-bf49-32baf7db2649\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4cc36436-c68c-4ce4-a2aa-a494b11d28c4\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"02125932-fc0a-42d0-83d4-dfbd3cb77fe6\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"a111a76a-bfc6-4e35-bf49-32baf7db2649\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graph Tests/Procedural/Noise", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "4cc36436-c68c-4ce4-a2aa-a494b11d28c4" +} \ No newline at end of file diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.shadergraph.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.shadergraph.meta new file mode 100644 index 00000000000..16319adbaa6 --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/GradientNoiseLegacy.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 560fdfa7d20a996419a6e727470d127d +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.mat b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.mat index d2c6ba1d203..90ac4a947cd 100644 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.mat +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: SimpleNoise - m_Shader: {fileID: -6465566751694194690, guid: 7c9fded5521ed43469e52bd4a6286604, + m_Shader: {fileID: -6465566751694194690, guid: 84dd2a0c06a5ef7439cfc34945736b26, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 @@ -19,7 +19,36 @@ Material: disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 - m_TexEnvs: [] + m_TexEnvs: + - 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: - Vector1_4789D2C8: 175 + - _QueueControl: 0 + - _QueueOffset: 0 m_Colors: [] + m_BuildTextureStacks: [] +--- !u!114 &7816165448951020941 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.mat.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.mat.meta index 046cef3f2ab..b2387e2e707 100644 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.mat.meta +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ddf3085d56cfce5469d366a091563ea2 +guid: 4651240ff79bb5243aa75709a98e7d60 NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.shadergraph b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.shadergraph index 98d3875bf20..aa2b194e0c4 100644 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.shadergraph +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.shadergraph @@ -1,55 +1,674 @@ { - "m_SerializedProperties": [ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "8a8d270ae03147398b278c55f4ee53ee", + "m_Properties": [ { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.Vector1ShaderProperty" - }, - "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f\"\n },\n \"m_Name\": \"Scale\",\n \"m_DefaultReferenceName\": \"Vector1_4789D2C8\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_Hidden\": false,\n \"m_Value\": 500.0,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" + "m_Id": "062c5d438c842084b0428a2e3ecfdbfd" } ], - "m_SerializableNodes": [ + "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"4cc36436-c68c-4ce4-a2aa-a494b11d28c4\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 456.0,\n \"y\": 43.0,\n \"width\": 200.0,\n \"height\": 149.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 0.5,\\n \\\"z\\\": 0.5\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.Universal.UniversalUnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddVelocityChange\": false\n}" + "m_Id": "a796ac6934a345b5a87005ffc3132d56" + } + ], + "m_Nodes": [ + { + "m_Id": "0b25a3523227598091b1434e9494f9cc" }, { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.PropertyNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"02125932-fc0a-42d0-83d4-dfbd3cb77fe6\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -29.0,\n \"y\": 92.0,\n \"width\": 91.0,\n \"height\": 77.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Scale\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f\"\n}" + "m_Id": "68d267c27f2c04868b6ed2ba967ac814" }, { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.NoiseNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"5b5b6fde-fc16-4ee8-b292-49f899cc4b09\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Simple Noise\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 144.0,\n \"y\": 67.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Scale\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Scale\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 500.0,\\n \\\"m_DefaultValue\\\": 500.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + "m_Id": "0d2bc882a3b74cd7b77d3e49ef327e32" + }, + { + "m_Id": "54467354ecf54a038b1dca2b12be0efb" + }, + { + "m_Id": "9ba2508748e64ceda29fe512ed978969" + }, + { + "m_Id": "b41183755b8243fe8adb1101317715c5" + }, + { + "m_Id": "d3db2f8d3bce4d6caba967fbaa333ae6" + }, + { + "m_Id": "4cd142444cba4db2af6509afb893e41a" } ], - "m_Groups": [], - "m_StickyNotes": [], - "m_SerializableEdges": [ + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" + "m_OutputSlot": { + "m_Node": { + "m_Id": "0b25a3523227598091b1434e9494f9cc" + }, + "m_SlotId": 0 }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"5b5b6fde-fc16-4ee8-b292-49f899cc4b09\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4cc36436-c68c-4ce4-a2aa-a494b11d28c4\"\n }\n}" + "m_InputSlot": { + "m_Node": { + "m_Id": "68d267c27f2c04868b6ed2ba967ac814" + }, + "m_SlotId": 1 + } }, { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" + "m_OutputSlot": { + "m_Node": { + "m_Id": "68d267c27f2c04868b6ed2ba967ac814" + }, + "m_SlotId": 2 }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"02125932-fc0a-42d0-83d4-dfbd3cb77fe6\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"5b5b6fde-fc16-4ee8-b292-49f899cc4b09\"\n }\n}" + "m_InputSlot": { + "m_Node": { + "m_Id": "b41183755b8243fe8adb1101317715c5" + }, + "m_SlotId": 0 + } } ], + "m_VertexContext": { + "m_Position": { + "x": 456.0, + "y": 43.0 + }, + "m_Blocks": [ + { + "m_Id": "0d2bc882a3b74cd7b77d3e49ef327e32" + }, + { + "m_Id": "54467354ecf54a038b1dca2b12be0efb" + }, + { + "m_Id": "9ba2508748e64ceda29fe512ed978969" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 456.0, + "y": 243.0 + }, + "m_Blocks": [ + { + "m_Id": "b41183755b8243fe8adb1101317715c5" + }, + { + "m_Id": "d3db2f8d3bce4d6caba967fbaa333ae6" + }, + { + "m_Id": "4cd142444cba4db2af6509afb893e41a" + } + ] + }, "m_PreviewData": { "serializedMesh": { "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", "m_Guid": "" - } + }, + "preventRotation": false }, "m_Path": "Shader Graph Tests/Procedural/Noise", - "m_ConcretePrecision": 0, - "m_ActiveOutputNodeGuidSerialized": "4cc36436-c68c-4ce4-a2aa-a494b11d28c4" -} \ No newline at end of file + "m_GraphPrecision": 0, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_ActiveTargets": [ + { + "m_Id": "cfd3d6119bd4427d8582b933206d0a45" + } + ] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "062c5d438c842084b0428a2e3ecfdbfd", + "m_Guid": { + "m_GuidSerialized": "56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f" + }, + "m_Name": "Scale", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_4789D2C8", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 500.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "0b25a3523227598091b1434e9494f9cc", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -29.0, + "y": 92.0, + "width": 91.0, + "height": 77.0 + } + }, + "m_Slots": [ + { + "m_Id": "a446d9c10a97428e8061ec2886e48a3c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "062c5d438c842084b0428a2e3ecfdbfd" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "0d2bc882a3b74cd7b77d3e49ef327e32", + "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": "98813bf60afb40cfb46464f8d8099e89" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "3dc41e0489004b7da08d6d69952109bd", + "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": "4cd142444cba4db2af6509afb893e41a", + "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": "d4a8945399ae4e1e8673c262ecbd822b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5111a2adb9c34a56a8b4028110ff1ebc", + "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.BlockNode", + "m_ObjectId": "54467354ecf54a038b1dca2b12be0efb", + "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": "3dc41e0489004b7da08d6d69952109bd" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5e8c470d39af0684ab1e2171faaa4798", + "m_Id": 1, + "m_DisplayName": "Scale", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Scale", + "m_StageCapability": 3, + "m_Value": 500.0, + "m_DefaultValue": 500.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.NoiseNode", + "m_ObjectId": "68d267c27f2c04868b6ed2ba967ac814", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Simple Noise", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 144.0, + "y": 67.0, + "width": 208.0, + "height": 302.0 + } + }, + "m_Slots": [ + { + "m_Id": "b2b8c121758ab481997951b085b51767" + }, + { + "m_Id": "5e8c470d39af0684ab1e2171faaa4798" + }, + { + "m_Id": "f5ee2544c094b781b619a6b4ef213286" + } + ], + "synonyms": [ + "value noise" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_HashType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "72536b94c2004470a57cdb8bfb22e872", + "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": 0, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget", + "m_ObjectId": "8c10af2140ef4d5dbd94daaabf5dbf1b" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "98813bf60afb40cfb46464f8d8099e89", + "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.BlockNode", + "m_ObjectId": "9ba2508748e64ceda29fe512ed978969", + "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": "72536b94c2004470a57cdb8bfb22e872" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a446d9c10a97428e8061ec2886e48a3c", + "m_Id": 0, + "m_DisplayName": "Scale", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "a796ac6934a345b5a87005ffc3132d56", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "062c5d438c842084b0428a2e3ecfdbfd" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "b0a7ab9a1c54498eaaf38d5fcec7dd6b", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "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.UVMaterialSlot", + "m_ObjectId": "b2b8c121758ab481997951b085b51767", + "m_Id": 0, + "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": [ + "X", + "Y" + ], + "m_Channel": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "b41183755b8243fe8adb1101317715c5", + "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": "b0a7ab9a1c54498eaaf38d5fcec7dd6b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "cfd3d6119bd4427d8582b933206d0a45", + "m_ActiveSubTarget": { + "m_Id": "8c10af2140ef4d5dbd94daaabf5dbf1b" + }, + "m_AllowMaterialOverride": false, + "m_SurfaceType": 0, + "m_ZTestMode": 4, + "m_ZWriteControl": 0, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": false, + "m_CastShadows": true, + "m_ReceiveShadows": true, + "m_CustomEditorGUI": "" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "d3db2f8d3bce4d6caba967fbaa333ae6", + "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": "5111a2adb9c34a56a8b4028110ff1ebc" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d4a8945399ae4e1e8673c262ecbd822b", + "m_Id": 0, + "m_DisplayName": "Alpha Clip Threshold", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AlphaClipThreshold", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "f5ee2544c094b781b619a6b4ef213286", + "m_Id": 2, + "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": [ + "X" + ] +} + diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.shadergraph.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.shadergraph.meta index 8bb603769fe..b2dfd7238b0 100644 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.shadergraph.meta +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoise.shadergraph.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7c9fded5521ed43469e52bd4a6286604 +guid: 84dd2a0c06a5ef7439cfc34945736b26 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.mat b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.mat new file mode 100644 index 00000000000..a9459e23db4 --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.mat @@ -0,0 +1,54 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SimpleNoiseLegacy + m_Shader: {fileID: -6465566751694194690, guid: 7c9fded5521ed43469e52bd4a6286604, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - 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: + - Vector1_4789D2C8: 175 + - _QueueControl: 0 + - _QueueOffset: 0 + m_Colors: [] + m_BuildTextureStacks: [] +--- !u!114 &7816165448951020941 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.mat.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.mat.meta new file mode 100644 index 00000000000..046cef3f2ab --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ddf3085d56cfce5469d366a091563ea2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.shadergraph b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.shadergraph new file mode 100644 index 00000000000..98d3875bf20 --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.shadergraph @@ -0,0 +1,55 @@ +{ + "m_SerializedProperties": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.Vector1ShaderProperty" + }, + "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f\"\n },\n \"m_Name\": \"Scale\",\n \"m_DefaultReferenceName\": \"Vector1_4789D2C8\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_Hidden\": false,\n \"m_Value\": 500.0,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" + } + ], + "m_SerializableNodes": [ + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"4cc36436-c68c-4ce4-a2aa-a494b11d28c4\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 456.0,\n \"y\": 43.0,\n \"width\": 200.0,\n \"height\": 149.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 0.5,\\n \\\"z\\\": 0.5\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.Universal.UniversalUnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddVelocityChange\": false\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.PropertyNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"02125932-fc0a-42d0-83d4-dfbd3cb77fe6\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -29.0,\n \"y\": 92.0,\n \"width\": 91.0,\n \"height\": 77.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Scale\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f\"\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.ShaderGraph.NoiseNode" + }, + "JSONnodeData": "{\n \"m_GuidSerialized\": \"5b5b6fde-fc16-4ee8-b292-49f899cc4b09\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Simple Noise\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 144.0,\n \"y\": 67.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 1\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Scale\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Scale\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 500.0,\\n \\\"m_DefaultValue\\\": 500.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + } + ], + "m_Groups": [], + "m_StickyNotes": [], + "m_SerializableEdges": [ + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"5b5b6fde-fc16-4ee8-b292-49f899cc4b09\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4cc36436-c68c-4ce4-a2aa-a494b11d28c4\"\n }\n}" + }, + { + "typeInfo": { + "fullName": "UnityEditor.Graphing.Edge" + }, + "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"02125932-fc0a-42d0-83d4-dfbd3cb77fe6\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"5b5b6fde-fc16-4ee8-b292-49f899cc4b09\"\n }\n}" + } + ], + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + } + }, + "m_Path": "Shader Graph Tests/Procedural/Noise", + "m_ConcretePrecision": 0, + "m_ActiveOutputNodeGuidSerialized": "4cc36436-c68c-4ce4-a2aa-a494b11d28c4" +} \ No newline at end of file diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.shadergraph.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.shadergraph.meta new file mode 100644 index 00000000000..8bb603769fe --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/SimpleNoiseLegacy.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7c9fded5521ed43469e52bd4a6286604 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.mat b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.mat index e7793296f18..ec9d64cc956 100644 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.mat +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Voronoi - m_Shader: {fileID: -6465566751694194690, guid: b3452c9b2f7775f42bef08c27cc4b7bb, + m_Shader: {fileID: -6465566751694194690, guid: 04949846981f7144cb78a99669581db6, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 @@ -21,8 +21,37 @@ Material: - MOTIONVECTORS m_SavedProperties: serializedVersion: 3 - m_TexEnvs: [] + m_TexEnvs: + - 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: - Vector1_4789D2C8: 2 - Vector1_C011EF11: 8 + - _QueueControl: 0 + - _QueueOffset: 0 m_Colors: [] + m_BuildTextureStacks: [] +--- !u!114 &6220380539752857763 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.mat.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.mat.meta index 7bc78e4d292..5320d229f4e 100644 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.mat.meta +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 26459e0ffe8ad2c438db2272a289ddb0 +guid: 3bb152fc4e436d34880dfadf82f1df87 NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.shadergraph b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.shadergraph index 0ee8d96955e..f9c5eaf8267 100644 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.shadergraph +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.shadergraph @@ -1,115 +1,762 @@ { - "m_SerializedProperties": [ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "2d1fea09033b4c56a6c75334362148bb", + "m_Properties": [ { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.Vector1ShaderProperty" - }, - "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f\"\n },\n \"m_Name\": \"AngleOffset\",\n \"m_DefaultReferenceName\": \"Vector1_4789D2C8\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_Hidden\": false,\n \"m_Value\": 2.0,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" + "m_Id": "103fa4d42d7783859b55d93c2182a01c" }, { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.Vector1ShaderProperty" - }, - "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"e9a69864-c691-467f-a5cd-8a39cc80154b\"\n },\n \"m_Name\": \"CellDensity\",\n \"m_DefaultReferenceName\": \"Vector1_C011EF11\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_Hidden\": false,\n \"m_Value\": 8.0,\n \"m_FloatType\": 0,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}" + "m_Id": "411742fd7a1f908c90b2c7afa541729d" } ], - "m_SerializableNodes": [ + "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.UnlitMasterNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"4cc36436-c68c-4ce4-a2aa-a494b11d28c4\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Unlit Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 867.0,\n \"y\": 33.0,\n \"width\": 200.0,\n \"height\": 149.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Color\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Color\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 0.5,\\n \\\"z\\\": 0.5\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.Universal.UniversalUnlitSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false,\n \"m_AddVelocityChange\": false\n}" + "m_Id": "4299b7deefc24dad82b15aafdb6d9127" + } + ], + "m_Nodes": [ + { + "m_Id": "a01d8fdb24f53c88955910d9dd66a2fd" }, { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.PropertyNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"0d61db42-0850-4ecd-aaa2-8422b6ad75e8\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -112.0,\n \"y\": 93.0,\n \"width\": 109.0,\n \"height\": 77.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"AngleOffset\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f\"\n}" + "m_Id": "278dcc8538231d8fb182837fec22bb94" }, { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.PositionNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"06113b63-9e0d-45ee-9ab8-714c3d7127bc\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Position\",\n \"m_NodeVersion\": 1,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 107.0,\n \"y\": -251.0,\n \"width\": 208.0,\n \"height\": 311.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 1,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Space\": 0\n}" + "m_Id": "65925bb9f2d9f889b04da35c0914b145" }, { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.AddNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"c0a944a3-4b41-4330-aca6-39548bd9c2b0\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Add\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 412.0,\n \"y\": -16.0,\n \"width\": 122.0,\n \"height\": 118.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.800000011920929,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + "m_Id": "e8943d8b50454864be35064626794cf6" }, { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.MultiplyNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"eeef4488-5809-44a7-b28d-75e117eb6bab\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 637.0,\n \"y\": -97.0,\n \"width\": 122.0,\n \"height\": 118.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 2.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + "m_Id": "83c6957d2afd4ab7a1f9e025ab00bddc" }, { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.PropertyNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"7bf0b270-e916-4363-816e-57a30975e887\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -113.0,\n \"y\": 172.0,\n \"width\": 108.0,\n \"height\": 77.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"CellDensity\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"e9a69864-c691-467f-a5cd-8a39cc80154b\"\n}" + "m_Id": "bf6aa8bed468480c8da359b030a53888" }, { - "typeInfo": { - "fullName": "UnityEditor.ShaderGraph.VoronoiNode" - }, - "JSONnodeData": "{\n \"m_GuidSerialized\": \"f34e1dad-8cf4-4035-81f6-75baeeccdc58\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Voronoi\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 109.0,\n \"y\": 88.0,\n \"width\": 208.0,\n \"height\": 326.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Angle Offset\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AngleOffset\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 2.0,\\n \\\"m_DefaultValue\\\": 2.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Cell Density\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"CellDensity\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 5.0,\\n \\\"m_DefaultValue\\\": 5.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Cells\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Cells\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}" + "m_Id": "133be9a8622c4f18a555f72926a21e37" + }, + { + "m_Id": "e6c6fb88e55d45b7973bacc96d624b6c" } ], - "m_Groups": [], - "m_StickyNotes": [], - "m_SerializableEdges": [ + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" + "m_OutputSlot": { + "m_Node": { + "m_Id": "278dcc8538231d8fb182837fec22bb94" + }, + "m_SlotId": 0 }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"c0a944a3-4b41-4330-aca6-39548bd9c2b0\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"eeef4488-5809-44a7-b28d-75e117eb6bab\"\n }\n}" + "m_InputSlot": { + "m_Node": { + "m_Id": "65925bb9f2d9f889b04da35c0914b145" + }, + "m_SlotId": 2 + } }, { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" + "m_OutputSlot": { + "m_Node": { + "m_Id": "65925bb9f2d9f889b04da35c0914b145" + }, + "m_SlotId": 3 }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"06113b63-9e0d-45ee-9ab8-714c3d7127bc\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"eeef4488-5809-44a7-b28d-75e117eb6bab\"\n }\n}" + "m_InputSlot": { + "m_Node": { + "m_Id": "133be9a8622c4f18a555f72926a21e37" + }, + "m_SlotId": 0 + } }, { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" + "m_OutputSlot": { + "m_Node": { + "m_Id": "a01d8fdb24f53c88955910d9dd66a2fd" + }, + "m_SlotId": 0 }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"eeef4488-5809-44a7-b28d-75e117eb6bab\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 9,\n \"m_NodeGUIDSerialized\": \"4cc36436-c68c-4ce4-a2aa-a494b11d28c4\"\n }\n}" + "m_InputSlot": { + "m_Node": { + "m_Id": "65925bb9f2d9f889b04da35c0914b145" + }, + "m_SlotId": 1 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 867.0, + "y": 33.0 }, - { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" + "m_Blocks": [ + { + "m_Id": "e8943d8b50454864be35064626794cf6" + }, + { + "m_Id": "83c6957d2afd4ab7a1f9e025ab00bddc" }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"0d61db42-0850-4ecd-aaa2-8422b6ad75e8\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"f34e1dad-8cf4-4035-81f6-75baeeccdc58\"\n }\n}" + { + "m_Id": "bf6aa8bed468480c8da359b030a53888" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 867.0, + "y": 233.0 }, - { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" + "m_Blocks": [ + { + "m_Id": "133be9a8622c4f18a555f72926a21e37" }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"7bf0b270-e916-4363-816e-57a30975e887\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"f34e1dad-8cf4-4035-81f6-75baeeccdc58\"\n }\n}" + { + "m_Id": "e6c6fb88e55d45b7973bacc96d624b6c" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" }, + "preventRotation": false + }, + "m_Path": "Shader Graph Tests/Procedural/Noise", + "m_GraphPrecision": 0, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_ActiveTargets": [ { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" - }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 3,\n \"m_NodeGUIDSerialized\": \"f34e1dad-8cf4-4035-81f6-75baeeccdc58\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"4cc36436-c68c-4ce4-a2aa-a494b11d28c4\"\n }\n}" + "m_Id": "1514afc1d4494970980222d3bc7a07b5" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget", + "m_ObjectId": "099993786d1e4f149a170eb1f19a74c1" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "103fa4d42d7783859b55d93c2182a01c", + "m_Guid": { + "m_GuidSerialized": "56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f" + }, + "m_Name": "AngleOffset", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_4789D2C8", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 2.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "133be9a8622c4f18a555f72926a21e37", + "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": "ef739ee075ec4bcd8d17cb1061eb1c8f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "1514afc1d4494970980222d3bc7a07b5", + "m_ActiveSubTarget": { + "m_Id": "099993786d1e4f149a170eb1f19a74c1" + }, + "m_AllowMaterialOverride": false, + "m_SurfaceType": 0, + "m_ZTestMode": 4, + "m_ZWriteControl": 0, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": false, + "m_CastShadows": true, + "m_ReceiveShadows": true, + "m_CustomEditorGUI": "" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "241ca3a2c1d21086929a9ed4732c186b", + "m_Id": 0, + "m_DisplayName": "AngleOffset", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "255a072f35d61985a98a136fd5b192f0", + "m_Id": 2, + "m_DisplayName": "CellDensity", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "CellDensity", + "m_StageCapability": 3, + "m_Value": 5.0, + "m_DefaultValue": 5.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "278dcc8538231d8fb182837fec22bb94", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 287.9999694824219, + "y": 381.0, + "width": 134.0, + "height": 34.000030517578128 + } + }, + "m_Slots": [ + { + "m_Id": "803f6549c0a536829a48cd6ff15368f6" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "411742fd7a1f908c90b2c7afa541729d" + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "411742fd7a1f908c90b2c7afa541729d", + "m_Guid": { + "m_GuidSerialized": "e9a69864-c691-467f-a5cd-8a39cc80154b" + }, + "m_Name": "CellDensity", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_C011EF11", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 8.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "4299b7deefc24dad82b15aafdb6d9127", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "103fa4d42d7783859b55d93c2182a01c" }, { - "typeInfo": { - "fullName": "UnityEditor.Graphing.Edge" - }, - "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 4,\n \"m_NodeGUIDSerialized\": \"f34e1dad-8cf4-4035-81f6-75baeeccdc58\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"c0a944a3-4b41-4330-aca6-39548bd9c2b0\"\n }\n}" + "m_Id": "411742fd7a1f908c90b2c7afa541729d" + } + ] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.VoronoiNode", + "m_ObjectId": "65925bb9f2d9f889b04da35c0914b145", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Voronoi", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 504.9999694824219, + "y": 233.0, + "width": 208.00003051757813, + "height": 361.0 + } + }, + "m_Slots": [ + { + "m_Id": "70f42409a57a8c8f8ca8fd14135ea96b" + }, + { + "m_Id": "7a70817954b2d58fa0d82ccf5f9f8434" + }, + { + "m_Id": "255a072f35d61985a98a136fd5b192f0" + }, + { + "m_Id": "927df081f0582c8eb39391b532d54b2a" + }, + { + "m_Id": "65a4a31412fba786bf08a315c6f02b1e" } ], - "m_PreviewData": { - "serializedMesh": { - "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", - "m_Guid": "" + "synonyms": [ + "worley noise" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_HashType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "65a4a31412fba786bf08a315c6f02b1e", + "m_Id": 4, + "m_DisplayName": "Cells", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Cells", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "6f0e548db520466ba950100ba3e7e143", + "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": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "70f42409a57a8c8f8ca8fd14135ea96b", + "m_Id": 0, + "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": [ + "X", + "Y" + ], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "74332cb2b9174c0a8fd7445759ade6cd", + "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.Vector1MaterialSlot", + "m_ObjectId": "7a70817954b2d58fa0d82ccf5f9f8434", + "m_Id": 1, + "m_DisplayName": "AngleOffset", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AngleOffset", + "m_StageCapability": 3, + "m_Value": 2.0, + "m_DefaultValue": 2.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "803f6549c0a536829a48cd6ff15368f6", + "m_Id": 0, + "m_DisplayName": "CellDensity", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "80be1028a5224d81b60f11b4db1b7c54", + "m_Id": 0, + "m_DisplayName": "Alpha Clip Threshold", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AlphaClipThreshold", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "83c6957d2afd4ab7a1f9e025ab00bddc", + "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_Path": "Shader Graph Tests/Procedural/Noise", - "m_ConcretePrecision": 0, - "m_ActiveOutputNodeGuidSerialized": "4cc36436-c68c-4ce4-a2aa-a494b11d28c4" -} \ No newline at end of file + "m_Slots": [ + { + "m_Id": "74332cb2b9174c0a8fd7445759ade6cd" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "927df081f0582c8eb39391b532d54b2a", + "m_Id": 3, + "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": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "a01d8fdb24f53c88955910d9dd66a2fd", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 288.9999694824219, + "y": 302.0, + "width": 138.00006103515626, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "241ca3a2c1d21086929a9ed4732c186b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "103fa4d42d7783859b55d93c2182a01c" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "bf6aa8bed468480c8da359b030a53888", + "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": "6f0e548db520466ba950100ba3e7e143" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "cfa0fcae45654ce6bc1e664efb1b2fbe", + "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.BlockNode", + "m_ObjectId": "e6c6fb88e55d45b7973bacc96d624b6c", + "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": "80be1028a5224d81b60f11b4db1b7c54" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "e8943d8b50454864be35064626794cf6", + "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": "cfa0fcae45654ce6bc1e664efb1b2fbe" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "ef739ee075ec4bcd8d17cb1061eb1c8f", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.shadergraph.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.shadergraph.meta index c7e54c5e126..a295fcc3e6b 100644 --- a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.shadergraph.meta +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/Voronoi.shadergraph.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b3452c9b2f7775f42bef08c27cc4b7bb +guid: 04949846981f7144cb78a99669581db6 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.mat b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.mat new file mode 100644 index 00000000000..7f066b21aa5 --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.mat @@ -0,0 +1,57 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: VoronoiLegacy + m_Shader: {fileID: -6465566751694194690, guid: b3452c9b2f7775f42bef08c27cc4b7bb, + type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + MotionVector: User + disabledShaderPasses: + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - 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: + - Vector1_4789D2C8: 2 + - Vector1_C011EF11: 8 + - _QueueControl: 0 + - _QueueOffset: 0 + m_Colors: [] + m_BuildTextureStacks: [] +--- !u!114 &6220380539752857763 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 5 diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.mat.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.mat.meta new file mode 100644 index 00000000000..7bc78e4d292 --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 26459e0ffe8ad2c438db2272a289ddb0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.shadergraph b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.shadergraph new file mode 100644 index 00000000000..895df6cc8b1 --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.shadergraph @@ -0,0 +1,762 @@ +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "2d1fea09033b4c56a6c75334362148bb", + "m_Properties": [ + { + "m_Id": "103fa4d42d7783859b55d93c2182a01c" + }, + { + "m_Id": "411742fd7a1f908c90b2c7afa541729d" + } + ], + "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "4299b7deefc24dad82b15aafdb6d9127" + } + ], + "m_Nodes": [ + { + "m_Id": "a01d8fdb24f53c88955910d9dd66a2fd" + }, + { + "m_Id": "278dcc8538231d8fb182837fec22bb94" + }, + { + "m_Id": "65925bb9f2d9f889b04da35c0914b145" + }, + { + "m_Id": "e8943d8b50454864be35064626794cf6" + }, + { + "m_Id": "83c6957d2afd4ab7a1f9e025ab00bddc" + }, + { + "m_Id": "bf6aa8bed468480c8da359b030a53888" + }, + { + "m_Id": "133be9a8622c4f18a555f72926a21e37" + }, + { + "m_Id": "e6c6fb88e55d45b7973bacc96d624b6c" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "278dcc8538231d8fb182837fec22bb94" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "65925bb9f2d9f889b04da35c0914b145" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "65925bb9f2d9f889b04da35c0914b145" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "133be9a8622c4f18a555f72926a21e37" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a01d8fdb24f53c88955910d9dd66a2fd" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "65925bb9f2d9f889b04da35c0914b145" + }, + "m_SlotId": 1 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 867.0, + "y": 33.0 + }, + "m_Blocks": [ + { + "m_Id": "e8943d8b50454864be35064626794cf6" + }, + { + "m_Id": "83c6957d2afd4ab7a1f9e025ab00bddc" + }, + { + "m_Id": "bf6aa8bed468480c8da359b030a53888" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 867.0, + "y": 233.0 + }, + "m_Blocks": [ + { + "m_Id": "133be9a8622c4f18a555f72926a21e37" + }, + { + "m_Id": "e6c6fb88e55d45b7973bacc96d624b6c" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "preventRotation": false + }, + "m_Path": "Shader Graph Tests/Procedural/Noise", + "m_GraphPrecision": 0, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_ActiveTargets": [ + { + "m_Id": "1514afc1d4494970980222d3bc7a07b5" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget", + "m_ObjectId": "099993786d1e4f149a170eb1f19a74c1" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "103fa4d42d7783859b55d93c2182a01c", + "m_Guid": { + "m_GuidSerialized": "56571331-2d1b-4c4a-b4d7-8cc8a3a0b45f" + }, + "m_Name": "AngleOffset", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_4789D2C8", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 2.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "133be9a8622c4f18a555f72926a21e37", + "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": "ef739ee075ec4bcd8d17cb1061eb1c8f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "1514afc1d4494970980222d3bc7a07b5", + "m_ActiveSubTarget": { + "m_Id": "099993786d1e4f149a170eb1f19a74c1" + }, + "m_AllowMaterialOverride": false, + "m_SurfaceType": 0, + "m_ZTestMode": 4, + "m_ZWriteControl": 0, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": false, + "m_CastShadows": true, + "m_ReceiveShadows": true, + "m_CustomEditorGUI": "" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "241ca3a2c1d21086929a9ed4732c186b", + "m_Id": 0, + "m_DisplayName": "AngleOffset", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "255a072f35d61985a98a136fd5b192f0", + "m_Id": 2, + "m_DisplayName": "CellDensity", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "CellDensity", + "m_StageCapability": 3, + "m_Value": 5.0, + "m_DefaultValue": 5.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "278dcc8538231d8fb182837fec22bb94", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 287.9999694824219, + "y": 381.0, + "width": 134.0, + "height": 34.000030517578128 + } + }, + "m_Slots": [ + { + "m_Id": "803f6549c0a536829a48cd6ff15368f6" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "411742fd7a1f908c90b2c7afa541729d" + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "411742fd7a1f908c90b2c7afa541729d", + "m_Guid": { + "m_GuidSerialized": "e9a69864-c691-467f-a5cd-8a39cc80154b" + }, + "m_Name": "CellDensity", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_C011EF11", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 8.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "4299b7deefc24dad82b15aafdb6d9127", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "103fa4d42d7783859b55d93c2182a01c" + }, + { + "m_Id": "411742fd7a1f908c90b2c7afa541729d" + } + ] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.VoronoiNode", + "m_ObjectId": "65925bb9f2d9f889b04da35c0914b145", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Voronoi", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 504.9999694824219, + "y": 233.0, + "width": 208.00003051757813, + "height": 361.0 + } + }, + "m_Slots": [ + { + "m_Id": "70f42409a57a8c8f8ca8fd14135ea96b" + }, + { + "m_Id": "7a70817954b2d58fa0d82ccf5f9f8434" + }, + { + "m_Id": "255a072f35d61985a98a136fd5b192f0" + }, + { + "m_Id": "927df081f0582c8eb39391b532d54b2a" + }, + { + "m_Id": "65a4a31412fba786bf08a315c6f02b1e" + } + ], + "synonyms": [ + "worley noise" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_HashType": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "65a4a31412fba786bf08a315c6f02b1e", + "m_Id": 4, + "m_DisplayName": "Cells", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Cells", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "6f0e548db520466ba950100ba3e7e143", + "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": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "70f42409a57a8c8f8ca8fd14135ea96b", + "m_Id": 0, + "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": [ + "X", + "Y" + ], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "74332cb2b9174c0a8fd7445759ade6cd", + "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.Vector1MaterialSlot", + "m_ObjectId": "7a70817954b2d58fa0d82ccf5f9f8434", + "m_Id": 1, + "m_DisplayName": "AngleOffset", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AngleOffset", + "m_StageCapability": 3, + "m_Value": 2.0, + "m_DefaultValue": 2.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "803f6549c0a536829a48cd6ff15368f6", + "m_Id": 0, + "m_DisplayName": "CellDensity", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "80be1028a5224d81b60f11b4db1b7c54", + "m_Id": 0, + "m_DisplayName": "Alpha Clip Threshold", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AlphaClipThreshold", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "83c6957d2afd4ab7a1f9e025ab00bddc", + "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": "74332cb2b9174c0a8fd7445759ade6cd" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "927df081f0582c8eb39391b532d54b2a", + "m_Id": 3, + "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": [ + "X" + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "a01d8fdb24f53c88955910d9dd66a2fd", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 288.9999694824219, + "y": 302.0, + "width": 138.00006103515626, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "241ca3a2c1d21086929a9ed4732c186b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "103fa4d42d7783859b55d93c2182a01c" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "bf6aa8bed468480c8da359b030a53888", + "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": "6f0e548db520466ba950100ba3e7e143" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "cfa0fcae45654ce6bc1e664efb1b2fbe", + "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.BlockNode", + "m_ObjectId": "e6c6fb88e55d45b7973bacc96d624b6c", + "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": "80be1028a5224d81b60f11b4db1b7c54" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "e8943d8b50454864be35064626794cf6", + "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": "cfa0fcae45654ce6bc1e664efb1b2fbe" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "ef739ee075ec4bcd8d17cb1061eb1c8f", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + diff --git a/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.shadergraph.meta b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.shadergraph.meta new file mode 100644 index 00000000000..c7e54c5e126 --- /dev/null +++ b/TestProjects/ShaderGraph/Assets/Testing/IntegrationTests/Graphs/Procedural/Noise/VoronoiLegacy.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b3452c9b2f7775f42bef08c27cc4b7bb +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl new file mode 100644 index 00000000000..44678b0f452 --- /dev/null +++ b/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl @@ -0,0 +1,227 @@ +void Hash_Tchou_2_1_uint(uint2 v, out uint o) +{ + // ~6 alu (2 mul) + v.y ^= 1103515245U; + v.x += v.y; + v.x *= v.y; + v.x ^= v.x >> 5u; + v.x *= 0x27d4eb2du; + o = v.x; +} + +void Hash_Tchou_2_1_float(float2 i, out float o) +{ + uint r; + uint2 v = (uint2) (int2) round(i); + Hash_Tchou_2_1_uint(v, r); + o = r * (1.0 / float(0xffffffff)); +} + +void Hash_Tchou_2_1_half(half2 i, out half o) +{ + uint r; + uint2 v = (uint2) (int2) round(i); + Hash_Tchou_2_1_uint(v, r); + o = r * (1.0 / float(0xffffffff)); +} + +void Hash_Tchou_2_3_uint(uint2 q, out uint3 o) +{ + // ~10 alu (2 mul) + uint3 v; + v.xy = q; + v.y ^= 1103515245U; + v.x += v.y; + v.x *= v.y; + v.x ^= v.x >> 5u; + v.x *= 0x27d4eb2du; + v.y ^= (v.x << 3u); + v.z = v.x ^ (v.y << 5u); + o = v; +} + +void Hash_Tchou_2_3_float(float2 i, out float3 o) +{ + uint3 r; + uint2 v = (uint2) (int2) round(i); + Hash_Tchou_2_3_uint(v, r); + o = r * (1.0 / float(0xffffffff)); +} + +void Hash_Tchou_2_3_half(half2 i, out half3 o) +{ + uint3 r; + uint2 v = (uint2) (int2) round(i); + Hash_Tchou_2_3_uint(v, r); + o = r * (1.0 / float(0xffffffff)); +} + +void Hash_Tchou_2_2_uint(uint2 v, out uint2 o) +{ + // ~8 alu (2 mul) + v.y ^= 1103515245U; + v.x += v.y; + v.x *= v.y; + v.x ^= v.x >> 5u; + v.x *= 0x27d4eb2du; + v.y ^= (v.x << 3u); + o = v; +} + +void Hash_Tchou_2_2_float(float2 i, out float2 o) +{ + uint2 r; + uint2 v = (uint2) (int2) round(i); + Hash_Tchou_2_2_uint(v, r); + o = r * (1.0 / float(0xffffffff)); +} + +void Hash_Tchou_2_2_half(half2 i, out half2 o) +{ + uint2 r; + uint2 v = (uint2) (int2) round(i); + Hash_Tchou_2_2_uint(v, r); + o = r * (1.0 / float(0xffffffff)); +} + +void Hash_Tchou_3_1_uint(uint3 v, out uint o) +{ + // ~15 alu (3 mul) + v.x ^= 1103515245U; + v.y ^= v.x + v.z; + v.y = v.y * 134775813; + v.z += v.x ^ v.y; + v.y += v.x ^ v.z; + v.x += v.y * v.z; + v.x = v.x * 0x27d4eb2du; + o = v.x; +} + +void Hash_Tchou_3_1_float(float3 i, out float o) +{ + uint r; + uint3 v = (uint3) (int3) round(i); + Hash_Tchou_3_1_uint(v, r); + o = r * (1.0 / float(0xffffffff)); +} + +void Hash_Tchou_3_1_half(half3 i, out half o) +{ + uint r; + uint3 v = (uint3) (int3) round(i); + Hash_Tchou_3_1_uint(v, r); + o = r * (1.0 / float(0xffffffff)); +} + +void Hash_Tchou_3_3_uint(uint3 v, out uint3 o) +{ + // ~15 alu (3 mul) + v.x ^= 1103515245U; + v.y ^= v.x + v.z; + v.y = v.y * 134775813; + v.z += v.x ^ v.y; + v.y += v.x ^ v.z; + v.x += v.y * v.z; + v.x = v.x * 0x27d4eb2du; + v.z ^= v.x << 3; + v.y += v.z << 3; + o = v; +} + +void Hash_Tchou_3_3_float(float3 i, out float3 o) +{ + uint3 r, v = (uint3) (int3) round(i); + Hash_Tchou_3_3_uint(v, r); + o = r * (1.0 / float(0xffffffff)); +} + +void Hash_Tchou_3_3_half(half3 i, out half3 o) +{ + uint3 r, v = (uint3) (int3) round(i); + Hash_Tchou_3_3_uint(v, r); + o = r * (1.0 / float(0xffffffff)); +} + +void Hash_LegacySine_2_1_float(float2 i, out float o) +{ + float angle = dot(i, float2(12.9898, 78.233)); +#if defined(SHADER_API_MOBILE) && (defined(SHADER_API_GLES) || defined(SHADER_API_GLES3) || defined(SHADER_API_VULKAN)) + // 'sin()' has bad precision on Mali GPUs for inputs > 10000 + angle = fmod(angle, TWO_PI); // Avoid large inputs to sin() +#endif + o = frac(sin(angle)*43758.5453); +} + +void Hash_LegacySine_2_1_half(half2 i, out half o) +{ + half angle = dot(i, half2(12.9898, 78.233)); +#if defined(SHADER_API_MOBILE) && (defined(SHADER_API_GLES) || defined(SHADER_API_GLES3) || defined(SHADER_API_VULKAN)) + // 'sin()' has bad precision on Mali GPUs for inputs > 10000 + angle = fmod(angle, TWO_PI); // Avoid large inputs to sin() +#endif + o = frac(sin(angle)*43758.5453); +} + +void Hash_BetterSine_2_1_float(float2 i, out float o) +{ + float angle = dot(i, float2(12.9898, 78.233) / 1000.0f); +#if defined(SHADER_API_MOBILE) && (defined(SHADER_API_GLES) || defined(SHADER_API_GLES3) || defined(SHADER_API_VULKAN)) + // 'sin()' has bad precision on Mali GPUs for inputs > 10000 + angle = fmod(angle, TWO_PI); // Avoid large inputs to sin() +#endif + o = frac(sin(angle)*43758.5453); +} + +void Hash_BetterSine_2_1_half(half2 i, out half o) +{ + float angle = dot(i, half2(12.9898, 78.233) / 1000.0f); +#if defined(SHADER_API_MOBILE) && (defined(SHADER_API_GLES) || defined(SHADER_API_GLES3) || defined(SHADER_API_VULKAN)) + // 'sin()' has bad precision on Mali GPUs for inputs > 10000 + angle = fmod(angle, TWO_PI); // Avoid large inputs to sin() +#endif + o = frac(sin(angle)*43758.5453); +} + +void Hash_LegacySine_2_2_float(float2 i, out float2 o) +{ + float2x2 m = float2x2(15.27, 47.63, 99.41, 89.98); + float2 angles = mul(i, m); +#if defined(SHADER_API_MOBILE) && (defined(SHADER_API_GLES) || defined(SHADER_API_GLES3) || defined(SHADER_API_VULKAN)) + // 'sin()' has bad precision on Mali GPUs for inputs > 10000 + angles = fmod(angles, TWO_PI); // Avoid large inputs to sin() +#endif + o = frac(sin(angles)); +} + +void Hash_LegacySine_2_2_half(half2 i, out half2 o) +{ + half2x2 m = half2x2(15.27, 47.63, 99.41, 89.98); + half2 angles = mul(i, m); +#if defined(SHADER_API_MOBILE) && (defined(SHADER_API_GLES) || defined(SHADER_API_GLES3) || defined(SHADER_API_VULKAN)) + // 'sin()' has bad precision on Mali GPUs for inputs > 10000 + angles = fmod(angles, TWO_PI); // Avoid large inputs to sin() +#endif + o = frac(sin(angles)); +} + +void Hash_LegacyMod_2_1_float(float2 i, out float o) +{ + // Permutation and hashing used in webgl-nosie goo.gl/pX7HtC + i = i % 289; + // need full precision, otherwise half overflows when p > 1 + float x = float(34 * i.x + 1) * i.x % 289 + i.y; + x = (34 * x + 1) * x % 289; + x = frac(x / 41) * 2 - 1; + o = x; +} + +void Hash_LegacyMod_2_1_half(half2 i, out half o) +{ + // Permutation and hashing used in webgl-nosie goo.gl/pX7HtC + i = i % 289; + // need full precision, otherwise half overflows when p > 1 + float x = float(34 * i.x + 1) * i.x % 289 + i.y; + x = (34 * x + 1) * x % 289; + x = frac(x / 41) * 2 - 1; + o = x; +} diff --git a/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl.meta b/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl.meta new file mode 100644 index 00000000000..62e7bd8c976 --- /dev/null +++ b/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0bf6c7395c05c624d92ebdff0dcc1a61 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/CHANGELOG.md b/com.unity.shadergraph/CHANGELOG.md index b89c94eebf7..8a29f019e10 100644 --- a/com.unity.shadergraph/CHANGELOG.md +++ b/com.unity.shadergraph/CHANGELOG.md @@ -131,6 +131,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed incorrect warning while using VFXTarget - Fixed a bug with Sprite Targets in ShaderGraph not rendering correctly in game view [1352225] - Fixed compilation problems on preview shader when using hybrid renderer v2 and property desc override Hybrid Per Instance +- Fixed noise nodes to use a deterministic integer hash, instead of platform dependent floating point hashes [1156544] ## [11.0.0] - 2020-10-21 diff --git a/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md b/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md index 10a205db737..888436fb50c 100644 --- a/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md +++ b/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md @@ -12,6 +12,12 @@ Generates a gradient, or [Perlin](https://en.wikipedia.org/wiki/Perlin_noise), n | Scale | Input | Float | None | Noise scale | | Out | Output | Float | None | Output value | +## Controls + +| Name | Type | Options | Description | +|:------------ |:-------------|:-----|:---| +| Hash Type | Dropdown | Deterministic, LegacyMod | Selects the hash function used to generate random numbers | + ## Generated Code Example The following example code represents one possible outcome of this node. diff --git a/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md b/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md index 05fd090e5d1..04111ca40f0 100644 --- a/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md +++ b/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md @@ -12,6 +12,12 @@ Generates a simple, or [Value](https://en.wikipedia.org/wiki/Value_noise), noise | Scale | Input | Float | None | Noise scale | | Out | Output | Float | None | Output value | +## Controls + +| Name | Type | Options | Description | +|:------------ |:-------------|:-----|:---| +| Hash Type | Dropdown | Deterministic, LegacySine | Selects the hash function used to generate random numbers | + ## Generated Code Example The following example code represents one possible outcome of this node. diff --git a/com.unity.shadergraph/Documentation~/Voronoi-Node.md b/com.unity.shadergraph/Documentation~/Voronoi-Node.md index 69a474cfc49..5b825155d53 100644 --- a/com.unity.shadergraph/Documentation~/Voronoi-Node.md +++ b/com.unity.shadergraph/Documentation~/Voronoi-Node.md @@ -14,6 +14,12 @@ Generates a Voronoi, or [Worley](https://en.wikipedia.org/wiki/Worley_noise), no | Out | Output | Float | None | Output noise value | | Cells | Output | Float | None | Raw cell data | +## Controls + +| Name | Type | Options | Description | +|:------------ |:-------------|:-----|:---| +| Hash Type | Dropdown | Deterministic, LegacySine | Selects the hash function used to generate random numbers | + ## Generated Code Example The following example code represents one possible outcome of this node. diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/GradientNoiseNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/GradientNoiseNode.cs index b3710c673b8..3553e4ddc4c 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/GradientNoiseNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/GradientNoiseNode.cs @@ -1,59 +1,154 @@ -using System.Reflection; +using System.Collections.Generic; +using UnityEditor.Graphing; +using UnityEditor.ShaderGraph.Drawing.Controls; +using UnityEditor.ShaderGraph.Internal; using UnityEngine; namespace UnityEditor.ShaderGraph { [Title("Procedural", "Noise", "Gradient Noise")] - class GradientNoiseNode : CodeFunctionNode + class GradientNoiseNode : AbstractMaterialNode, IGeneratesBodyCode, IGeneratesFunction, IMayRequireMeshUV { + // 0 original version + // 1 add deterministic noise option + public override int latestVersion => 1; + public override IEnumerable allowedNodeVersions => new int[] { 1 }; + + public const int UVSlotId = 0; + public const int ScaleSlotId = 1; + public const int OutSlotId = 2; + + const string kUVSlotName = "UV"; + const string kScaleSlotName = "Scale"; + const string kOutSlotName = "Out"; + public GradientNoiseNode() { name = "Gradient Noise"; synonyms = new string[] { "perlin noise" }; + UpdateNodeAfterDeserialization(); } - protected override MethodInfo GetFunctionToConvert() + public enum HashType + { + Deterministic, + LegacyMod, + }; + static readonly string[] kHashFunctionPrefix = + { + "Hash_Tchou_2_1_", + "Hash_LegacyMod_2_1_", + }; + + public override bool hasPreview => true; + + public sealed override void UpdateNodeAfterDeserialization() { - return GetType().GetMethod("Unity_GradientNoise", BindingFlags.Static | BindingFlags.NonPublic); + AddSlot(new UVMaterialSlot(UVSlotId, kUVSlotName, kUVSlotName, UVChannel.UV0)); + AddSlot(new Vector1MaterialSlot(ScaleSlotId, kScaleSlotName, kScaleSlotName, SlotType.Input, 10.0f)); + AddSlot(new Vector1MaterialSlot(OutSlotId, kOutSlotName, kOutSlotName, SlotType.Output, 0.0f)); + RemoveSlotsNameNotMatching(new[] { UVSlotId, ScaleSlotId, OutSlotId }); } - static string Unity_GradientNoise( - [Slot(0, Binding.MeshUV0)] Vector2 UV, - [Slot(1, Binding.None, 10, 10, 10, 10)] Vector1 Scale, - [Slot(2, Binding.None)] out Vector1 Out) + [SerializeField] + private HashType m_HashType = HashType.Deterministic; + + [EnumControl("Hash Type")] + public HashType hashType { - return -@" -{ - $precision2 p = UV * Scale; - $precision2 ip = floor(p); - $precision2 fp = frac(p); - $precision d00 = dot(Unity_GradientNoise_Dir_$precision(ip), fp); - $precision d01 = dot(Unity_GradientNoise_Dir_$precision(ip + $precision2(0, 1)), fp - $precision2(0, 1)); - $precision d10 = dot(Unity_GradientNoise_Dir_$precision(ip + $precision2(1, 0)), fp - $precision2(1, 0)); - $precision d11 = dot(Unity_GradientNoise_Dir_$precision(ip + $precision2(1, 1)), fp - $precision2(1, 1)); - fp = fp * fp * fp * (fp * (fp * 6 - 15) + 10); - Out = lerp(lerp(d00, d01, fp.y), lerp(d10, d11, fp.y), fp.x) + 0.5; -} -"; + get + { + if (((int)m_HashType < 0) || ((int)m_HashType >= kHashFunctionPrefix.Length)) + return (HashType)0; + return m_HashType; + } + set + { + if (m_HashType == value) + return; + + m_HashType = value; + Dirty(ModificationScope.Graph); + } } - public override void GenerateNodeFunction(FunctionRegistry registry, GenerationMode generationMode) + void IGeneratesFunction.GenerateNodeFunction(FunctionRegistry registry, GenerationMode generationMode) { - registry.ProvideFunction("Unity_GradientNoise_Dir_$precision", s => s.Append(@" -$precision2 Unity_GradientNoise_Dir_$precision($precision2 p) -{ - // Permutation and hashing used in webgl-nosie goo.gl/pX7HtC - p = p % 289; - // need full precision, otherwise half overflows when p > 1 - float x = float(34 * p.x + 1) * p.x % 289 + p.y; - x = (34 * x + 1) * x % 289; - x = frac(x / 41) * 2 - 1; - return normalize($precision2(x - floor(x + 0.5), abs(x) - 0.5)); -} -")); + registry.RequiresIncludePath("Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"); - base.GenerateNodeFunction(registry, generationMode); + var hashType = this.hashType; + var hashTypeString = hashType.ToString(); + var HashFunction = kHashFunctionPrefix[(int)hashType]; + + registry.ProvideFunction($"Unity_GradientNoise_{hashTypeString}_Dir_$precision", s => + { + s.AppendLine($"$precision2 Unity_GradientNoise_{hashTypeString}_Dir_$precision($precision2 p)"); + using (s.BlockScope()) + { + s.AppendLine($"$precision x; {HashFunction}$precision(p, x);"); + s.AppendLine("return normalize($precision2(x - floor(x + 0.5), abs(x) - 0.5));"); + } + }); + + registry.ProvideFunction($"Unity_GradientNoise_{hashTypeString}_$precision", s => + { + s.AppendLine($"void Unity_GradientNoise_{hashTypeString}_$precision ($precision2 UV, $precision3 Scale, out $precision Out)"); + using (s.BlockScope()) + { + s.AppendLine("$precision2 p = UV * Scale;"); + s.AppendLine("$precision2 ip = floor(p);"); + s.AppendLine("$precision2 fp = frac(p);"); + s.AppendLine($"$precision d00 = dot(Unity_GradientNoise_{hashTypeString}_Dir_$precision(ip), fp);"); + s.AppendLine($"$precision d01 = dot(Unity_GradientNoise_{hashTypeString}_Dir_$precision(ip + $precision2(0, 1)), fp - $precision2(0, 1));"); + s.AppendLine($"$precision d10 = dot(Unity_GradientNoise_{hashTypeString}_Dir_$precision(ip + $precision2(1, 0)), fp - $precision2(1, 0));"); + s.AppendLine($"$precision d11 = dot(Unity_GradientNoise_{hashTypeString}_Dir_$precision(ip + $precision2(1, 1)), fp - $precision2(1, 1));"); + s.AppendLine("fp = fp * fp * fp * (fp * (fp * 6 - 15) + 10);"); + s.AppendLine("Out = lerp(lerp(d00, d01, fp.y), lerp(d10, d11, fp.y), fp.x) + 0.5;"); + } + }); + } + + public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode) + { + var hashType = this.hashType; + var hashTypeString = hashType.ToString(); + string uv = GetSlotValue(UVSlotId, generationMode); + string scale = GetSlotValue(ScaleSlotId, generationMode); + string output = GetVariableNameForSlot(OutSlotId); + var outSlot = FindSlot(OutSlotId); + + sb.AppendLine($"{outSlot.concreteValueType.ToShaderString(PrecisionUtil.Token)} {output};"); + sb.AppendLine($"Unity_GradientNoise_{hashTypeString}_$precision({uv}, {scale}, {output});"); + } + + public bool RequiresMeshUV(UVChannel channel, ShaderStageCapability stageCapability) + { + using (var tempSlots = PooledList.Get()) + { + GetInputSlots(tempSlots); + var result = false; + foreach (var slot in tempSlots) + { + if (slot.RequiresMeshUV(channel)) + { + result = true; + break; + } + } + + tempSlots.Clear(); + return result; + } + } + + public override void OnAfterMultiDeserialize(string json) + { + if (sgVersion < 1) + { + // old nodes should select "LegacyMod" to replicate old behavior + hashType = HashType.LegacyMod; + ChangeVersion(1); + } } } } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs new file mode 100644 index 00000000000..25b0c0ecb46 --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs @@ -0,0 +1,131 @@ +using System.Reflection; +using UnityEditor.Graphing; +using UnityEditor.ShaderGraph.Drawing.Controls; +using UnityEngine; + +namespace UnityEditor.ShaderGraph +{ +/* + [Title("Procedural", "Noise", "Integer Hash")] + class IntegerHashNode : AbstractMaterialNode, IGeneratesBodyCode, IGeneratesFunction + { + public IntegerHashNode() + { + name = "Integer Hash"; + UpdateNodeAfterDeserialization(); + } + + public override bool hasPreview { get { return true; } } + + // Input slots + private const int kInputSlotId = 1; + private const string kInputSlotName = "Coord"; + + // Output slots + private const int kOutputSlotId = 0; + private const string kOutputSlotName = "Hash"; + + // Local state + public enum HashType + { + Tchou_2_1, + Tchou_2_3, + Tchou_3_1, + Tchou_3_3, + }; + + struct Description + { + public string functionName; + public int inputDimension; + public int outputDimension; + public Description(string f, int i, int o) { functionName = f; inputDimension = i; outputDimension = o; } + }; + + static Description[] k_hashDescriptions = + { + new Description("Hash_Tchou_2_1_float", 2, 1), + new Description("Hash_Tchou_2_3_float", 2, 3), + new Description("Hash_Tchou_3_1_float", 3, 1), + new Description("Hash_Tchou_3_3_float", 3, 3), + }; + + [SerializeField] + private HashType m_HashType = HashType.Tchou_2_3; + + [EnumControl("Hash")] + public HashType hashType + { + get + { + return m_HashType; + } + set + { + if (m_HashType == value) + return; + + m_HashType = value; + Dirty(ModificationScope.Topological); + UpdateNodeAfterDeserialization(); + } + } + + Description hashDescription => ((int) hashType >= 0 && (int) hashType < k_hashDescriptions.Length) ? k_hashDescriptions[(int)hashType] : k_hashDescriptions[0]; + + public MaterialSlot CreateVectorSlot(int dimension, int id, string name, SlotType slotType, Vector4 value = default) + { + MaterialSlot slot = null; + switch (dimension) + { + case 1: + slot = new Vector1MaterialSlot(id, name, name, slotType, value.x); + break; + case 2: + slot = new Vector2MaterialSlot(id, name, name, slotType, value); + break; + case 3: + slot = new Vector3MaterialSlot(id, name, name, slotType, value); + break; + case 4: + slot = new Vector4MaterialSlot(id, name, name, slotType, value); + break; + } + return slot; + } + + public sealed override void UpdateNodeAfterDeserialization() + { + var desc = hashDescription; + + MaterialSlot inputSlot = CreateVectorSlot(desc.inputDimension, kInputSlotId, kInputSlotName, SlotType.Input); + AddSlot(inputSlot); + + MaterialSlot outputSlot = CreateVectorSlot(desc.outputDimension, kOutputSlotId, kOutputSlotName, SlotType.Output); + AddSlot(outputSlot); + + RemoveSlotsNameNotMatching(new[] + { + kInputSlotId, + kOutputSlotId + }); + } + + public void GenerateNodeFunction(FunctionRegistry registry, GenerationMode generationMode) + { + registry.RequiresIncludePath("Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"); + } + + public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode) + { + var desc = hashDescription; + + var outputVar = GetVariableNameForSlot(kOutputSlotId); + var input = GetSlotValue(kInputSlotId, generationMode); + + sb.AppendLine($"$precision{desc.outputDimension} {outputVar};"); + sb.AppendLine($"{desc.functionName}({input}, {outputVar});"); + } + } +*/ +} diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs.meta b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs.meta new file mode 100644 index 00000000000..b09dcb224ff --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3bc89cefb774e064782582c2d3bc250b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/SimpleNoiseNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/SimpleNoiseNode.cs index 68961e84799..1dfa385c076 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/SimpleNoiseNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/SimpleNoiseNode.cs @@ -1,93 +1,167 @@ -using System.Reflection; +using System.Collections.Generic; +using UnityEditor.Graphing; +using UnityEditor.ShaderGraph.Drawing.Controls; +using UnityEditor.ShaderGraph.Internal; using UnityEngine; namespace UnityEditor.ShaderGraph { [Title("Procedural", "Noise", "Simple Noise")] - class NoiseNode : CodeFunctionNode + class NoiseNode : AbstractMaterialNode, IGeneratesBodyCode, IGeneratesFunction, IMayRequireMeshUV { + // 0 original version + // 1 add deterministic noise option + public override int latestVersion => 1; + public override IEnumerable allowedNodeVersions => new int[] { 1 }; + + public const int UVSlotId = 0; + public const int ScaleSlotId = 1; + public const int OutSlotId = 2; + + const string kUVSlotName = "UV"; + const string kScaleSlotName = "Scale"; + const string kOutSlotName = "Out"; + public NoiseNode() { name = "Simple Noise"; synonyms = new string[] { "value noise" }; + UpdateNodeAfterDeserialization(); } - protected override MethodInfo GetFunctionToConvert() + public enum HashType + { + Deterministic, + LegacySine, + }; + static readonly string[] kHashFunctionPrefix = + { + "Hash_Tchou_2_1_", + "Hash_LegacySine_2_1_", + }; + + public override bool hasPreview => true; + + public sealed override void UpdateNodeAfterDeserialization() { - return GetType().GetMethod("Unity_SimpleNoise", BindingFlags.Static | BindingFlags.NonPublic); + AddSlot(new UVMaterialSlot(UVSlotId, kUVSlotName, kUVSlotName, UVChannel.UV0)); + AddSlot(new Vector1MaterialSlot(ScaleSlotId, kScaleSlotName, kScaleSlotName, SlotType.Input, 500.0f)); + AddSlot(new Vector1MaterialSlot(OutSlotId, kOutSlotName, kOutSlotName, SlotType.Output, 0.0f)); + RemoveSlotsNameNotMatching(new[] { UVSlotId, ScaleSlotId, OutSlotId }); } - static string Unity_SimpleNoise( - [Slot(0, Binding.MeshUV0)] Vector2 UV, - [Slot(1, Binding.None, 500f, 500f, 500f, 500f)] Vector1 Scale, - [Slot(2, Binding.None)] out Vector1 Out) + [SerializeField] + private HashType m_HashType = HashType.Deterministic; + + [EnumControl("Hash Type")] + public HashType hashType { - return -@" -{ - $precision t = 0.0; + get + { + if (((int)m_HashType < 0) || ((int)m_HashType >= kHashFunctionPrefix.Length)) + return (HashType) 0; + return m_HashType; + } + set + { + if (m_HashType == value) + return; - $precision freq = pow(2.0, $precision(0)); - $precision amp = pow(0.5, $precision(3-0)); - t += Unity_SimpleNoise_ValueNoise_$precision($precision2(UV.x*Scale/freq, UV.y*Scale/freq))*amp; + m_HashType = value; + Dirty(ModificationScope.Graph); + } + } - freq = pow(2.0, $precision(1)); - amp = pow(0.5, $precision(3-1)); - t += Unity_SimpleNoise_ValueNoise_$precision($precision2(UV.x*Scale/freq, UV.y*Scale/freq))*amp; + void IGeneratesFunction.GenerateNodeFunction(FunctionRegistry registry, GenerationMode generationMode) + { + registry.RequiresIncludePath("Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"); - freq = pow(2.0, $precision(2)); - amp = pow(0.5, $precision(3-2)); - t += Unity_SimpleNoise_ValueNoise_$precision($precision2(UV.x*Scale/freq, UV.y*Scale/freq))*amp; + var hashType = this.hashType; + var hashTypeString = hashType.ToString(); + var HashFunction = kHashFunctionPrefix[(int) hashType]; - Out = t; -} -"; + registry.ProvideFunction($"Unity_SimpleNoise_ValueNoise_{hashTypeString}_$precision", s => + { + s.AppendLine($"$precision Unity_SimpleNoise_ValueNoise_{hashTypeString}_$precision ($precision2 uv)"); + using (s.BlockScope()) + { + s.AppendLine("$precision2 i = floor(uv);"); + s.AppendLine("$precision2 f = frac(uv);"); + s.AppendLine("f = f * f * (3.0 - 2.0 * f);"); + s.AppendLine("uv = abs(frac(uv) - 0.5);"); + s.AppendLine("$precision2 c0 = i + $precision2(0.0, 0.0);"); + s.AppendLine("$precision2 c1 = i + $precision2(1.0, 0.0);"); + s.AppendLine("$precision2 c2 = i + $precision2(0.0, 1.0);"); + s.AppendLine("$precision2 c3 = i + $precision2(1.0, 1.0);"); + s.AppendLine($"$precision r0; {HashFunction}$precision(c0, r0);"); + s.AppendLine($"$precision r1; {HashFunction}$precision(c1, r1);"); + s.AppendLine($"$precision r2; {HashFunction}$precision(c2, r2);"); + s.AppendLine($"$precision r3; {HashFunction}$precision(c3, r3);"); + s.AppendLine("$precision bottomOfGrid = lerp(r0, r1, f.x);"); + s.AppendLine("$precision topOfGrid = lerp(r2, r3, f.x);"); + s.AppendLine("$precision t = lerp(bottomOfGrid, topOfGrid, f.y);"); + s.AppendLine("return t;"); + } + }); + + registry.ProvideFunction($"Unity_SimpleNoise_" + hashTypeString + "_$precision", s => + { + s.AppendLine($"void Unity_SimpleNoise_{hashTypeString}_$precision($precision2 UV, $precision Scale, out $precision Out)"); + using (s.BlockScope()) + { + s.AppendLine("$precision freq, amp;"); + s.AppendLine("Out = 0.0f;"); + for (int octave = 0; octave < 3; octave++) + { + s.AppendLine($"freq = pow(2.0, $precision({octave}));"); + s.AppendLine($"amp = pow(0.5, $precision(3-{octave}));"); + s.AppendLine($"Out += Unity_SimpleNoise_ValueNoise_{hashTypeString}_$precision($precision2(UV.xy*(Scale/freq)))*amp;"); + } + } + }); } - public override void GenerateNodeFunction(FunctionRegistry registry, GenerationMode generationMode) + public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode) { - registry.ProvideFunction("Unity_SimpleNoise_RandomValue_$precision", s => s.Append(@" -inline $precision Unity_SimpleNoise_RandomValue_$precision ($precision2 uv) -{ - $precision angle = dot(uv, $precision2(12.9898, 78.233)); - #if defined(SHADER_API_MOBILE) && (defined(SHADER_API_GLES) || defined(SHADER_API_GLES3) || defined(SHADER_API_VULKAN)) - // 'sin()' has bad precision on Mali GPUs for inputs > 10000 - angle = fmod(angle, TWO_PI); // Avoid large inputs to sin() - #endif - return frac(sin(angle)*43758.5453); -}")); - - registry.ProvideFunction($"Unity_SimpleNnoise_Interpolate_$precision", s => s.Append(@" -inline $precision Unity_SimpleNnoise_Interpolate_$precision ($precision a, $precision b, $precision t) -{ - return (1.0-t)*a + (t*b); -} -")); + var hashType = this.hashType; + var hashTypeString = hashType.ToString(); + string uv = GetSlotValue(UVSlotId, generationMode); + string scale = GetSlotValue(ScaleSlotId, generationMode); + string output = GetVariableNameForSlot(OutSlotId); + var outSlot = FindSlot(OutSlotId); - registry.ProvideFunction($"Unity_SimpleNoise_ValueNoise_$precision", s => s.Append(@" -inline $precision Unity_SimpleNoise_ValueNoise_$precision ($precision2 uv) -{ - $precision2 i = floor(uv); - $precision2 f = frac(uv); - f = f * f * (3.0 - 2.0 * f); - - uv = abs(frac(uv) - 0.5); - $precision2 c0 = i + $precision2(0.0, 0.0); - $precision2 c1 = i + $precision2(1.0, 0.0); - $precision2 c2 = i + $precision2(0.0, 1.0); - $precision2 c3 = i + $precision2(1.0, 1.0); - $precision r0 = Unity_SimpleNoise_RandomValue_$precision(c0); - $precision r1 = Unity_SimpleNoise_RandomValue_$precision(c1); - $precision r2 = Unity_SimpleNoise_RandomValue_$precision(c2); - $precision r3 = Unity_SimpleNoise_RandomValue_$precision(c3); - - $precision bottomOfGrid = Unity_SimpleNnoise_Interpolate_$precision(r0, r1, f.x); - $precision topOfGrid = Unity_SimpleNnoise_Interpolate_$precision(r2, r3, f.x); - $precision t = Unity_SimpleNnoise_Interpolate_$precision(bottomOfGrid, topOfGrid, f.y); - return t; -}")); - - base.GenerateNodeFunction(registry, generationMode); + sb.AppendLine($"{outSlot.concreteValueType.ToShaderString(PrecisionUtil.Token)} {output};"); + sb.AppendLine($"Unity_SimpleNoise_{hashTypeString}_$precision({uv}, {scale}, {output});"); + } + + public bool RequiresMeshUV(UVChannel channel, ShaderStageCapability stageCapability) + { + using (var tempSlots = PooledList.Get()) + { + GetInputSlots(tempSlots); + var result = false; + foreach (var slot in tempSlots) + { + if (slot.RequiresMeshUV(channel)) + { + result = true; + break; + } + } + + tempSlots.Clear(); + return result; + } + } + + public override void OnAfterMultiDeserialize(string json) + { + if (sgVersion < 1) + { + // old nodes should select "LegacySine" to replicate old behavior + hashType = HashType.LegacySine; + ChangeVersion(1); + } } } } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/VoronoiNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/VoronoiNode.cs index 48a5ad822a1..fc96c33e860 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/VoronoiNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/VoronoiNode.cs @@ -1,69 +1,177 @@ -using System.Reflection; +using System.Collections.Generic; +using UnityEditor.Graphing; +using UnityEditor.ShaderGraph.Drawing.Controls; +using UnityEditor.ShaderGraph.Internal; using UnityEngine; namespace UnityEditor.ShaderGraph { [FormerName("UnityEditor.ShaderGraph.VoronoAbstractMaterialNode")] [Title("Procedural", "Noise", "Voronoi")] - class VoronoiNode : CodeFunctionNode + class VoronoiNode : AbstractMaterialNode, IGeneratesBodyCode, IGeneratesFunction, IMayRequireMeshUV { + // 0 original version + // 1 add deterministic noise option + public override int latestVersion => 1; + public override IEnumerable allowedNodeVersions => new int[] { 1 }; + + public const int UVSlotId = 0; + public const int AngleOffsetSlotId = 1; + public const int CellDensitySlotId = 2; + public const int OutSlotId = 3; + public const int CellsSlotId = 4; + + const string kUVSlotName = "UV"; + const string kAngleOffsetSlotName = "AngleOffset"; + const string kCellDensitySlotName = "CellDensity"; + const string kOutSlotName = "Out"; + const string kCellsSlotName = "Cells"; + public VoronoiNode() { name = "Voronoi"; synonyms = new string[] { "worley noise" }; + UpdateNodeAfterDeserialization(); } - protected override MethodInfo GetFunctionToConvert() + public enum HashType { - return GetType().GetMethod("Unity_Voronoi", BindingFlags.Static | BindingFlags.NonPublic); + Deterministic, + LegacySine, + }; + static readonly string[] kHashFunctionPrefix = + { + "Hash_Tchou_2_2_", + "Hash_LegacySine_2_2_", + }; + + public override bool hasPreview => true; + + public sealed override void UpdateNodeAfterDeserialization() + { + AddSlot(new UVMaterialSlot(UVSlotId, kUVSlotName, kUVSlotName, UVChannel.UV0)); + AddSlot(new Vector1MaterialSlot(AngleOffsetSlotId, kAngleOffsetSlotName, kAngleOffsetSlotName, SlotType.Input, 2.0f)); + AddSlot(new Vector1MaterialSlot(CellDensitySlotId, kCellDensitySlotName, kCellDensitySlotName, SlotType.Input, 5.0f)); + AddSlot(new Vector1MaterialSlot(OutSlotId, kOutSlotName, kOutSlotName, SlotType.Output, 0.0f)); + AddSlot(new Vector1MaterialSlot(CellsSlotId, kCellsSlotName, kCellsSlotName, SlotType.Output, 0.0f)); + + RemoveSlotsNameNotMatching(new[] { UVSlotId, AngleOffsetSlotId, CellDensitySlotId, OutSlotId, CellsSlotId }); } - static string Unity_Voronoi( - [Slot(0, Binding.MeshUV0)] Vector2 UV, - [Slot(1, Binding.None, 2.0f, 0, 0, 0)] Vector1 AngleOffset, - [Slot(2, Binding.None, 5.0f, 5.0f, 5.0f, 5.0f)] Vector1 CellDensity, - [Slot(3, Binding.None)] out Vector1 Out, - [Slot(4, Binding.None)] out Vector1 Cells) + [SerializeField] + private HashType m_HashType = HashType.Deterministic; + + [EnumControl("Hash Type")] + public HashType hashType { - return -@" -{ - $precision2 g = floor(UV * CellDensity); - $precision2 f = frac(UV * CellDensity); - $precision t = 8.0; - $precision3 res = $precision3(8.0, 0.0, 0.0); + get + { + if (((int)m_HashType < 0) || ((int)m_HashType >= kHashFunctionPrefix.Length)) + return (HashType)0; + return m_HashType; + } + set + { + if (m_HashType == value) + return; - for(int y=-1; y<=1; y++) - { - for(int x=-1; x<=1; x++) + m_HashType = value; + Dirty(ModificationScope.Graph); + } + } + + void IGeneratesFunction.GenerateNodeFunction(FunctionRegistry registry, GenerationMode generationMode) + { + registry.RequiresIncludePath("Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"); + + var hashType = this.hashType; + var hashTypeString = hashType.ToString(); + var HashFunction = kHashFunctionPrefix[(int)hashType]; + + registry.ProvideFunction($"Unity_Voronoi_RandomVector_{hashTypeString}_$precision", s => + { + s.AppendLine($"$precision2 Unity_Voronoi_RandomVector_{hashTypeString}_$precision ($precision2 UV, $precision offset)"); + using (s.BlockScope()) + { + s.AppendLine($"{HashFunction}$precision(UV, UV);"); + s.AppendLine("return $precision2(sin(UV.y * offset), cos(UV.x * offset)) * 0.5 + 0.5;"); + } + }); + + registry.ProvideFunction($"Unity_Voronoi_{hashTypeString}_$precision", s => + { + s.AppendLine($"void Unity_Voronoi_{hashTypeString}_$precision($precision2 UV, $precision AngleOffset, $precision CellDensity, out $precision Out, out $precision Cells)"); + using (s.BlockScope()) + { + s.AppendLine("$precision2 g = floor(UV * CellDensity);"); + s.AppendLine("$precision2 f = frac(UV * CellDensity);"); + s.AppendLine("$precision t = 8.0;"); + s.AppendLine("$precision3 res = $precision3(8.0, 0.0, 0.0);"); + s.AppendLine("for (int y = -1; y <= 1; y++)"); + using (s.BlockScope()) + { + s.AppendLine("for (int x = -1; x <= 1; x++)"); + using (s.BlockScope()) + { + s.AppendLine("$precision2 lattice = $precision2(x, y);"); + s.AppendLine($"$precision2 offset = Unity_Voronoi_RandomVector_{hashTypeString}_$precision(lattice + g, AngleOffset);"); + s.AppendLine("$precision d = distance(lattice + offset, f);"); + s.AppendLine("if (d < res.x)"); + using (s.BlockScope()) + { + s.AppendLine("res = $precision3(d, offset.x, offset.y);"); + s.AppendLine("Out = res.x;"); + s.AppendLine("Cells = res.y;"); + } + } + } + } + }); + } + + public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode) { - $precision2 lattice = $precision2(x,y); - $precision2 offset = Unity_Voronoi_RandomVector_$precision(lattice + g, AngleOffset); - $precision d = distance(lattice + offset, f); + var hashType = this.hashType; + var hashTypeString = hashType.ToString(); + string uv = GetSlotValue(UVSlotId, generationMode); + string angleOffset = GetSlotValue(AngleOffsetSlotId, generationMode); + string cellDensity = GetSlotValue(CellDensitySlotId, generationMode); + string output = GetVariableNameForSlot(OutSlotId); + string cells = GetVariableNameForSlot(CellsSlotId); + + sb.AppendLine($"{FindSlot(OutSlotId).concreteValueType.ToShaderString(PrecisionUtil.Token)} {output};"); + sb.AppendLine($"{FindSlot(CellsSlotId).concreteValueType.ToShaderString(PrecisionUtil.Token)} {cells};"); + sb.AppendLine($"Unity_Voronoi_{hashTypeString}_$precision({uv}, {angleOffset}, {cellDensity}, {output}, {cells});"); + } - if(d < res.x) + public bool RequiresMeshUV(UVChannel channel, ShaderStageCapability stageCapability) + { + using (var tempSlots = PooledList.Get()) { - res = $precision3(d, offset.x, offset.y); - Out = res.x; - Cells = res.y; + GetInputSlots(tempSlots); + var result = false; + foreach (var slot in tempSlots) + { + if (slot.RequiresMeshUV(channel)) + { + result = true; + break; + } + } + + tempSlots.Clear(); + return result; } } - } -} -"; - } - public override void GenerateNodeFunction(FunctionRegistry registry, GenerationMode generationMode) + public override void OnAfterMultiDeserialize(string json) { - registry.ProvideFunction("Unity_Voronoi_RandomVector_$precision", s => s.Append(@" -inline $precision2 Unity_Voronoi_RandomVector_$precision ($precision2 UV, $precision offset) -{ - $precision2x2 m = $precision2x2(15.27, 47.63, 99.41, 89.98); - UV = frac(sin(mul(UV, m))); - return $precision2(sin(UV.y*+offset)*0.5+0.5, cos(UV.x*offset)*0.5+0.5); -} -")); - base.GenerateNodeFunction(registry, generationMode); + if (sgVersion < 1) + { + // old nodes should select "LegacySine" to replicate old behavior + hashType = HashType.LegacySine; + ChangeVersion(1); + } } } } diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Random.meta b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Random.meta new file mode 100644 index 00000000000..425ca2af133 --- /dev/null +++ b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Random.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2f3277a96502b1c40a7caaeb08f975c2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/Util/ScreenSpaceType.cs b/com.unity.shadergraph/Editor/Data/Util/ScreenSpaceType.cs index 4a99b8d4172..0e8acc3608b 100644 --- a/com.unity.shadergraph/Editor/Data/Util/ScreenSpaceType.cs +++ b/com.unity.shadergraph/Editor/Data/Util/ScreenSpaceType.cs @@ -2,10 +2,11 @@ namespace UnityEditor.ShaderGraph { enum ScreenSpaceType { - Default, - Raw, - Center, - Tiled + Default, // screenpos.xy / w ==> [0, 1] across screen + Raw, // screenpos.xyzw ==> scales on distance, requires divide by w + Center, // Default, but remapped to [-1, 1] + Tiled, // frac(Center) + Pixel // Default * _ScreenParams.xy; [0 .. width-1, 0.. height-1] }; static class ScreenSpaceTypeExtensions @@ -20,6 +21,8 @@ public static string ToValueAsVariable(this ScreenSpaceType screenSpaceType) return string.Format("$precision4(IN.{0}.xy / IN.{0}.w * 2 - 1, 0, 0)", ShaderGeneratorNames.ScreenPosition); case ScreenSpaceType.Tiled: return string.Format("frac($precision4((IN.{0}.x / IN.{0}.w * 2 - 1) * _ScreenParams.x / _ScreenParams.y, IN.{0}.y / IN.{0}.w * 2 - 1, 0, 0))", ShaderGeneratorNames.ScreenPosition); + case ScreenSpaceType.Pixel: + return string.Format("$precision4(IN.{0}.xy * _ScreenParams.xy / IN.{0}.w, 0, 0)", ShaderGeneratorNames.ScreenPosition); default: return string.Format("$precision4(IN.{0}.xy / IN.{0}.w, 0, 0)", ShaderGeneratorNames.ScreenPosition); } From 2de24b63e6d84d00c9b95e4e967f622aff0e75de Mon Sep 17 00:00:00 2001 From: Chris Tchou Date: Tue, 31 Aug 2021 16:14:13 -0700 Subject: [PATCH 2/5] Removing doc changes, updating test images --- .../Linear/Android/Vulkan/None/ProceduralNodes.png | 4 ++-- .../Linear/IPhonePlayer/Metal/None/ProceduralNodes.png | 4 ++-- .../Linear/LinuxEditor/Vulkan/None/ProceduralNodes.png | 4 ++-- .../Linear/LinuxPlayer/Vulkan/None/ProceduralNodes.png | 4 ++-- .../Linear/OSXEditor/Metal/None/ProceduralNodes.png | 4 ++-- .../WindowsEditor/Direct3D11/None/ProceduralNodes.png | 4 ++-- .../WindowsPlayer/Direct3D11/None/ProceduralNodes.png | 4 ++-- com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md | 6 ------ com.unity.shadergraph/Documentation~/Simple-Noise-Node.md | 6 ------ com.unity.shadergraph/Documentation~/Voronoi-Node.md | 6 ------ 10 files changed, 14 insertions(+), 32 deletions(-) diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/Android/Vulkan/None/ProceduralNodes.png b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/Android/Vulkan/None/ProceduralNodes.png index d9bbbc78387..34407c518d7 100755 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/Android/Vulkan/None/ProceduralNodes.png +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/Android/Vulkan/None/ProceduralNodes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:335b84bdd685f778aa013eb5867527f8ae8f5a99973e404962dfbaab8086d3e8 -size 43521 +oid sha256:5378f82fabf03941184bd0caff17a2a4d8f91b0af89a038bc8c8acd9e1bc2394 +size 246055 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/IPhonePlayer/Metal/None/ProceduralNodes.png b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/IPhonePlayer/Metal/None/ProceduralNodes.png index 7d942695e17..d41b402d8a3 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/IPhonePlayer/Metal/None/ProceduralNodes.png +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/IPhonePlayer/Metal/None/ProceduralNodes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2962446547316e6e9c059c24bd53860112b0758f7d2ba5965818fb468ba2d3e1 -size 45036 +oid sha256:815c9d96186e44fff110ecbf1422511cfaf773d7e3943ed2167c98ccac72dcc3 +size 247862 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/ProceduralNodes.png b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/ProceduralNodes.png index cec622b057f..e41645551e4 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/ProceduralNodes.png +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/ProceduralNodes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:938f2afa9b2e5b26a9f33d27e002aa63e3421222c3defe280e5b87a75df96b13 -size 43258 +oid sha256:b71e8a98f7278d6014718680203d6e1410107d106d0b30839341bee6e9e5d009 +size 246119 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/LinuxPlayer/Vulkan/None/ProceduralNodes.png b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/LinuxPlayer/Vulkan/None/ProceduralNodes.png index cec622b057f..e41645551e4 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/LinuxPlayer/Vulkan/None/ProceduralNodes.png +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/LinuxPlayer/Vulkan/None/ProceduralNodes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:938f2afa9b2e5b26a9f33d27e002aa63e3421222c3defe280e5b87a75df96b13 -size 43258 +oid sha256:b71e8a98f7278d6014718680203d6e1410107d106d0b30839341bee6e9e5d009 +size 246119 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/ProceduralNodes.png b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/ProceduralNodes.png index a303a0c3157..3c6c6f58d25 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/ProceduralNodes.png +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/ProceduralNodes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f829e69f28f2de05a2e95f913d7ec2e9f1ca4a65eed8566ec216dd319e2e24f -size 38952 +oid sha256:2961a3b60d5e6fa146aed8743488c0174d391162e8e6bdc6eab43c1ee7be7896 +size 245940 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/ProceduralNodes.png b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/ProceduralNodes.png index ddd09462824..e4df2b26af8 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/ProceduralNodes.png +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/ProceduralNodes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5420fb8d2003273501262d8950a2226966a103eca2c47398884f4195cf591960 -size 39191 +oid sha256:ffc23b291ecfbaff1dabe2c9593ede013181c56974ec37c83cbbfc79eced0a80 +size 246320 diff --git a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/ProceduralNodes.png b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/ProceduralNodes.png index ddd09462824..0c3aa19964a 100644 --- a/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/ProceduralNodes.png +++ b/TestProjects/ShaderGraph/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/ProceduralNodes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5420fb8d2003273501262d8950a2226966a103eca2c47398884f4195cf591960 -size 39191 +oid sha256:6d54a74d21450081ba7114434561f84bc069d92810a98d405572a2652095d487 +size 246143 diff --git a/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md b/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md index 888436fb50c..10a205db737 100644 --- a/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md +++ b/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md @@ -12,12 +12,6 @@ Generates a gradient, or [Perlin](https://en.wikipedia.org/wiki/Perlin_noise), n | Scale | Input | Float | None | Noise scale | | Out | Output | Float | None | Output value | -## Controls - -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| Hash Type | Dropdown | Deterministic, LegacyMod | Selects the hash function used to generate random numbers | - ## Generated Code Example The following example code represents one possible outcome of this node. diff --git a/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md b/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md index 04111ca40f0..05fd090e5d1 100644 --- a/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md +++ b/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md @@ -12,12 +12,6 @@ Generates a simple, or [Value](https://en.wikipedia.org/wiki/Value_noise), noise | Scale | Input | Float | None | Noise scale | | Out | Output | Float | None | Output value | -## Controls - -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| Hash Type | Dropdown | Deterministic, LegacySine | Selects the hash function used to generate random numbers | - ## Generated Code Example The following example code represents one possible outcome of this node. diff --git a/com.unity.shadergraph/Documentation~/Voronoi-Node.md b/com.unity.shadergraph/Documentation~/Voronoi-Node.md index 5b825155d53..69a474cfc49 100644 --- a/com.unity.shadergraph/Documentation~/Voronoi-Node.md +++ b/com.unity.shadergraph/Documentation~/Voronoi-Node.md @@ -14,12 +14,6 @@ Generates a Voronoi, or [Worley](https://en.wikipedia.org/wiki/Worley_noise), no | Out | Output | Float | None | Output noise value | | Cells | Output | Float | None | Raw cell data | -## Controls - -| Name | Type | Options | Description | -|:------------ |:-------------|:-----|:---| -| Hash Type | Dropdown | Deterministic, LegacySine | Selects the hash function used to generate random numbers | - ## Generated Code Example The following example code represents one possible outcome of this node. From ec57f46eae31146bb68dd810734a22a3a3859bdc Mon Sep 17 00:00:00 2001 From: Chris Tchou Date: Tue, 31 Aug 2021 21:43:55 -0700 Subject: [PATCH 3/5] Removing IntegerHashNode, fixing Formatting --- .../ShaderLibrary/Hashes.hlsl | 6 +- .../Nodes/Procedural/Noise/IntegerHashNode.cs | 131 ------------------ .../Procedural/Noise/IntegerHashNode.cs.meta | 11 -- .../Nodes/Procedural/Noise/SimpleNoiseNode.cs | 4 +- 4 files changed, 5 insertions(+), 147 deletions(-) delete mode 100644 com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs delete mode 100644 com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs.meta diff --git a/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl b/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl index 44678b0f452..4d6ce25e8f8 100644 --- a/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl +++ b/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl @@ -130,9 +130,9 @@ void Hash_Tchou_3_3_uint(uint3 v, out uint3 o) void Hash_Tchou_3_3_float(float3 i, out float3 o) { - uint3 r, v = (uint3) (int3) round(i); - Hash_Tchou_3_3_uint(v, r); - o = r * (1.0 / float(0xffffffff)); + uint3 r, v = (uint3) (int3) round(i); + Hash_Tchou_3_3_uint(v, r); + o = r * (1.0 / float(0xffffffff)); } void Hash_Tchou_3_3_half(half3 i, out half3 o) diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs deleted file mode 100644 index 25b0c0ecb46..00000000000 --- a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs +++ /dev/null @@ -1,131 +0,0 @@ -using System.Reflection; -using UnityEditor.Graphing; -using UnityEditor.ShaderGraph.Drawing.Controls; -using UnityEngine; - -namespace UnityEditor.ShaderGraph -{ -/* - [Title("Procedural", "Noise", "Integer Hash")] - class IntegerHashNode : AbstractMaterialNode, IGeneratesBodyCode, IGeneratesFunction - { - public IntegerHashNode() - { - name = "Integer Hash"; - UpdateNodeAfterDeserialization(); - } - - public override bool hasPreview { get { return true; } } - - // Input slots - private const int kInputSlotId = 1; - private const string kInputSlotName = "Coord"; - - // Output slots - private const int kOutputSlotId = 0; - private const string kOutputSlotName = "Hash"; - - // Local state - public enum HashType - { - Tchou_2_1, - Tchou_2_3, - Tchou_3_1, - Tchou_3_3, - }; - - struct Description - { - public string functionName; - public int inputDimension; - public int outputDimension; - public Description(string f, int i, int o) { functionName = f; inputDimension = i; outputDimension = o; } - }; - - static Description[] k_hashDescriptions = - { - new Description("Hash_Tchou_2_1_float", 2, 1), - new Description("Hash_Tchou_2_3_float", 2, 3), - new Description("Hash_Tchou_3_1_float", 3, 1), - new Description("Hash_Tchou_3_3_float", 3, 3), - }; - - [SerializeField] - private HashType m_HashType = HashType.Tchou_2_3; - - [EnumControl("Hash")] - public HashType hashType - { - get - { - return m_HashType; - } - set - { - if (m_HashType == value) - return; - - m_HashType = value; - Dirty(ModificationScope.Topological); - UpdateNodeAfterDeserialization(); - } - } - - Description hashDescription => ((int) hashType >= 0 && (int) hashType < k_hashDescriptions.Length) ? k_hashDescriptions[(int)hashType] : k_hashDescriptions[0]; - - public MaterialSlot CreateVectorSlot(int dimension, int id, string name, SlotType slotType, Vector4 value = default) - { - MaterialSlot slot = null; - switch (dimension) - { - case 1: - slot = new Vector1MaterialSlot(id, name, name, slotType, value.x); - break; - case 2: - slot = new Vector2MaterialSlot(id, name, name, slotType, value); - break; - case 3: - slot = new Vector3MaterialSlot(id, name, name, slotType, value); - break; - case 4: - slot = new Vector4MaterialSlot(id, name, name, slotType, value); - break; - } - return slot; - } - - public sealed override void UpdateNodeAfterDeserialization() - { - var desc = hashDescription; - - MaterialSlot inputSlot = CreateVectorSlot(desc.inputDimension, kInputSlotId, kInputSlotName, SlotType.Input); - AddSlot(inputSlot); - - MaterialSlot outputSlot = CreateVectorSlot(desc.outputDimension, kOutputSlotId, kOutputSlotName, SlotType.Output); - AddSlot(outputSlot); - - RemoveSlotsNameNotMatching(new[] - { - kInputSlotId, - kOutputSlotId - }); - } - - public void GenerateNodeFunction(FunctionRegistry registry, GenerationMode generationMode) - { - registry.RequiresIncludePath("Packages/com.unity.render-pipelines.core/ShaderLibrary/Hashes.hlsl"); - } - - public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode) - { - var desc = hashDescription; - - var outputVar = GetVariableNameForSlot(kOutputSlotId); - var input = GetSlotValue(kInputSlotId, generationMode); - - sb.AppendLine($"$precision{desc.outputDimension} {outputVar};"); - sb.AppendLine($"{desc.functionName}({input}, {outputVar});"); - } - } -*/ -} diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs.meta b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs.meta deleted file mode 100644 index b09dcb224ff..00000000000 --- a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/IntegerHashNode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3bc89cefb774e064782582c2d3bc250b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/SimpleNoiseNode.cs b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/SimpleNoiseNode.cs index 1dfa385c076..95ec9622fbb 100644 --- a/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/SimpleNoiseNode.cs +++ b/com.unity.shadergraph/Editor/Data/Nodes/Procedural/Noise/SimpleNoiseNode.cs @@ -59,7 +59,7 @@ public HashType hashType get { if (((int)m_HashType < 0) || ((int)m_HashType >= kHashFunctionPrefix.Length)) - return (HashType) 0; + return (HashType)0; return m_HashType; } set @@ -78,7 +78,7 @@ void IGeneratesFunction.GenerateNodeFunction(FunctionRegistry registry, Generati var hashType = this.hashType; var hashTypeString = hashType.ToString(); - var HashFunction = kHashFunctionPrefix[(int) hashType]; + var HashFunction = kHashFunctionPrefix[(int)hashType]; registry.ProvideFunction($"Unity_SimpleNoise_ValueNoise_{hashTypeString}_$precision", s => { From 1f129f10ea9ef1da53d19f04581c5c40a967679e Mon Sep 17 00:00:00 2001 From: sarah-welton <82842355+sarah-welton@users.noreply.github.com> Date: Wed, 1 Sep 2021 14:22:04 -0400 Subject: [PATCH 4/5] Added changes to reflect new dropdown added for choosing the Hash Type for random noise generation Based on https://github.com/Unity-Technologies/Graphics/pull/5491 --- .../Documentation~/Gradient-Noise-Node.md | 9 +++++++++ .../Documentation~/Simple-Noise-Node.md | 8 ++++++++ com.unity.shadergraph/Documentation~/Voronoi-Node.md | 9 +++++++++ 3 files changed, 26 insertions(+) diff --git a/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md b/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md index 10a205db737..1d42c2f9ed4 100644 --- a/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md +++ b/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md @@ -4,6 +4,8 @@ Generates a gradient, or [Perlin](https://en.wikipedia.org/wiki/Perlin_noise), noise based on input **UV**. The scale of the generated noise is controlled by input **Scale**. +You can also choose to use two different hashing methods for calculating the noise. As of Unity version 2021.2, the Gradient Noise node defaults to the **Deterministic** hash, to ensure consistent results for noise generation across platforms. + ## Ports | Name | Direction | Type | Binding | Description | @@ -12,6 +14,13 @@ Generates a gradient, or [Perlin](https://en.wikipedia.org/wiki/Perlin_noise), n | Scale | Input | Float | None | Noise scale | | Out | Output | Float | None | Output value | +## Controls + +| Name | Type | Options | Description | +|:------------ |:-------------|:-----|:---| +| Hash Type | Dropdown | Deterministic, LegacyMod | Selects the hash function used to generate random numbers for noise generation. | + + ## Generated Code Example The following example code represents one possible outcome of this node. diff --git a/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md b/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md index 05fd090e5d1..b59ec765d6b 100644 --- a/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md +++ b/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md @@ -4,6 +4,8 @@ Generates a simple, or [Value](https://en.wikipedia.org/wiki/Value_noise), noise based on input **UV**. The scale of the generated noise is controlled by input **Scale**. +You can also choose to use two different hashing methods for calculating the noise. As of Unity version 2021.2, the Simple Noise node defaults to the **Deterministic** hash, to ensure consistent results for noise generation across platforms. + ## Ports | Name | Direction | Type | Binding | Description | @@ -12,6 +14,12 @@ Generates a simple, or [Value](https://en.wikipedia.org/wiki/Value_noise), noise | Scale | Input | Float | None | Noise scale | | Out | Output | Float | None | Output value | +## Controls + +| Name | Type | Options | Description | +|:------------ |:-------------|:-----|:---| +| Hash Type | Dropdown | Deterministic, LegacySine | Selects the hash function used to generate random numbers for noise generation. | + ## Generated Code Example The following example code represents one possible outcome of this node. diff --git a/com.unity.shadergraph/Documentation~/Voronoi-Node.md b/com.unity.shadergraph/Documentation~/Voronoi-Node.md index 69a474cfc49..75a5eba4e0e 100644 --- a/com.unity.shadergraph/Documentation~/Voronoi-Node.md +++ b/com.unity.shadergraph/Documentation~/Voronoi-Node.md @@ -4,6 +4,8 @@ Generates a Voronoi, or [Worley](https://en.wikipedia.org/wiki/Worley_noise), noise based on input **UV**. Voronoi noise is generated by calculating distances between a pixel and a lattice of points. By offsetting these points by a pseudo-random number, controlled by input **Angle Offset**, a cluster of cells can be generated. The scale of these cells, and the resulting noise, is controlled by input **Cell Density**. The output **Cells** contains the raw cell data. +You can also choose to use two different hashing methods for calculating the noise. As of Unity version 2021.2, the Voronoi node defaults to the **Deterministic** hash, to ensure consistent results for noise generation across platforms. + ## Ports | Name | Direction | Type | Binding | Description | @@ -14,6 +16,13 @@ Generates a Voronoi, or [Worley](https://en.wikipedia.org/wiki/Worley_noise), no | Out | Output | Float | None | Output noise value | | Cells | Output | Float | None | Raw cell data | +## Controls + +| Name | Type | Options | Description | +|:------------ |:-------------|:-----|:---| +| Hash Type | Dropdown | Deterministic, LegacySine | Selects the hash function used to generate random numbers for noise generation. | + + ## Generated Code Example The following example code represents one possible outcome of this node. From 91ae62967de4db855176a837f4181e20f4f4ef58 Mon Sep 17 00:00:00 2001 From: Chris Tchou Date: Fri, 10 Sep 2021 16:27:32 -0700 Subject: [PATCH 5/5] Fixing formatting --- com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md | 2 +- com.unity.shadergraph/Documentation~/Simple-Noise-Node.md | 2 +- com.unity.shadergraph/Documentation~/Voronoi-Node.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md b/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md index 1d42c2f9ed4..e8e0ddbdd31 100644 --- a/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md +++ b/com.unity.shadergraph/Documentation~/Gradient-Noise-Node.md @@ -4,7 +4,7 @@ Generates a gradient, or [Perlin](https://en.wikipedia.org/wiki/Perlin_noise), noise based on input **UV**. The scale of the generated noise is controlled by input **Scale**. -You can also choose to use two different hashing methods for calculating the noise. As of Unity version 2021.2, the Gradient Noise node defaults to the **Deterministic** hash, to ensure consistent results for noise generation across platforms. +You can also choose to use two different hashing methods for calculating the noise. As of Unity version 2021.2, the Gradient Noise node defaults to the **Deterministic** hash, to ensure consistent results for noise generation across platforms. ## Ports diff --git a/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md b/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md index b59ec765d6b..0d70513df4c 100644 --- a/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md +++ b/com.unity.shadergraph/Documentation~/Simple-Noise-Node.md @@ -4,7 +4,7 @@ Generates a simple, or [Value](https://en.wikipedia.org/wiki/Value_noise), noise based on input **UV**. The scale of the generated noise is controlled by input **Scale**. -You can also choose to use two different hashing methods for calculating the noise. As of Unity version 2021.2, the Simple Noise node defaults to the **Deterministic** hash, to ensure consistent results for noise generation across platforms. +You can also choose to use two different hashing methods for calculating the noise. As of Unity version 2021.2, the Simple Noise node defaults to the **Deterministic** hash, to ensure consistent results for noise generation across platforms. ## Ports diff --git a/com.unity.shadergraph/Documentation~/Voronoi-Node.md b/com.unity.shadergraph/Documentation~/Voronoi-Node.md index 75a5eba4e0e..64df71b4855 100644 --- a/com.unity.shadergraph/Documentation~/Voronoi-Node.md +++ b/com.unity.shadergraph/Documentation~/Voronoi-Node.md @@ -4,7 +4,7 @@ Generates a Voronoi, or [Worley](https://en.wikipedia.org/wiki/Worley_noise), noise based on input **UV**. Voronoi noise is generated by calculating distances between a pixel and a lattice of points. By offsetting these points by a pseudo-random number, controlled by input **Angle Offset**, a cluster of cells can be generated. The scale of these cells, and the resulting noise, is controlled by input **Cell Density**. The output **Cells** contains the raw cell data. -You can also choose to use two different hashing methods for calculating the noise. As of Unity version 2021.2, the Voronoi node defaults to the **Deterministic** hash, to ensure consistent results for noise generation across platforms. +You can also choose to use two different hashing methods for calculating the noise. As of Unity version 2021.2, the Voronoi node defaults to the **Deterministic** hash, to ensure consistent results for noise generation across platforms. ## Ports