From b82da95b5181ac8bbae38efb13e950d5e88a4caa Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 23 Oct 2020 13:08:43 +0800 Subject: =?UTF-8?q?*=E7=A7=BB=E5=8A=A8amplify=20shader=20editor=E5=88=B0th?= =?UTF-8?q?ird=20party=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Vertex/Tessellation/DistanceBasedTessNode.cs | 30 ---------------------- .../Tessellation/DistanceBasedTessNode.cs.meta | 12 --------- .../Vertex/Tessellation/EdgeLengthCullTessNode.cs | 27 ------------------- .../Tessellation/EdgeLengthCullTessNode.cs.meta | 12 --------- .../Vertex/Tessellation/EdgeLengthTessNode.cs | 23 ----------------- .../Vertex/Tessellation/EdgeLengthTessNode.cs.meta | 12 --------- .../Vertex/Tessellation/TessellationParentNode.cs | 29 --------------------- .../Tessellation/TessellationParentNode.cs.meta | 12 --------- 8 files changed, 157 deletions(-) delete mode 100644 Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/DistanceBasedTessNode.cs delete mode 100644 Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/DistanceBasedTessNode.cs.meta delete mode 100644 Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthCullTessNode.cs delete mode 100644 Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthCullTessNode.cs.meta delete mode 100644 Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthTessNode.cs delete mode 100644 Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthTessNode.cs.meta delete mode 100644 Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/TessellationParentNode.cs delete mode 100644 Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/TessellationParentNode.cs.meta (limited to 'Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation') diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/DistanceBasedTessNode.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/DistanceBasedTessNode.cs deleted file mode 100644 index c49df07f..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/DistanceBasedTessNode.cs +++ /dev/null @@ -1,30 +0,0 @@ - -// Amplify Shader Editor - Visual Shader Editing Tool -// Copyright (c) Amplify Creations, Lda - - -namespace AmplifyShaderEditor -{ - [System.Serializable] - [NodeAttributes( "Distance-based Tessellation", "Miscellaneous", "Calculates tessellation based on distance from camera" )] - public sealed class DistanceBasedTessNode : TessellationParentNode - { - private const string FunctionBody = "UnityDistanceBasedTess( v0.vertex, v1.vertex, v2.vertex, {0},{1},{2})"; - protected override void CommonInit( int uniqueId ) - { - base.CommonInit( uniqueId ); - AddInputPort( WirePortDataType.FLOAT, false,"Factor"); - AddInputPort( WirePortDataType.FLOAT, false, "Min Dist" ); - AddInputPort( WirePortDataType.FLOAT, false, "Max Dist" ); - AddOutputPort( WirePortDataType.FLOAT4, Constants.EmptyPortValue ); - } - - protected override string BuildTessellationFunction( ref MasterNodeDataCollector dataCollector ) - { - return string.Format( FunctionBody, - m_inputPorts[ 1 ].GeneratePortInstructions( ref dataCollector ), - m_inputPorts[ 2 ].GeneratePortInstructions( ref dataCollector ), - m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector ) ); - } - } -} diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/DistanceBasedTessNode.cs.meta b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/DistanceBasedTessNode.cs.meta deleted file mode 100644 index 18016c1b..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/DistanceBasedTessNode.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5a83fb450d164d34bb756f46b3f4290e -timeCreated: 1482150091 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthCullTessNode.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthCullTessNode.cs deleted file mode 100644 index 48c5db07..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthCullTessNode.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Amplify Shader Editor - Visual Shader Editing Tool -// Copyright (c) Amplify Creations, Lda - - -namespace AmplifyShaderEditor -{ - [System.Serializable] - [NodeAttributes( "Edge Length Tessellation With Cull", "Miscellaneous", "Tessellation level computed based on triangle edge length on the screen with patch frustum culling" )] - public sealed class EdgeLengthCullTessNode : TessellationParentNode - { - private const string FunctionBody = "UnityEdgeLengthBasedTessCull( v0.vertex, v1.vertex, v2.vertex, {0},{1})"; - protected override void CommonInit( int uniqueId ) - { - base.CommonInit( uniqueId ); - AddInputPort( WirePortDataType.FLOAT, false, "Edge Length" ); - AddInputPort( WirePortDataType.FLOAT, false, "Max Disp." ); - AddOutputPort( WirePortDataType.FLOAT4, Constants.EmptyPortValue ); - } - - protected override string BuildTessellationFunction( ref MasterNodeDataCollector dataCollector ) - { - return string.Format( FunctionBody, - m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector ), - m_inputPorts[ 1 ].GeneratePortInstructions( ref dataCollector ) ); - } - } -} diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthCullTessNode.cs.meta b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthCullTessNode.cs.meta deleted file mode 100644 index 20d4dd27..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthCullTessNode.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4b09c64ce2fd06a4cb4036d8cc0f8b2a -timeCreated: 1482150962 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthTessNode.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthTessNode.cs deleted file mode 100644 index f4905bf1..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthTessNode.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Amplify Shader Editor - Visual Shader Editing Tool -// Copyright (c) Amplify Creations, Lda - -namespace AmplifyShaderEditor -{ - [System.Serializable] - [NodeAttributes( "Edge Length Tessellation", "Miscellaneous", "Tessellation level computed based on triangle edge length on the screen" )] - public sealed class EdgeLengthTessNode : TessellationParentNode - { - private const string FunctionBody = "UnityEdgeLengthBasedTess (v0.vertex, v1.vertex, v2.vertex, {0})"; - protected override void CommonInit( int uniqueId ) - { - base.CommonInit( uniqueId ); - AddInputPort( WirePortDataType.FLOAT, false, "Edge Length" ); - AddOutputPort( WirePortDataType.FLOAT4, Constants.EmptyPortValue ); - } - - protected override string BuildTessellationFunction( ref MasterNodeDataCollector dataCollector ) - { - return string.Format( FunctionBody, m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector ) ); - } - } -} diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthTessNode.cs.meta b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthTessNode.cs.meta deleted file mode 100644 index 2c936ef7..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/EdgeLengthTessNode.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: abe3e8fa4d49c9742a95ac801fd14d7d -timeCreated: 1482150962 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/TessellationParentNode.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/TessellationParentNode.cs deleted file mode 100644 index be14febc..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/TessellationParentNode.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace AmplifyShaderEditor -{ - public class TessellationParentNode : ParentNode - { - - protected override void CommonInit( int uniqueId ) - { - base.CommonInit( uniqueId ); - m_useInternalPortData = true; - } - - - public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) - { - if ( dataCollector.PortCategory != MasterNodePortCategory.Tessellation ) - { - UIUtils.ShowMessage( UniqueId, m_nodeAttribs.Name + " can only be used on Master Node Tessellation port" ); - return "(-1)"; - } - - return BuildTessellationFunction( ref dataCollector ); - } - - protected virtual string BuildTessellationFunction( ref MasterNodeDataCollector dataCollector ) - { - return string.Empty; - } - } -} diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/TessellationParentNode.cs.meta b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/TessellationParentNode.cs.meta deleted file mode 100644 index 0799224c..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/Tessellation/TessellationParentNode.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 79c24faef1fec884d937e74bdc9209da -timeCreated: 1482162387 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: -- cgit v1.1-26-g67d0