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 --- .../Editor/Nodes/Vertex/NormalVertexDataNode.cs | 44 ---------------------- 1 file changed, 44 deletions(-) delete mode 100644 Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/NormalVertexDataNode.cs (limited to 'Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/NormalVertexDataNode.cs') diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/NormalVertexDataNode.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/NormalVertexDataNode.cs deleted file mode 100644 index b5fc4b5f..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Vertex/NormalVertexDataNode.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Amplify Shader Editor - Visual Shader Editing Tool -// Copyright (c) Amplify Creations, Lda - -namespace AmplifyShaderEditor -{ - [System.Serializable] - [NodeAttributes( "Vertex Normal", "Vertex Data", "Vertex normal vector in object space, can be used in both local vertex offset and fragment outputs" )] - public sealed class NormalVertexDataNode : VertexDataNode - { - protected override void CommonInit( int uniqueId ) - { - base.CommonInit( uniqueId ); - m_currentVertexData = "normal"; - ChangeOutputProperties( 0, "XYZ", WirePortDataType.FLOAT3 ); - m_outputPorts[ 4 ].Visible = false; - m_drawPreviewAsSphere = true; - m_previewShaderGUID = "6b24b06c33f9fe84c8a2393f13ab5406"; - } - - public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalVar ) - { - string vertexNormal = string.Empty; - - if( dataCollector.MasterNodeCategory == AvailableShaderTypes.Template ) - { - vertexNormal = dataCollector.TemplateDataCollectorInstance.GetVertexNormal( CurrentPrecisionType ); - return GetOutputVectorItem( 0, outputId, vertexNormal ); - } - - if( dataCollector.PortCategory == MasterNodePortCategory.Fragment || dataCollector.PortCategory == MasterNodePortCategory.Debug ) - { - dataCollector.AddToInput( UniqueId, SurfaceInputs.WORLD_NORMAL, CurrentPrecisionType ); - if( dataCollector.DirtyNormal ) - { - dataCollector.AddToInput( UniqueId, SurfaceInputs.INTERNALDATA, addSemiColon: false ); - dataCollector.ForceNormal = true; - } - } - - vertexNormal = GeneratorUtils.GenerateVertexNormal( ref dataCollector, UniqueId, CurrentPrecisionType ); - return GetOutputVectorItem( 0, outputId, vertexNormal ); - } - } -} -- cgit v1.1-26-g67d0