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/FogAndAmbient | |
parent | 917e9e0b320775634dc2e710f7deac74fd0822f0 (diff) |
*移动amplify shader editor到third party目录
Diffstat (limited to 'Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/FogAndAmbient')
4 files changed, 0 insertions, 182 deletions
diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/FogAndAmbient/FogAndAmbientColorsNode.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/FogAndAmbient/FogAndAmbientColorsNode.cs deleted file mode 100644 index 2af78f78..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/FogAndAmbient/FogAndAmbientColorsNode.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Amplify Shader Editor - Visual Shader Editing Tool -// Copyright (c) Amplify Creations, Lda <info@amplify.pt> - -using UnityEngine; -using UnityEditor; -using System; - -namespace AmplifyShaderEditor -{ - public enum BuiltInFogAndAmbientColors - { - UNITY_LIGHTMODEL_AMBIENT = 0, - unity_AmbientSky, - unity_AmbientEquator, - unity_AmbientGround, - unity_FogColor - } - - [Serializable] - [NodeAttributes( "Fog And Ambient Colors", "Light", "Fog and Ambient colors" )] - public sealed class FogAndAmbientColorsNode : ShaderVariablesNode - { - private const string ColorLabelStr = "Color"; - private readonly string[] ColorValuesStr = { - "Ambient light ( Legacy )", - "Sky ambient light", - "Equator ambient light", - "Ground ambient light", - "Fog" - }; - - [SerializeField] - private BuiltInFogAndAmbientColors m_selectedType = BuiltInFogAndAmbientColors.UNITY_LIGHTMODEL_AMBIENT; - - private UpperLeftWidgetHelper m_upperLeftWidget = new UpperLeftWidgetHelper(); - - protected override void CommonInit( int uniqueId ) - { - base.CommonInit( uniqueId ); - ChangeOutputProperties( 0, ColorValuesStr[ ( int ) m_selectedType ], WirePortDataType.COLOR ); - m_textLabelWidth = 50; - m_autoWrapProperties = true; - m_hasLeftDropdown = true; - m_previewShaderGUID = "937c7bde062f0f942b600d9950d2ebb2"; - } - - public override void AfterCommonInit() - { - base.AfterCommonInit(); - if( PaddingTitleLeft == 0 ) - { - PaddingTitleLeft = Constants.PropertyPickerWidth + Constants.IconsLeftRightMargin; - if( PaddingTitleRight == 0 ) - PaddingTitleRight = Constants.PropertyPickerWidth + Constants.IconsLeftRightMargin; - } - } - - public override void SetPreviewInputs() - { - base.SetPreviewInputs(); - m_previewMaterialPassId = (int)m_selectedType; - } - - public override void Destroy() - { - base.Destroy(); - m_upperLeftWidget = null; - } - - public override void Draw( DrawInfo drawInfo ) - { - base.Draw( drawInfo ); - EditorGUI.BeginChangeCheck(); - m_selectedType = (BuiltInFogAndAmbientColors)m_upperLeftWidget.DrawWidget( this, (int)m_selectedType, ColorValuesStr ); - if( EditorGUI.EndChangeCheck() ) - { - ChangeOutputName( 0, ColorValuesStr[ (int)m_selectedType ] ); - } - } - - public override void DrawProperties() - { - base.DrawProperties(); - EditorGUI.BeginChangeCheck(); - m_selectedType = ( BuiltInFogAndAmbientColors ) EditorGUILayoutPopup( ColorLabelStr, ( int ) m_selectedType, ColorValuesStr ); - - if ( EditorGUI.EndChangeCheck() ) - { - ChangeOutputName( 0, ColorValuesStr[ ( int ) m_selectedType ] ); - } - } - - public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar ) - { - base.GenerateShaderForOutput( outputId, ref dataCollector, ignoreLocalvar ); - if( dataCollector.IsTemplate && dataCollector.CurrentSRPType == TemplateSRPType.HD ) - { - switch( m_selectedType ) - { - case BuiltInFogAndAmbientColors.unity_AmbientSky: - return "_Ambient_ColorSky"; - case BuiltInFogAndAmbientColors.unity_AmbientEquator: - return "_Ambient_Equator"; - case BuiltInFogAndAmbientColors.unity_AmbientGround: - return "_Ambient_Ground"; - case BuiltInFogAndAmbientColors.unity_FogColor: - return "_FogColor"; - } - } - return m_selectedType.ToString(); - } - - public override void ReadFromString( ref string[] nodeParams ) - { - base.ReadFromString( ref nodeParams ); - m_selectedType = ( BuiltInFogAndAmbientColors ) Enum.Parse( typeof( BuiltInFogAndAmbientColors ), GetCurrentParam( ref nodeParams ) ); - ChangeOutputName( 0, ColorValuesStr[ ( int ) m_selectedType ] ); - } - - public override void WriteToString( ref string nodeInfo, ref string connectionsInfo ) - { - base.WriteToString( ref nodeInfo, ref connectionsInfo ); - IOUtils.AddFieldValueToString( ref nodeInfo, m_selectedType ); - } - } -} diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/FogAndAmbient/FogAndAmbientColorsNode.cs.meta b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/FogAndAmbient/FogAndAmbientColorsNode.cs.meta deleted file mode 100644 index f2ab7d02..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/FogAndAmbient/FogAndAmbientColorsNode.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e2bdfc2fa6fcd0640b01a8b7448a1a11 -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/FogAndAmbient/FogParamsNode.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/FogAndAmbient/FogParamsNode.cs deleted file mode 100644 index 63a635d1..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/FogAndAmbient/FogParamsNode.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Amplify Shader Editor - Visual Shader Editing Tool -// Copyright (c) Amplify Creations, Lda <info@amplify.pt> - -using System; -namespace AmplifyShaderEditor -{ - [Serializable] - [NodeAttributes( "Fog Params", "Light", "Parameters for fog calculation" )] - public sealed class FogParamsNode : ConstVecShaderVariable - { - protected override void CommonInit( int uniqueId ) - { - base.CommonInit( uniqueId ); - ChangeOutputName( 1, "Density/Sqrt(Ln(2))" ); - ChangeOutputName( 2, "Density/Ln(2)" ); - ChangeOutputName( 3, "-1/(End-Start)" ); - ChangeOutputName( 4, "End/(End-Start))" ); - m_value = "unity_FogParams"; - m_previewShaderGUID = "42abde3281b1848438c3b53443c91a1e"; - } - - 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/FogAndAmbient/FogParamsNode.cs.meta b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/FogAndAmbient/FogParamsNode.cs.meta deleted file mode 100644 index ccc0df5e..00000000 --- a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/FogAndAmbient/FogParamsNode.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a3d8c31159e07bc419a7484ab5e894ed -timeCreated: 1481126958 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: |