diff options
author | chai <chaifix@163.com> | 2020-10-23 13:08:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-10-23 13:08:43 +0800 |
commit | b82da95b5181ac8bbae38efb13e950d5e88a4caa (patch) | |
tree | 48a6f3269276484bbc7cfc95f0651f40a2176aa1 /Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time | |
parent | 917e9e0b320775634dc2e710f7deac74fd0822f0 (diff) |
*移动amplify shader editor到third party目录
Diffstat (limited to 'Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time')
10 files changed, 0 insertions, 309 deletions
diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/CosTime.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/CosTime.cs deleted file mode 100644 index 096676f2..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/CosTime.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Amplify Shader Editor - Visual Shader Editing Tool -// Copyright (c) Amplify Creations, Lda <info@amplify.pt> - -using System; -namespace AmplifyShaderEditor -{ - [Serializable] - [NodeAttributes( "Cos Time", "Time", "Cosine of time" )] - public sealed class CosTime : ConstVecShaderVariable - { -#if UNITY_2018_3_OR_NEWER - private readonly string[] SRPTime = - { - "cos( _TimeParameters.x * 0.125 )", - "cos( _TimeParameters.x * 0.25 )", - "cos( _TimeParameters.x * 0.5 )", - "_TimeParameters.z", - }; -#endif - protected override void CommonInit( int uniqueId ) - { - base.CommonInit( uniqueId ); - ChangeOutputName( 1, "t/8" ); - ChangeOutputName( 2, "t/4" ); - ChangeOutputName( 3, "t/2" ); - ChangeOutputName( 4, "t" ); - m_value = "_CosTime"; - m_previewShaderGUID = "3093999b42c3c0940a71799511d7781c"; - m_continuousPreviewRefresh = true; - } - - public override void RefreshExternalReferences() - { - base.RefreshExternalReferences(); - if( !m_outputPorts[ 0 ].IsConnected ) - { - m_outputPorts[ 0 ].Visible = false; - m_sizeIsDirty = true; - } - } - - public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) - { -#if UNITY_2018_3_OR_NEWER - if( outputId > 0 && dataCollector.IsTemplate ) - { - if( ( dataCollector.TemplateDataCollectorInstance.IsHDRP && ASEPackageManagerHelper.CurrentHDVersion > ASESRPVersions.ASE_SRP_5_16_1 ) || - ( dataCollector.TemplateDataCollectorInstance.IsLWRP && ASEPackageManagerHelper.CurrentLWVersion > ASESRPVersions.ASE_SRP_5_16_1 ) ) - return SRPTime[ outputId - 1 ]; - } -#endif - return base.GenerateShaderForOutput( outputId, ref dataCollector, ignoreLocalvar ); - } - } -} diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/CosTime.cs.meta b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/CosTime.cs.meta deleted file mode 100644 index 80373c18..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/CosTime.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 447e504f2ca5aaf4bbf0fdbce33596bc -timeCreated: 1481126955 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/DeltaTime.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/DeltaTime.cs deleted file mode 100644 index a1f3380f..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/DeltaTime.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Amplify Shader Editor - Visual Shader Editing Tool -// Copyright (c) Amplify Creations, Lda <info@amplify.pt> - -using System; -namespace AmplifyShaderEditor -{ - [Serializable] - [NodeAttributes( "Delta Time", "Time", "Delta time" )] - public sealed class DeltaTime : ConstVecShaderVariable - { - protected override void CommonInit( int uniqueId ) - { - base.CommonInit( uniqueId ); - ChangeOutputName( 1, "dt" ); - ChangeOutputName( 2, "1/dt" ); - ChangeOutputName( 3, "smoothDt" ); - ChangeOutputName( 4, "1/smoothDt" ); - m_value = "unity_DeltaTime"; - m_previewShaderGUID = "9d69a693042c443498f96d6da60535eb"; - m_continuousPreviewRefresh = true; - } - - public override void RefreshExternalReferences() - { - base.RefreshExternalReferences(); - if( !m_outputPorts[ 0 ].IsConnected ) - { - m_outputPorts[ 0 ].Visible = false; - m_sizeIsDirty = true; - } - } - } -} diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/DeltaTime.cs.meta b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/DeltaTime.cs.meta deleted file mode 100644 index 400f94fe..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/DeltaTime.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3ddde7ed1ab4f8044a9a6aa3891f5ca4 -timeCreated: 1481126955 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/SimpleTimeNode.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/SimpleTimeNode.cs deleted file mode 100644 index 8445f90b..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/SimpleTimeNode.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Amplify Shader Editor - Visual Shader Editing Tool -// Copyright (c) Amplify Creations, Lda <info@amplify.pt> - -using System; -namespace AmplifyShaderEditor -{ - [Serializable] - [NodeAttributes( "Time", "Time", "Time in seconds with a scale multiplier" )] - public sealed class SimpleTimeNode : ShaderVariablesNode - { - private const string TimeStandard = "_Time.y"; -#if UNITY_2018_3_OR_NEWER - private const string TimeSRP = "_TimeParameters.x"; -#endif - protected override void CommonInit( int uniqueId ) - { - base.CommonInit( uniqueId ); - ChangeOutputProperties( 0, "Out", WirePortDataType.FLOAT ); - AddInputPort( WirePortDataType.FLOAT, false, "Scale" ); - m_inputPorts[ 0 ].FloatInternalData = 1; - m_useInternalPortData = true; - m_previewShaderGUID = "45b7107d5d11f124fad92bcb1fa53661"; - m_continuousPreviewRefresh = true; - } - - public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) - { - base.GenerateShaderForOutput( outputId, ref dataCollector, ignoreLocalvar ); - string multiplier = m_inputPorts[ 0 ].GeneratePortInstructions( ref dataCollector ); - string timeGlobalVar = TimeStandard; -#if UNITY_2018_3_OR_NEWER - if( dataCollector.IsTemplate ) - { - if( ( dataCollector.TemplateDataCollectorInstance.IsHDRP && ASEPackageManagerHelper.CurrentHDVersion > ASESRPVersions.ASE_SRP_5_16_1 ) || - ( dataCollector.TemplateDataCollectorInstance.IsLWRP && ASEPackageManagerHelper.CurrentLWVersion > ASESRPVersions.ASE_SRP_5_16_1 ) ) - timeGlobalVar = TimeSRP; - } -#endif - if( multiplier == "1.0" ) - return timeGlobalVar; - - string scaledVarName = "mulTime" + OutputId; - string scaledVarValue = timeGlobalVar + " * " + multiplier; - dataCollector.AddLocalVariable( UniqueId, CurrentPrecisionType, WirePortDataType.FLOAT, scaledVarName, scaledVarValue ); - return scaledVarName; - } - } -} diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/SimpleTimeNode.cs.meta b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/SimpleTimeNode.cs.meta deleted file mode 100644 index 313b9315..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/SimpleTimeNode.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f36e4491ee33fe74fa51cfb5ad450c6e -timeCreated: 1481126959 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/SinTimeNode.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/SinTimeNode.cs deleted file mode 100644 index aac2b1eb..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/SinTimeNode.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Amplify Shader Editor - Visual Shader Editing Tool -// Copyright (c) Amplify Creations, Lda <info@amplify.pt> - -using System; -using UnityEditor; -using UnityEngine; -namespace AmplifyShaderEditor -{ - [Serializable] - [NodeAttributes( "Sin Time", "Time", "Unity sin time" )] - public sealed class SinTimeNode : ConstVecShaderVariable - { - //double m_time; -#if UNITY_2018_3_OR_NEWER - private readonly string[] SRPTime = - { - "sin( _TimeParameters.x * 0.125 )", - "sin( _TimeParameters.x * 0.25 )", - "sin( _TimeParameters.x * 0.5 )", - "_TimeParameters.y", - }; -#endif - protected override void CommonInit( int uniqueId ) - { - base.CommonInit( uniqueId ); - ChangeOutputName( 1, "t/8" ); - ChangeOutputName( 2, "t/4" ); - ChangeOutputName( 3, "t/2" ); - ChangeOutputName( 4, "t" ); - m_value = "_SinTime"; - m_previewShaderGUID = "e4ba809e0badeb94994170b2cbbbba10"; - m_continuousPreviewRefresh = true; - } - - public override void RefreshExternalReferences() - { - base.RefreshExternalReferences(); - if( !m_outputPorts[ 0 ].IsConnected ) - { - m_outputPorts[ 0 ].Visible = false; - m_sizeIsDirty = true; - } - } - - public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) - { -#if UNITY_2018_3_OR_NEWER - if( outputId > 0 && dataCollector.IsTemplate ) - { - if( ( dataCollector.TemplateDataCollectorInstance.IsHDRP && ASEPackageManagerHelper.CurrentHDVersion > ASESRPVersions.ASE_SRP_5_16_1 ) || - ( dataCollector.TemplateDataCollectorInstance.IsLWRP && ASEPackageManagerHelper.CurrentLWVersion > ASESRPVersions.ASE_SRP_5_16_1 ) ) - return SRPTime[ outputId - 1 ]; - } -#endif - return base.GenerateShaderForOutput( outputId, ref dataCollector, ignoreLocalvar ); - } - } -} diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/SinTimeNode.cs.meta b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/SinTimeNode.cs.meta deleted file mode 100644 index 876a7748..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/SinTimeNode.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 796acd44fcf330e4e921855630007b9b -timeCreated: 1481126957 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/TimeNode.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/TimeNode.cs deleted file mode 100644 index 258d5177..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/TimeNode.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Amplify Shader Editor - Visual Shader Editing Tool -// Copyright (c) Amplify Creations, Lda <info@amplify.pt> - -using System; -namespace AmplifyShaderEditor -{ - [Serializable] - [NodeAttributes( "Time Parameters", "Time", "Time since level load" )] - public sealed class TimeNode : ConstVecShaderVariable - { -#if UNITY_2018_3_OR_NEWER - private readonly string[] SRPTime = - { - "( _TimeParameters.x * 0.05 )", - "( _TimeParameters.x )", - "( _TimeParameters.x * 2 )", - "( _TimeParameters.x * 3 )", - }; -#endif - protected override void CommonInit( int uniqueId ) - { - base.CommonInit( uniqueId ); - ChangeOutputName( 1, "t/20" ); - ChangeOutputName( 2, "t" ); - ChangeOutputName( 3, "t*2" ); - ChangeOutputName( 4, "t*3" ); - m_value = "_Time"; - m_previewShaderGUID = "73abc10c8d1399444827a7eeb9c24c2a"; - m_continuousPreviewRefresh = true; - } - - public override void RefreshExternalReferences() - { - base.RefreshExternalReferences(); - if( !m_outputPorts[ 0 ].IsConnected ) - { - m_outputPorts[ 0 ].Visible = false; - m_sizeIsDirty = true; - } - } - - public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) - { -#if UNITY_2018_3_OR_NEWER - if( outputId > 0 && dataCollector.IsTemplate ) - { - if( ( dataCollector.TemplateDataCollectorInstance.IsHDRP && ASEPackageManagerHelper.CurrentHDVersion > ASESRPVersions.ASE_SRP_5_16_1 ) || - ( dataCollector.TemplateDataCollectorInstance.IsLWRP && ASEPackageManagerHelper.CurrentLWVersion > ASESRPVersions.ASE_SRP_5_16_1 )) - return SRPTime[ outputId - 1 ]; - } -#endif - return base.GenerateShaderForOutput( outputId, ref dataCollector, ignoreLocalvar ); - } - } -} diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/TimeNode.cs.meta b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/TimeNode.cs.meta deleted file mode 100644 index 521dcf41..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/Time/TimeNode.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d8c6b7bfb7784e14d8708ab6fb981268 -timeCreated: 1481126959 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: |