ADD : 유니티 버전 업 및 에셋 업데이트

This commit is contained in:
KINDNICK 2025-10-07 00:18:29 +09:00
parent 24c5145ff4
commit 11e1d6dbe1
1379 changed files with 12125 additions and 24291 deletions

View File

@ -5,7 +5,7 @@
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": true,
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,

View File

@ -9,6 +9,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/AmplifyShaderEditor.asmdef
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/AmplifyShaderEditor.asmdef
uploadId: 782635

BIN
Assets/External/AmplifyShaderEditor/ChangeLog.txt (Stored with Git LFS) vendored

Binary file not shown.

View File

@ -10,6 +10,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/ChangeLog.txt
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/ChangeLog.txt
uploadId: 782635

View File

@ -10,6 +10,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Examples/Credits.txt
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Examples/Credits.txt
uploadId: 782635

View File

@ -10,6 +10,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Examples/README Samples.txt
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Examples/README Samples.txt
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Actions/ActionData.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Actions/ActionData.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Actions/ActionLog.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Actions/ActionLog.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Actions/ActionSequence.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Actions/ActionSequence.cs
uploadId: 782635

View File

@ -74,9 +74,6 @@ namespace AmplifyShaderEditor
"#define ASE_TEXTURE2D_ARRAY_PARAMS(textureName) textureName, sampler##textureName\n"
};*/
public readonly static RenderTextureFormat PreviewFormat = RenderTextureFormat.ARGBFloat;
public readonly static int PreviewSize = 128;
public readonly static List<string> UnityNativeInspectors = new List<string>
{
"Rendering.HighDefinition.LightingShaderGraphGUI",
@ -492,6 +489,7 @@ namespace AmplifyShaderEditor
public readonly static string SubTitleVarNameFormatStr = "Var( {0} )";
public readonly static string SubTitleRefNameFormatStr = "Ref( {0} )";
public readonly static string SubTitleCurrentFormatStr = "Current( {0} )";
public readonly static string SubTitleUVChannelFormatStr = "Channel( {0}, vec{1} )";
public readonly static string CodeWrapper = "( {0} )";
public readonly static string InlineCodeWrapper = "{{\n{0}\n}}";
@ -562,9 +560,8 @@ namespace AmplifyShaderEditor
public readonly static string IncidentVecVertStr = VertexShaderOutputStr + "." + IncidentVecNameStr;
public readonly static string WorldNormalLocalDecStr = "WorldNormalVector( " + Constants.InputVarStr + " , {0}( 0,0,1 ))";
public readonly static string IsFrontFacingVariable = "ASEIsFrontFacing";
public readonly static string IsFrontFacingInput = "half ASEIsFrontFacing : SV_IsFrontFacing";
public readonly static string IsFrontFacingInputVFACE = "half ASEIsFrontFacing : VFACE";
public readonly static string IsFrontFaceVariable = "ASEIsFrontFace";
public readonly static string IsFrontFaceInput = "uint ASEIsFrontFace : SV_IsFrontFace";
public readonly static string ColorVariable = "vertexColor";
public readonly static string ColorInput = "float4 vertexColor : COLOR";

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Constants.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Constants.cs
uploadId: 782635

View File

@ -13,6 +13,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/CustomDrawers/ASEEndDecorator.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/CustomDrawers/ASEEndDecorator.cs
uploadId: 782635

View File

@ -186,16 +186,23 @@ namespace AmplifyShaderEditor
}
object LHSVal = null;
#if UNITY_6000_2_OR_NEWER
int lhsPropType = ( int )LHSprop.propertyType;
#else
int lhsPropType = ( int )LHSprop.type;
#endif
bool test = false;
switch ( LHSprop.type )
switch ( lhsPropType )
{
case MaterialProperty.PropType.Color:
case MaterialProperty.PropType.Vector:
LHSVal = LHSprop.type == MaterialProperty.PropType.Color ? ( Vector4 )LHSprop.colorValue : LHSprop.vectorValue;
case ( int )UnityEngine.Rendering.ShaderPropertyType.Color:
case ( int )UnityEngine.Rendering.ShaderPropertyType.Vector:
LHSVal = lhsPropType == ( int )UnityEngine.Rendering.ShaderPropertyType.Color ? ( Vector4 )LHSprop.colorValue : LHSprop.vectorValue;
var v4 = ExpectedValue as Vector4?;
v4 = v4.HasValue ? v4 : new Vector4( ( System.Single )ExpectedValue, float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity );
if ( LHSprop.type == MaterialProperty.PropType.Color )
if ( lhsPropType == ( int )UnityEngine.Rendering.ShaderPropertyType.Color )
{
test = VectorCheck( ( Vector4 )LHSVal, op, v4 / 255 );
@ -203,12 +210,12 @@ namespace AmplifyShaderEditor
else
test = VectorCheck( ( Vector4 )LHSVal, op, v4 );
break;
case MaterialProperty.PropType.Range:
case MaterialProperty.PropType.Float:
case ( int )UnityEngine.Rendering.ShaderPropertyType.Range:
case ( int )UnityEngine.Rendering.ShaderPropertyType.Float:
LHSVal = LHSprop.floatValue;
test = ( Check( LHSVal, op, ExpectedValue ) );
break;
case MaterialProperty.PropType.Texture:
case ( int )UnityEngine.Rendering.ShaderPropertyType.Texture:
LHSVal = LHSprop.textureValue;
test = ( CheckObject( LHSVal, op, ExpectedValue ) );
break;

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/CustomDrawers/EditableIf.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/CustomDrawers/EditableIf.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/CustomDrawers/NoKeywordToggle.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/CustomDrawers/NoKeywordToggle.cs
uploadId: 782635

View File

@ -13,6 +13,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/CustomDrawers/RemapSliders.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/CustomDrawers/RemapSliders.cs
uploadId: 782635

View File

@ -13,6 +13,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/CustomDrawers/RemapSlidersFull.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/CustomDrawers/RemapSlidersFull.cs
uploadId: 782635

View File

@ -13,6 +13,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/CustomDrawers/SingleLineTexture.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/CustomDrawers/SingleLineTexture.cs
uploadId: 782635

View File

@ -9,7 +9,11 @@ namespace AmplifyShaderEditor
{
public override void Action( int instanceId, string pathName, string resourceFile )
{
#if UNITY_6000_3_OR_NEWER
UnityEngine.Object obj = EditorUtility.EntityIdToObject( instanceId );
#else
UnityEngine.Object obj = EditorUtility.InstanceIDToObject( instanceId );
#endif
AssetDatabase.CreateAsset( obj, AssetDatabase.GenerateUniqueAssetPath( pathName ) );
AmplifyShaderEditorWindow.LoadShaderFunctionToASE( (AmplifyShaderFunction)obj, false );
}

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/DoCreateFunction.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/DoCreateFunction.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/DoCreateShader.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/DoCreateShader.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/EditorOptions.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/EditorOptions.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Graphs/NodeGrid.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Graphs/NodeGrid.cs
uploadId: 782635

View File

@ -118,6 +118,9 @@ namespace AmplifyShaderEditor
[SerializeField]
private UsageListStaticSwitchNodes m_staticSwitchNodes = new UsageListStaticSwitchNodes();
[SerializeField]
private UsageListToggleSwitchNodes m_toggleSwitchNodes = new UsageListToggleSwitchNodes();
[SerializeField]
private int m_masterNodeId = Constants.INVALID_NODE_ID;
@ -231,6 +234,9 @@ namespace AmplifyShaderEditor
m_staticSwitchNodes = new UsageListStaticSwitchNodes();
m_staticSwitchNodes.ContainerGraph = this;
m_staticSwitchNodes.ReorderOnChange = true;
m_toggleSwitchNodes = new UsageListToggleSwitchNodes();
m_toggleSwitchNodes.ContainerGraph = this;
m_toggleSwitchNodes.ReorderOnChange = true;
m_screenColorNodes = new UsageListScreenColorNodes();
m_screenColorNodes.ContainerGraph = this;
m_screenColorNodes.ReorderOnChange = true;
@ -314,6 +320,7 @@ namespace AmplifyShaderEditor
m_rawPropertyNodes.UpdateNodeArr();
m_customExpressionsOnFunctionMode.UpdateNodeArr();
m_staticSwitchNodes.UpdateNodeArr();
m_toggleSwitchNodes.UpdateNodeArr();
m_functionInputNodes.UpdateNodeArr();
m_functionNodes.UpdateNodeArr();
m_functionOutputNodes.UpdateNodeArr();
@ -421,6 +428,7 @@ namespace AmplifyShaderEditor
m_rawPropertyNodes.Clear();
m_customExpressionsOnFunctionMode.Clear();
m_staticSwitchNodes.Clear();
m_toggleSwitchNodes.Clear();
m_functionInputNodes.Clear();
m_functionNodes.Clear();
m_functionOutputNodes.Clear();
@ -637,6 +645,8 @@ namespace AmplifyShaderEditor
m_staticSwitchNodes.Clear();
m_toggleSwitchNodes.Clear();
m_functionInputNodes.Clear();
//m_functionInputNodes = null;
@ -740,6 +750,9 @@ namespace AmplifyShaderEditor
m_staticSwitchNodes.Destroy();
m_staticSwitchNodes = null;
m_toggleSwitchNodes.Destroy();
m_toggleSwitchNodes = null;
m_functionInputNodes.Destroy();
m_functionInputNodes = null;
@ -1349,7 +1362,9 @@ namespace AmplifyShaderEditor
// UIUtils.FunctionSwitchCopyList()[ i ].CheckReference();
//}
// @diogo: when loading we only need to call OnNodeChange once for every node, where branch connections to multiple inputs sometimes causes
// the same node to be visited multiple times; avoid it
var nodeCache = new NodeUpdateCache();
// Dont use nodeCount variable because node count can change in this loop???
nodeCount = m_nodes.Count;
@ -1365,7 +1380,7 @@ namespace AmplifyShaderEditor
node.MovingInFrame = false;
if( drawInfo.CurrentEventType == EventType.Repaint )
node.OnNodeLayout( drawInfo );
node.OnNodeLayout( drawInfo, nodeCache );
m_hasUnConnectedNodes = m_hasUnConnectedNodes ||
( node.ConnStatus != NodeConnectionStatus.Connected && node.ConnStatus != NodeConnectionStatus.Island );
@ -3628,6 +3643,19 @@ namespace AmplifyShaderEditor
}
}
public bool HasPassWithTag( int lod, string tagKey, string tagValue = "" )
{
var passes = GetMultiPassMasterNodes( lod );
foreach ( TemplateMultiPassMasterNode pass in passes )
{
if ( pass.PassModule != null && pass.PassModule.TagsHelper != null && pass.PassModule.TagsHelper.HasTag( tagKey, tagValue ) )
{
return true;
}
}
return false;
}
public bool HasVirtualTexture { get { return m_virtualTextureCount > 0; } }
public void AddInstancePropertyCount()
@ -3984,6 +4012,7 @@ namespace AmplifyShaderEditor
public UsageListPropertyNodes RawPropertyNodes { get { return m_rawPropertyNodes; } }
public UsageListCustomExpressionsOnFunctionMode CustomExpressionOnFunctionMode { get { return m_customExpressionsOnFunctionMode; } }
public UsageListStaticSwitchNodes StaticSwitchNodes { get { return m_staticSwitchNodes; } }
public UsageListToggleSwitchNodes ToggleSwitchNodes { get { return m_toggleSwitchNodes; } }
public UsageListScreenColorNodes ScreenColorNodes { get { return m_screenColorNodes; } }
public UsageListRegisterLocalVarNodes LocalVarNodes { get { return m_localVarNodes; } }
public UsageListGlobalArrayNodes GlobalArrayNodes { get { return m_globalArrayNodes; } }

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Graphs/ParentGraph.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Graphs/ParentGraph.cs
uploadId: 782635

View File

@ -321,7 +321,7 @@ namespace AmplifyShaderEditor
private bool m_maximizeMessages = false;
[NonSerialized]
private Dictionary<string, OutputPort> m_savedList = new Dictionary<string, OutputPort>();
private Dictionary<(string,string), OutputPort> m_savedList = new Dictionary<(string,string), OutputPort>();
public int m_frameCounter = 0;
public double m_fpsTime = 0;
@ -339,6 +339,7 @@ namespace AmplifyShaderEditor
public bool CheckFunctions = false;
private static System.Diagnostics.Stopwatch m_batchTimer = new System.Diagnostics.Stopwatch();
private static Action m_batchOnFinish = null;
// Unity Menu item
[MenuItem( "Window/Amplify Shader Editor/Open Canvas", false, 1000 )]
@ -561,8 +562,10 @@ namespace AmplifyShaderEditor
}
}
public static void LoadAndSaveList( string[] assetList )
public static void LoadAndSaveList( string[] assetList, Action onFinish = null )
{
m_batchOnFinish += onFinish;
m_batchTimer.Reset();
m_batchTimer.Start();
@ -647,7 +650,7 @@ namespace AmplifyShaderEditor
ASEPackageManagerHelper.RequestInfo();
ASEPackageManagerHelper.Update();
Shader.SetGlobalVector( PreviewSizeGlobalVariable, new Vector4( Constants.PreviewSize , Constants.PreviewSize , 0, 0 ) );
Shader.SetGlobalVector( PreviewSizeGlobalVariable, new Vector4( Preferences.User.PreviewSize , Preferences.User.PreviewSize , 0, 0 ) );
if( m_templatesManager == null )
{
@ -1053,9 +1056,6 @@ namespace AmplifyShaderEditor
m_templatesManager = null;
IOUtils.Destroy();
Resources.UnloadUnusedAssets();
GC.Collect();
}
void Init()
@ -1103,7 +1103,11 @@ namespace AmplifyShaderEditor
return false;
}
#if UNITY_6000_3_OR_NEWER
UnityEngine.Object selection = EditorUtility.EntityIdToObject( instanceID );
#else
UnityEngine.Object selection = EditorUtility.InstanceIDToObject( instanceID );
#endif
ASEPackageManagerHelper.RequestInfo();
ASEPackageManagerHelper.Update();
@ -1594,6 +1598,9 @@ namespace AmplifyShaderEditor
Debug.Log( "[AmplifyShaderEditor] Finished compiling" + name + " in " + compileTimeInSeconds.ToString( "0.00" ) + " seconds." );
}
public static bool s_isSavingToDisk = false;
public static bool IsSavingToDisk { get { return s_isSavingToDisk; } }
public bool SaveToDisk( bool checkTimestamp )
{
if( checkTimestamp )
@ -1613,6 +1620,8 @@ namespace AmplifyShaderEditor
var timer = new System.Diagnostics.Stopwatch();
timer.Start();
s_isSavingToDisk = true;
m_customGraph = null;
m_cacheSaveOp = false;
ShaderIsModified = false;
@ -1730,6 +1739,8 @@ namespace AmplifyShaderEditor
succeeded = true;
}
s_isSavingToDisk = false;
timer.Stop();
if ( Preferences.User.LogShaderCompile )
{
@ -1964,7 +1975,10 @@ namespace AmplifyShaderEditor
var cacher = RenderTexture.active;
RenderTexture.active = null;
Texture2D m_screenshotTex2D = new Texture2D( (int)position.width, (int)position.height, TextureFormat.RGB24, false );
int pixelWidth = Mathf.RoundToInt( position.width * EditorGUIUtility.pixelsPerPoint );
int pixelHeight = Mathf.RoundToInt( position.height * EditorGUIUtility.pixelsPerPoint );
Texture2D m_screenshotTex2D = new Texture2D( pixelWidth, pixelHeight, TextureFormat.RGB24, false );
m_screenshotTex2D.ReadPixels( new Rect( 0, 0, m_screenshotTex2D.width, m_screenshotTex2D.height ), 0, 0 );
m_screenshotTex2D.Apply();
@ -3279,14 +3293,23 @@ namespace AmplifyShaderEditor
return;
UIUtils.ClearUndoHelper();
ParentNode[] selectedNodes = new ParentNode[ m_mainGraphInstance.SelectedNodes.Count ];
for( int i = 0; i < selectedNodes.Length; i++ )
List<ParentNode> selectedNodeList = new List<ParentNode>( m_mainGraphInstance.SelectedNodes.Count );
foreach( var node in m_mainGraphInstance.SelectedNodes )
{
selectedNodes[ i ] = m_mainGraphInstance.SelectedNodes[ i ];
selectedNodes[ i ].Rewire();
UIUtils.CheckUndoNode( selectedNodes[ i ] );
// @diogo: needs work... can't delete single wire nodes
//if ( node.GetType() == typeof( WireNode ) )
//{
// // @diogo: these seem to be marked for deletion and processed on a late-stage sweep via ParentGraph.UndoableDeleteSelectedNodes()
// continue;
//}
node.Rewire();
UIUtils.CheckUndoNode( node );
selectedNodeList.Add( node );
}
var selectedNodes = selectedNodeList.ToArray();
//Check nodes connected to deleted nodes to preserve connections on undo
List<ParentNode> extraNodes = new List<ParentNode>();
for( int selectedNodeIdx = 0; selectedNodeIdx < selectedNodes.Length; selectedNodeIdx++ )
@ -3653,9 +3676,9 @@ namespace AmplifyShaderEditor
return null;
ParentNode newNode = (ParentNode)ScriptableObject.CreateInstance( nodeType );
newNode.IsNodeBeingCopied = true;
if( newNode != null )
{
newNode.IsNodeBeingCopied = true;
newNode.ContainerGraph = m_mainGraphInstance;
newNode.ClipboardFullReadFromString( ref parameters );
m_mainGraphInstance.AddNode( newNode, true, true, true, false );
@ -3800,6 +3823,16 @@ namespace AmplifyShaderEditor
}
}
void ReconnectClipboardReferences( List<ParentNode> createdNodes )
{
// @diogo: Restore reference connections (e.g. Switch node) lost due to new UniqueIDs
foreach ( ParentNode node in createdNodes )
{
node.ReconnectClipboardReferences( m_clipboard );
}
}
void PasteFromClipboard( bool copyConnections )
{
string result = EditorGUIUtility.systemCopyBuffer.Replace( "http://", "https://" );
@ -3864,6 +3897,8 @@ namespace AmplifyShaderEditor
{
CreateConnectionsFromClipboardData( i );
}
ReconnectClipboardReferences( createdNodes );
}
// Refresh external references must always be called after all nodes are created
@ -5302,6 +5337,12 @@ namespace AmplifyShaderEditor
{
EditorPrefs.DeleteKey( ASEFileList );
if ( m_batchOnFinish != null )
{
m_batchOnFinish();
m_batchOnFinish = null;
}
m_batchTimer.Stop();
if ( Preferences.User.LogBatchCompile )
{
@ -5524,6 +5565,8 @@ namespace AmplifyShaderEditor
return node;
}
private double m_previewUpdateLimiterTime = 0;
public void UpdateNodePreviewListAndTime()
{
if( UIUtils.CurrentWindow != this )
@ -5532,7 +5575,7 @@ namespace AmplifyShaderEditor
double deltaTime = Time.realtimeSinceStartup - m_time;
m_time = Time.realtimeSinceStartup;
if( DebugConsoleWindow.DeveloperMode )
if ( DebugConsoleWindow.DeveloperMode )
{
m_frameCounter++;
if( m_frameCounter >= 60 )
@ -5602,7 +5645,15 @@ namespace AmplifyShaderEditor
}
Shader.SetGlobalFloat( "_EditorTime", (float)m_time );
Shader.SetGlobalFloat( "_EditorDeltaTime", (float)deltaTime );
// @diogo: limit preview update frequency to keep the CPU usage under control
m_previewUpdateLimiterTime += deltaTime;
if ( Math.Abs( m_previewUpdateLimiterTime ) < 1.0 / Preferences.User.PreviewUpdateFrequency )
{
return;
}
m_previewUpdateLimiterTime = 0;
/////////// UPDATE PREVIEWS //////////////
UIUtils.CheckNullMaterials();
UIUtils.SetPreviewShaderConstants();
@ -5768,10 +5819,14 @@ namespace AmplifyShaderEditor
if( m_mainGraphInstance.CurrentMasterNode.InputPorts[ i ].IsConnected )
{
string name = m_mainGraphInstance.CurrentMasterNode.InputPorts[ i ].Name;
OutputPort op = m_mainGraphInstance.CurrentMasterNode.InputPorts[ i ].GetOutputConnection();
if( !m_savedList.ContainsKey( name ) )
string externalLinkID = m_mainGraphInstance.CurrentMasterNode.InputPorts[ i ].ExternalLinkId;
( string, string ) ids = ( name, externalLinkID );
if( !m_savedList.ContainsKey( ids ) )
{
m_savedList.Add( name, op );
OutputPort op = m_mainGraphInstance.CurrentMasterNode.InputPorts[ i ].GetOutputConnection();
m_savedList.Add( ids, op );
}
}
}
@ -5858,10 +5913,18 @@ namespace AmplifyShaderEditor
{
foreach( var item in m_savedList )
{
string name = item.Key;
string name = item.Key.Item1;
string externalLinkID = item.Key.Item2;
OutputPort op = item.Value;
InputPort ip = m_mainGraphInstance.CurrentMasterNode.InputPorts.Find( x => x.Name == name );
if ( ip == null)
{
// @diogo: try again, by externalLinkID
ip = m_mainGraphInstance.CurrentMasterNode.InputPorts.Find( x => x.ExternalLinkId == externalLinkID );
}
if( op != null && ip != null && ip.Visible )
{
var iNode = UIUtils.GetNode( ip.NodeId );

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderFunction.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderFunction.cs
uploadId: 782635

View File

@ -12,10 +12,12 @@ namespace AmplifyShaderEditor
{
class FunctionDependency
{
public bool Selected = true;
public string AssetName;
public string AssetPath;
public FunctionDependency(string name, string path)
{
Selected = true;
AssetName = name;
AssetPath = path;
}
@ -40,13 +42,14 @@ namespace AmplifyShaderEditor
//EditorGUILayout.Separator();
//m_target.FunctionInfo = EditorGUILayout.TextArea( m_target.FunctionInfo );
if( m_target.Description.Length > 0 )
if ( m_target.Description.Length > 0 )
{
EditorGUILayout.HelpBox( m_target.Description, MessageType.Info );
}
EditorGUILayout.Space();
if( GUILayout.Button( "Search Direct Dependencies" ) )
if ( GUILayout.Button( "Search Direct Dependencies" ) )
{
m_dependencies.Clear();
string guid = AssetDatabase.AssetPathToGUID( AssetDatabase.GetAssetPath( m_target ) );
@ -76,45 +79,67 @@ namespace AmplifyShaderEditor
}
}
}
GUI.enabled = ( m_dependencies.Count > 0 );
int selectedCount = 0;
for( int i = 0; i < m_dependencies.Count; i++ )
{
selectedCount += m_dependencies[ i ].Selected ? 1 : 0;
}
if ( GUILayout.Button( "Open and Save " + ( selectedCount == m_dependencies.Count ? "All" : "Selected" ) ) )
{
List<string> assetPaths = new List<string>();
for ( int i = 0; i < m_dependencies.Count; i++ )
{
if ( m_dependencies[ i ].Selected )
{
assetPaths.Add( m_dependencies[ i ].AssetPath );
}
}
bool doit = EditorUtility.DisplayDialog( "Open and Save All", "This will try to open all shader function and shaders that use this shader function and save them in quick succession, this may irreversibly break your files if something goes wrong. Are you sure you want to try?", "Yes, I'll take the risk", "No, I'll do it myself" );
if ( doit )
AmplifyShaderEditorWindow.LoadAndSaveList( assetPaths.ToArray() );
}
GUI.enabled = true;
EditorGUILayout.Space();
for( int i = 0; i < m_dependencies.Count; i++ )
{
EditorGUILayout.BeginHorizontal();
EditorGUILayout.BeginVertical(GUILayout.Width( 12 ));
GUILayout.FlexibleSpace();
m_dependencies[ i ].Selected = GUILayout.Toggle( m_dependencies[ i ].Selected, "", GUILayout.Width( 12 ), GUILayout.Height( 20 ) );
GUILayout.FlexibleSpace();
EditorGUILayout.EndVertical();
GUILayout.Space( 3 );
if( GUILayout.Button( m_dependencies[ i ].AssetName, "minibuttonleft" ) )
{
SelectAtPath( m_dependencies[ i ].AssetPath );
}
if( GUILayout.Button( "edit", "minibuttonright", GUILayout.Width(100) ) )
{
if( m_dependencies[ i ].AssetName.EndsWith( ".asset" ) )
{
var obj = AssetDatabase.LoadAssetAtPath<AmplifyShaderFunction>( m_dependencies[ i ].AssetPath );
AmplifyShaderEditorWindow.LoadShaderFunctionToASE( obj, false );
}
}
else
{
var obj = AssetDatabase.LoadAssetAtPath<Shader>( m_dependencies[ i ].AssetPath );
AmplifyShaderEditorWindow.ConvertShaderToASE( obj );
}
}
EditorGUILayout.EndHorizontal();
}
if( m_dependencies.Count > 0 )
{
List<string> assetPaths = new List<string>();
for( int i = 0; i < m_dependencies.Count; i++ )
{
assetPaths.Add( m_dependencies[ i ].AssetPath );
}
if( GUILayout.Button( "Open and Save All" ) )
{
bool doit = EditorUtility.DisplayDialog( "Open and Save All", "This will try to open all shader function and shaders that use this shader function and save them in quick succession, this may irreversibly break your files if something goes wrong. Are you sure you want to try?", "Yes, I'll take the risk", "No, I'll do it myself" );
if( doit )
AmplifyShaderEditorWindow.LoadAndSaveList( assetPaths.ToArray() );
}
}
}
public void SelectAtPath( string path )

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderFunctionEditor.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderFunctionEditor.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AutoPanData.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/AutoPanData.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/Clipboard.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/Clipboard.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/ConfirmationWindow.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/ConfirmationWindow.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/ConsoleLogWindow.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/ConsoleLogWindow.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/ContextMenuItem.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/ContextMenuItem.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/CustomStylesContainer.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/CustomStylesContainer.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/DebugConsoleWindow.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/DebugConsoleWindow.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/DragAndDropTool.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/DragAndDropTool.cs
uploadId: 782635

View File

@ -16,7 +16,7 @@ namespace AmplifyShaderEditor
private const string IntNameStr = "Int ";
private const string FloatNameStr = "Float ";
private const string ColorNameStr = "Color ";
[SerializeField]
private int[] m_availableUVChannelsArray = { -1, -1, -1, -1 };
private string[] m_availableUVChannelsNamesArray = { "null",
@ -175,7 +175,7 @@ namespace AmplifyShaderEditor
return true;
}
}
m_availableUniformNames.Add( name, nodeId );
return true;
}
@ -270,6 +270,7 @@ namespace AmplifyShaderEditor
name = VectorNameStr;
}
break;
case WirePortDataType.FLOAT2x2:
case WirePortDataType.FLOAT3x3:
case WirePortDataType.FLOAT4x4:
{
@ -290,7 +291,7 @@ namespace AmplifyShaderEditor
{
string inspectorName = name + count;
string propertyName = UIUtils.GeneratePropertyName( inspectorName , PropertyType.Property );
if ( IsUniformNameAvailable( propertyName ) )
{
outInspector = inspectorName;

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/DuplicatePreventionBuffer.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/DuplicatePreventionBuffer.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/GraphContextMenu.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/GraphContextMenu.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/MenuParent.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/MenuParent.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/NodeParametersWindow.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/NodeParametersWindow.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/NodeWireReferencesUtils.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/NodeWireReferencesUtils.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/Palette/ContextPalette.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/Palette/ContextPalette.cs
uploadId: 782635

View File

@ -37,7 +37,7 @@ namespace AmplifyShaderEditor
protected Dictionary<string, PaletteFilterData> m_currentCategories;
private bool m_forceUpdate = true;
protected bool m_usingSearchFilter = false;
protected string m_searchFilter = string.Empty;
private float m_searchLabelSize = -1;
@ -79,6 +79,71 @@ namespace AmplifyShaderEditor
List<ContextMenuItem> allItems = ParentWindow.ContextMenuInstance.MenuItems;
if ( Event.current.type == EventType.Layout && m_forceUpdate )
{
m_forceUpdate = false;
//m_currentItems.Clear();
m_currentCategories.Clear();
if( m_usingSearchFilter )
{
for( int i = 0; i < allItems.Count; i++ )
{
//m_currentItems.Add( allItems[ i ] );
if( !m_currentCategories.ContainsKey( allItems[ i ].Category ) )
{
m_currentCategories.Add( allItems[ i ].Category, new PaletteFilterData( m_defaultCategoryVisible ) );
//m_currentCategories[ allItems[ i ].Category ].HasCommunityData = allItems[ i ].NodeAttributes.FromCommunity || m_currentCategories[ allItems[ i ].Category ].HasCommunityData;
}
m_currentCategories[ allItems[ i ].Category ].Contents.Add( allItems[ i ] );
}
}
else
{
for( int i = 0; i < allItems.Count; i++ )
{
var searchList = m_searchFilter.Trim( ' ' ).ToLower().Split(' ');
int matchesFound = 0;
for( int k = 0; k < searchList.Length; k++ )
{
MatchCollection wordmatch = Regex.Matches( allItems[ i ].Tags, "\\b"+searchList[ k ] );
if( wordmatch.Count > 0 )
matchesFound++;
else
break;
}
if( searchList.Length == matchesFound )
{
//m_currentItems.Add( allItems[ i ] );
if( !m_currentCategories.ContainsKey( allItems[ i ].Category ) )
{
m_currentCategories.Add( allItems[ i ].Category, new PaletteFilterData( m_defaultCategoryVisible ) );
//m_currentCategories[ allItems[ i ].Category ].HasCommunityData = allItems[ i ].NodeAttributes.FromCommunity || m_currentCategories[ allItems[ i ].Category ].HasCommunityData;
}
m_currentCategories[ allItems[ i ].Category ].Contents.Add( allItems[ i ] );
}
}
}
var categoryEnumerator = m_currentCategories.GetEnumerator();
while( categoryEnumerator.MoveNext() )
{
categoryEnumerator.Current.Value.Contents.Sort( ( x, y ) => x.CompareTo( y, m_usingSearchFilter ) );
}
//sort current list respecting categories
m_currentItems.Clear();
foreach( var item in m_currentCategories )
{
for( int i = 0; i < item.Value.Contents.Count; i++ )
{
m_currentItems.Add( item.Value.Contents[ i ] );
}
}
}
if( m_searchLabelSize < 0 )
{
m_searchLabelSize = GUI.skin.label.CalcSize( new GUIContent( m_searchFilterStr ) ).x;
@ -164,71 +229,6 @@ namespace AmplifyShaderEditor
m_currScrollBarDims.y = m_transformedArea.height - 2 - 16 - 2 - 7 * m_initialSeparatorAmount - 2;
m_currentScrollPos = EditorGUILayout.BeginScrollView( m_currentScrollPos/*, GUILayout.Width( 242 ), GUILayout.Height( 250 - 2 - 16 - 2 - 7 - 2) */);
{
if( m_forceUpdate )
{
m_forceUpdate = false;
//m_currentItems.Clear();
m_currentCategories.Clear();
if( usingSearchFilter )
{
for( int i = 0; i < allItems.Count; i++ )
{
//m_currentItems.Add( allItems[ i ] );
if( !m_currentCategories.ContainsKey( allItems[ i ].Category ) )
{
m_currentCategories.Add( allItems[ i ].Category, new PaletteFilterData( m_defaultCategoryVisible ) );
//m_currentCategories[ allItems[ i ].Category ].HasCommunityData = allItems[ i ].NodeAttributes.FromCommunity || m_currentCategories[ allItems[ i ].Category ].HasCommunityData;
}
m_currentCategories[ allItems[ i ].Category ].Contents.Add( allItems[ i ] );
}
}
else
{
for( int i = 0; i < allItems.Count; i++ )
{
var searchList = m_searchFilter.Trim( ' ' ).ToLower().Split(' ');
int matchesFound = 0;
for( int k = 0; k < searchList.Length; k++ )
{
MatchCollection wordmatch = Regex.Matches( allItems[ i ].Tags, "\\b"+searchList[ k ] );
if( wordmatch.Count > 0 )
matchesFound++;
else
break;
}
if( searchList.Length == matchesFound )
{
//m_currentItems.Add( allItems[ i ] );
if( !m_currentCategories.ContainsKey( allItems[ i ].Category ) )
{
m_currentCategories.Add( allItems[ i ].Category, new PaletteFilterData( m_defaultCategoryVisible ) );
//m_currentCategories[ allItems[ i ].Category ].HasCommunityData = allItems[ i ].NodeAttributes.FromCommunity || m_currentCategories[ allItems[ i ].Category ].HasCommunityData;
}
m_currentCategories[ allItems[ i ].Category ].Contents.Add( allItems[ i ] );
}
}
}
var categoryEnumerator = m_currentCategories.GetEnumerator();
while( categoryEnumerator.MoveNext() )
{
categoryEnumerator.Current.Value.Contents.Sort( ( x, y ) => x.CompareTo( y, usingSearchFilter ) );
}
//sort current list respecting categories
m_currentItems.Clear();
foreach( var item in m_currentCategories )
{
for( int i = 0; i < item.Value.Contents.Count; i++ )
{
m_currentItems.Add( item.Value.Contents[ i ] );
}
}
}
string watching = string.Empty;
// unselect the main search field so it can focus list elements next

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/Palette/PaletteParent.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/Palette/PaletteParent.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/Palette/PalettePopUp.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/Palette/PalettePopUp.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/Palette/PaletteWindow.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/Palette/PaletteWindow.cs
uploadId: 782635

View File

@ -218,6 +218,7 @@ namespace AmplifyShaderEditor
DrawPort( WirePortDataType.FLOAT4 );
DrawPort( WirePortDataType.COLOR );
DrawPort( WirePortDataType.SAMPLER2D );
DrawPort( WirePortDataType.FLOAT2x2 );
DrawPort( WirePortDataType.FLOAT3x3 );
DrawPort( WirePortDataType.FLOAT4x4 );

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/PortLegendInfo.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/PortLegendInfo.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/SceneSaveCallback.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/SceneSaveCallback.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/ShaderEditorModeWindow.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/ShaderEditorModeWindow.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/ShaderLibrary.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/ShaderLibrary.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/Tools/ToolsMenuButton.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/Tools/ToolsMenuButton.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/Tools/ToolsMenuButtonParent.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/Tools/ToolsMenuButtonParent.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/Tools/ToolsMenuButtonSep.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/Tools/ToolsMenuButtonSep.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Menu/Tools/ToolsWindow.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Menu/Tools/ToolsWindow.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Native/FallbackColor.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Native/FallbackColor.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Native/FallbackFloat.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Native/FallbackFloat.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Native/FallbackInt.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Native/FallbackInt.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Native/FallbackMatrix4x4.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Native/FallbackMatrix4x4.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Native/FallbackString.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Native/FallbackString.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Native/FallbackTexture.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Native/FallbackTexture.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Native/FallbackVariable.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Native/FallbackVariable.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Native/FallbackVector2.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Native/FallbackVector2.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Native/FallbackVector3.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Native/FallbackVector3.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Native/FallbackVector4.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Native/FallbackVector4.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Native/IFallbackVars.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Native/IFallbackVars.cs
uploadId: 782635

View File

@ -26,7 +26,7 @@ namespace AmplifyShaderEditor
private const float MIN_SIZE_X = 100;
private const float MIN_SIZE_Y = 100;
private const float COMMENTARY_BOX_HEIGHT = 30;
private readonly Vector2 ResizeButtonPos = new Vector2( 1, 1 );
[SerializeField]
@ -232,7 +232,7 @@ namespace AmplifyShaderEditor
other.RemoveNode( node );
addToNode = true;
}
}
}
@ -250,7 +250,7 @@ namespace AmplifyShaderEditor
}
}
}
public override void DrawProperties()
{
base.DrawProperties();
@ -274,7 +274,7 @@ namespace AmplifyShaderEditor
EditorGUILayout.HelpBox( InfoText, MessageType.Info );
}
public override void OnNodeLayout( DrawInfo drawInfo )
public override void OnNodeLayout( DrawInfo drawInfo, NodeUpdateCache cache )
{
if ( m_nodesIds.Count > 0 )
{
@ -335,7 +335,7 @@ namespace AmplifyShaderEditor
m_resizeRightIconCoords.x = m_globalPosition.x + m_globalPosition.width - 1 - ( m_resizeIconTex.width + ResizeButtonPos.x ) * drawInfo.InvertedZoom;
m_resizeRightIconCoords.y = m_globalPosition.y + m_globalPosition.height - 2 - ( m_resizeIconTex.height + ResizeButtonPos.y ) * drawInfo.InvertedZoom;
m_resizeRightIconCoords.width = m_resizeIconTex.width * drawInfo.InvertedZoom;
m_resizeRightIconCoords.height = m_resizeIconTex.height * drawInfo.InvertedZoom;
m_resizeRightIconCoords.height = m_resizeIconTex.height * drawInfo.InvertedZoom;
}
public override void OnNodeRepaint( DrawInfo drawInfo )
@ -347,7 +347,7 @@ namespace AmplifyShaderEditor
// Background
GUI.color = Constants.NodeBodyColor * m_frameColor;
GUI.Label( m_globalPosition, string.Empty, UIUtils.GetCustomStyle( CustomStyle.CommentaryBackground ) );
// Header
GUI.color = m_headerColor * m_headerColorModifier * m_frameColor;
GUI.Label( m_headerPosition, string.Empty, UIUtils.GetCustomStyle( CustomStyle.NodeHeader ) );
@ -382,7 +382,7 @@ namespace AmplifyShaderEditor
GUI.Label( titleRect, m_titleText, UIUtils.GetCustomStyle( CustomStyle.CommentarySuperTitle ) );
}
}
public override void Draw( DrawInfo drawInfo )
{
base.Draw( drawInfo );

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/CommentaryNode.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/CommentaryNode.cs
uploadId: 782635

View File

@ -179,9 +179,9 @@ namespace AmplifyShaderEditor
m_requireMaterialUpdate = true;
}
public override void OnNodeLayout( DrawInfo drawInfo )
public override void OnNodeLayout( DrawInfo drawInfo, NodeUpdateCache cache )
{
base.OnNodeLayout( drawInfo );
base.OnNodeLayout( drawInfo, cache );
int maxWidth = 80;
@ -304,13 +304,14 @@ namespace AmplifyShaderEditor
if( m_outputPorts[ 0 ].IsLocalValue( dataCollector.PortCategory ) )
return GetOutputColorItem( 0, outputId, m_outputPorts[ 0 ].LocalValue(dataCollector.PortCategory) );
Color linear = m_defaultValue.linear;
string colorGamma = m_precisionString + "(" + m_defaultValue.r + "," + m_defaultValue.g + "," + m_defaultValue.b +
( m_useAlpha ? "," + m_defaultValue.a : string.Empty ) + ")";
string colorGamma = m_precisionString + "( " + m_defaultValue.r + ", " + m_defaultValue.g + ", " + m_defaultValue.b +
( m_useAlpha ? ", " + m_defaultValue.a : string.Empty ) + " )";
string colorLinear = m_precisionString + "(" + linear.r + "," + linear.g + "," + linear.b +
( m_useAlpha ? "," + m_defaultValue.a : string.Empty ) + ")";
string colorLinear = m_precisionString + "( " + linear.r + ", " + linear.g + ", " + linear.b +
( m_useAlpha ? ", " + m_defaultValue.a : string.Empty ) + " )";
string result = string.Format( AutoGammaToLinearConversion, colorGamma, colorLinear );
RegisterLocalVariable( 0, result, ref dataCollector, "color" + OutputId );
@ -337,7 +338,7 @@ namespace AmplifyShaderEditor
{
case 0:
{
result = m_precisionString + "(" + color.r + "," + color.g + "," + color.b + ( m_useAlpha ? "," + color.a : string.Empty ) + ")";
result = m_precisionString + "( " + color.r + ", " + color.g + ", " + color.b + ( m_useAlpha ? ", " + color.a : string.Empty ) + " )";
}
break;
@ -425,8 +426,8 @@ namespace AmplifyShaderEditor
string g = UIUtils.PropertyFloatToString( m_defaultValue.g );
string b = UIUtils.PropertyFloatToString( m_defaultValue.b );
string a = UIUtils.PropertyFloatToString( m_defaultValue.a );
return PropertyAttributes + m_propertyName + "(\"" + m_propertyInspectorName + "\", Color) = (" + r + "," + g + "," + b +
( m_useAlpha ? "," + a : string.Empty ) + ")";
return PropertyAttributes + PropertyAttributesSeparator + m_propertyName + "( \"" + m_propertyInspectorName +
"\", Color ) = ( " + r + ", " + g + ", " + b + ( m_useAlpha ? ", " + a : string.Empty ) + " )";
}
public override void UpdateMaterial( Material mat )

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ColorNode.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ColorNode.cs
uploadId: 782635

View File

@ -234,9 +234,9 @@ namespace AmplifyShaderEditor
m_autoRangeCheck = EditorGUILayoutToggle( AutoRangeCheckStr , m_autoRangeCheck );
}
public override void OnNodeLayout( DrawInfo drawInfo )
public override void OnNodeLayout( DrawInfo drawInfo, NodeUpdateCache cache )
{
base.OnNodeLayout( drawInfo );
base.OnNodeLayout( drawInfo, cache );
m_updated = false;
if( m_referenceType == TexReferenceType.Instance )
{
@ -478,6 +478,18 @@ namespace AmplifyShaderEditor
}
}
}
public override void ReconnectClipboardReferences( Clipboard clipboard )
{
// validate node first
int newId = clipboard.GeNewNodeId( m_referenceNodeId );
if ( ContainerGraph.GetNode( newId ) != null )
{
m_referenceNodeId = newId;
}
RefreshExternalReferences();
}
public int ArrayLengthX { get { return ( m_referenceNode != null ) ? m_referenceNode.ArrayLengthX : m_arrayLengthX; } }
public int ArrayLengthY { get { return ( m_referenceNode != null ) ? m_referenceNode.ArrayLengthY : m_arrayLengthY; } }

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GlobalArrayNode.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GlobalArrayNode.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GradientNode.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/GradientNode.cs
uploadId: 782635

View File

@ -118,9 +118,9 @@ namespace AmplifyShaderEditor
}
}
public override void OnNodeLayout( DrawInfo drawInfo )
public override void OnNodeLayout( DrawInfo drawInfo, NodeUpdateCache cache )
{
base.OnNodeLayout( drawInfo );
base.OnNodeLayout( drawInfo, cache );
m_propertyDrawPos = m_remainingBox;
m_propertyDrawPos.x = m_remainingBox.x - LabelWidth * drawInfo.InvertedZoom;
@ -228,7 +228,7 @@ namespace AmplifyShaderEditor
public override string GetPropertyValue()
{
return PropertyAttributes + m_propertyName + "(\"" + m_propertyInspectorName + "\", Int) = " + m_defaultValue;
return PropertyAttributes + PropertyAttributesSeparator + m_propertyName + "( \"" + m_propertyInspectorName + "\", Int ) = " + m_defaultValue;
}
public override void UpdateMaterial( Material mat )

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/IntNode.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/IntNode.cs
uploadId: 782635

View File

@ -0,0 +1,259 @@
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>
using UnityEngine;
using UnityEditor;
using System;
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes( "Matrix2X2", "Constants And Properties", "Matrix2X2 property" )]
public sealed class Matrix2X2Node : MatrixParentNode
{
private string[,] m_fieldText = new string[ 2, 2 ] { { "0", "0" }, { "0", "0" } };
public Matrix2X2Node() : base() { }
public Matrix2X2Node( int uniqueId, float x, float y, float width, float height ) : base( uniqueId, x, y, width, height ) { }
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
GlobalTypeWarningText = string.Format( GlobalTypeWarningText, "Matrix" );
AddOutputPort( WirePortDataType.FLOAT2x2, Constants.EmptyPortValue );
m_insideSize.Set( Constants.FLOAT_DRAW_WIDTH_FIELD_SIZE * 2 + Constants.FLOAT_WIDTH_SPACING * 2, Constants.FLOAT_DRAW_HEIGHT_FIELD_SIZE * 2 + Constants.FLOAT_WIDTH_SPACING * 2 + Constants.OUTSIDE_WIRE_MARGIN );
//m_defaultValue = new Matrix4x4();
//m_materialValue = new Matrix4x4();
m_drawPreview = false;
}
public override void CopyDefaultsToMaterial()
{
m_materialValue = m_defaultValue;
}
public override void DrawSubProperties()
{
EditorGUILayout.LabelField( Constants.DefaultValueLabel );
for( int row = 0; row < 2; row++ )
{
EditorGUILayout.BeginHorizontal();
for( int column = 0; column < 2; column++ )
{
m_defaultValue[ row, column ] = EditorGUILayoutFloatField( string.Empty, m_defaultValue[ row, column ], GUILayout.MaxWidth( 76 ) );
}
EditorGUILayout.EndHorizontal();
}
}
public override void DrawMaterialProperties()
{
if( m_materialMode )
EditorGUI.BeginChangeCheck();
EditorGUILayout.LabelField( Constants.MaterialValueLabel );
for( int row = 0; row < 2; row++ )
{
EditorGUILayout.BeginHorizontal();
for( int column = 0; column < 2; column++ )
{
m_materialValue[ row, column ] = EditorGUILayoutFloatField( string.Empty, m_materialValue[ row, column ], GUILayout.MaxWidth( 76 ) );
}
EditorGUILayout.EndHorizontal();
}
if( m_materialMode && EditorGUI.EndChangeCheck() )
m_requireMaterialUpdate = true;
}
public override void OnNodeLayout( DrawInfo drawInfo, NodeUpdateCache cache )
{
base.OnNodeLayout( drawInfo, cache );
m_propertyDrawPos.position = m_remainingBox.position;
m_propertyDrawPos.width = drawInfo.InvertedZoom * Constants.FLOAT_DRAW_WIDTH_FIELD_SIZE;
m_propertyDrawPos.height = drawInfo.InvertedZoom * Constants.FLOAT_DRAW_HEIGHT_FIELD_SIZE;
}
public override void DrawGUIControls( DrawInfo drawInfo )
{
base.DrawGUIControls( drawInfo );
if( drawInfo.CurrentEventType != EventType.MouseDown )
return;
Rect hitBox = m_remainingBox;
hitBox.height = m_insideSize.y * drawInfo.InvertedZoom;
bool insideBox = hitBox.Contains( drawInfo.MousePosition );
if( insideBox )
{
GUI.FocusControl( null );
m_isEditingFields = true;
}
else if( m_isEditingFields && !insideBox )
{
GUI.FocusControl( null );
m_isEditingFields = false;
}
}
public override void Draw( DrawInfo drawInfo )
{
base.Draw( drawInfo );
if( !m_isVisible )
return;
if( m_isEditingFields && m_currentParameterType != PropertyType.Global )
{
bool currMode = m_materialMode && m_currentParameterType != PropertyType.Constant;
Matrix4x4 value = currMode ? m_materialValue : m_defaultValue;
EditorGUI.BeginChangeCheck();
for( int row = 0; row < 2; row++ )
{
for( int column = 0; column < 2; column++ )
{
m_propertyDrawPos.position = m_remainingBox.position + Vector2.Scale( m_propertyDrawPos.size, new Vector2( column, row ) ) + new Vector2( Constants.FLOAT_WIDTH_SPACING * drawInfo.InvertedZoom * column, Constants.FLOAT_WIDTH_SPACING * drawInfo.InvertedZoom * row );
value[ row, column ] = EditorGUIFloatField( m_propertyDrawPos, string.Empty, value[ row, column ], UIUtils.MainSkin.textField );
}
}
if( currMode )
{
m_materialValue = value;
}
else
{
m_defaultValue = value;
}
if( EditorGUI.EndChangeCheck() )
{
m_requireMaterialUpdate = m_materialMode;
BeginDelayedDirtyProperty();
}
}
else if( drawInfo.CurrentEventType == EventType.Repaint )
{
bool guiEnabled = GUI.enabled;
//redundant ternary conditional but this makes easier to read that only when m_showCuffer is on that we need to take PropertyType.Property into account
GUI.enabled = ( m_showCBuffer )? m_currentParameterType != PropertyType.Global&& m_currentParameterType != PropertyType.Property : m_currentParameterType != PropertyType.Global;
bool currMode = m_materialMode && m_currentParameterType != PropertyType.Constant;
Matrix4x4 value = currMode ? m_materialValue : m_defaultValue;
for( int row = 0; row < 2; row++ )
{
for( int column = 0; column < 2; column++ )
{
Rect fakeField = m_propertyDrawPos;
fakeField.position = m_remainingBox.position + Vector2.Scale( m_propertyDrawPos.size, new Vector2( column, row ) ) + new Vector2( Constants.FLOAT_WIDTH_SPACING * drawInfo.InvertedZoom * column, Constants.FLOAT_WIDTH_SPACING * drawInfo.InvertedZoom * row );
if( GUI.enabled )
EditorGUIUtility.AddCursorRect( fakeField, MouseCursor.Text );
if( m_previousValue[ row, column ] != value[ row, column ] )
{
m_previousValue[ row, column ] = value[ row, column ];
m_fieldText[ row, column ] = value[ row, column ].ToString();
}
GUI.Label( fakeField, m_fieldText[ row, column ], UIUtils.MainSkin.textField );
}
}
GUI.enabled = guiEnabled;
}
}
public override string GenerateShaderForOutput( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar )
{
base.GenerateShaderForOutput( outputId, ref dataCollector, ignoreLocalvar );
m_precisionString = UIUtils.PrecisionWirePortToCgType( CurrentPrecisionType, m_outputPorts[ 0 ].DataType );
if( m_currentParameterType != PropertyType.Constant )
{
if( m_outputPorts[ 0 ].IsLocalValue( dataCollector.PortCategory ) )
return m_outputPorts[ 0 ].LocalValue( dataCollector.PortCategory );
string localVarName = PropertyData( dataCollector.PortCategory ) + "Local2x2";
string localVarValue = string.Format( "float2x2( {0}._m00, {0}._m01, {0}._m10, {0}._m11 )", PropertyData( dataCollector.PortCategory ) );
RegisterLocalVariable( 0, localVarValue, ref dataCollector, localVarName );
return localVarName;
}
Matrix4x4 value = m_defaultValue;
return m_precisionString + "( " + value[ 0, 0 ] + ", " + value[ 0, 1 ] + ", " + value[ 1, 0 ] + ", " + value[ 1, 1 ] + " )";
}
public override void UpdateMaterial( Material mat )
{
base.UpdateMaterial( mat );
if( UIUtils.IsProperty( m_currentParameterType ) && !InsideShaderFunction )
{
Shader.SetGlobalMatrix( m_propertyName, m_materialValue );
//mat.SetMatrix( m_propertyName, m_materialValue );
}
}
public override bool GetUniformData( out string dataType, out string dataName, ref bool fullValue )
{
dataType = UIUtils.PrecisionWirePortToCgType( CurrentPrecisionType, WirePortDataType.FLOAT4x4 );
dataName = m_propertyName;
return true;
}
public override void SetMaterialMode( Material mat, bool fetchMaterialValues )
{
base.SetMaterialMode( mat, fetchMaterialValues );
if( fetchMaterialValues && m_materialMode && UIUtils.IsProperty( m_currentParameterType ) && mat.HasProperty( m_propertyName ) )
{
m_materialValue = mat.GetMatrix( m_propertyName );
}
}
public override void ForceUpdateFromMaterial( Material material )
{
if( UIUtils.IsProperty( m_currentParameterType ) && material.HasProperty( m_propertyName ) )
{
m_materialValue = material.GetMatrix( m_propertyName );
PreviewIsDirty = true;
}
}
public override void ReadFromString( ref string[] nodeParams )
{
base.ReadFromString( ref nodeParams );
m_defaultValue = IOUtils.StringToMatrix2x2( GetCurrentParam( ref nodeParams ) );
}
public override void WriteToString( ref string nodeInfo, ref string connectionsInfo )
{
base.WriteToString( ref nodeInfo, ref connectionsInfo );
IOUtils.AddFieldValueToString( ref nodeInfo, IOUtils.Matrix2x2ToString( m_defaultValue ) );
}
public override void ReadAdditionalClipboardData( ref string[] nodeParams )
{
base.ReadAdditionalClipboardData( ref nodeParams );
m_materialValue = IOUtils.StringToMatrix2x2( GetCurrentParam( ref nodeParams ) );
}
public override void WriteAdditionalClipboardData( ref string nodeInfo )
{
base.WriteAdditionalClipboardData( ref nodeInfo );
IOUtils.AddFieldValueToString( ref nodeInfo, IOUtils.Matrix2x2ToString( m_materialValue ) );
}
public override string GetPropertyValStr()
{
return ( m_materialMode && m_currentParameterType != PropertyType.Constant ) ? m_materialValue[ 0, 0 ].ToString( Mathf.Abs( m_materialValue[ 0, 0 ] ) > 1000 ? Constants.PropertyBigMatrixFormatLabel : Constants.PropertyMatrixFormatLabel ) + IOUtils.VECTOR_SEPARATOR + m_materialValue[ 0, 1 ].ToString( Mathf.Abs( m_materialValue[ 0, 1 ] ) > 1000 ? Constants.PropertyBigMatrixFormatLabel : Constants.PropertyMatrixFormatLabel ) + IOUtils.VECTOR_SEPARATOR +
m_materialValue[ 1, 0 ].ToString( Mathf.Abs( m_materialValue[ 1, 0 ] ) > 1000 ? Constants.PropertyBigMatrixFormatLabel : Constants.PropertyMatrixFormatLabel ) + IOUtils.VECTOR_SEPARATOR + m_materialValue[ 1, 1 ].ToString( Mathf.Abs( m_materialValue[ 1, 1 ] ) > 1000 ? Constants.PropertyBigMatrixFormatLabel : Constants.PropertyMatrixFormatLabel ) :
m_defaultValue[ 0, 0 ].ToString( Mathf.Abs( m_defaultValue[ 0, 0 ] ) > 1000 ? Constants.PropertyBigMatrixFormatLabel : Constants.PropertyMatrixFormatLabel ) + IOUtils.VECTOR_SEPARATOR + m_defaultValue[ 0, 1 ].ToString( Mathf.Abs( m_defaultValue[ 0, 1 ] ) > 1000 ? Constants.PropertyBigMatrixFormatLabel : Constants.PropertyMatrixFormatLabel ) + IOUtils.MATRIX_DATA_SEPARATOR +
m_defaultValue[ 1, 0 ].ToString( Mathf.Abs( m_defaultValue[ 1, 0 ] ) > 1000 ? Constants.PropertyBigMatrixFormatLabel : Constants.PropertyMatrixFormatLabel ) + IOUtils.VECTOR_SEPARATOR + m_defaultValue[ 1, 1 ].ToString( Mathf.Abs( m_defaultValue[ 1, 1 ] ) > 1000 ? Constants.PropertyBigMatrixFormatLabel : Constants.PropertyMatrixFormatLabel );
}
}
}

View File

@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 37904b05b02418e4a8e2ca19a97f340e
timeCreated: 1481126953
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/Matrix2X2Node.cs
uploadId: 782635

View File

@ -64,9 +64,9 @@ namespace AmplifyShaderEditor
m_requireMaterialUpdate = true;
}
public override void OnNodeLayout( DrawInfo drawInfo )
public override void OnNodeLayout( DrawInfo drawInfo, NodeUpdateCache cache )
{
base.OnNodeLayout( drawInfo );
base.OnNodeLayout( drawInfo, cache );
m_propertyDrawPos.position = m_remainingBox.position;
m_propertyDrawPos.width = drawInfo.InvertedZoom * Constants.FLOAT_DRAW_WIDTH_FIELD_SIZE;
@ -173,16 +173,16 @@ namespace AmplifyShaderEditor
if( m_outputPorts[ 0 ].IsLocalValue( dataCollector.PortCategory ) )
return m_outputPorts[ 0 ].LocalValue( dataCollector.PortCategory );
string localVarName = PropertyData( dataCollector.PortCategory ) + "Local3x3";
string localVarValue = string.Format( "float3x3({0}._m00,{0}._m01,{0}._m02,{0}._m10,{0}._m11,{0}._m12,{0}._m20,{0}._m21,{0}._m22 )", PropertyData( dataCollector.PortCategory ) );
string localVarValue = string.Format( "float3x3( {0}._m00, {0}._m01, {0}._m02, {0}._m10, {0}._m11, {0}._m12, {0}._m20, {0}._m21, {0}._m22 )", PropertyData( dataCollector.PortCategory ) );
RegisterLocalVariable( 0, localVarValue, ref dataCollector, localVarName );
return localVarName;
}
Matrix4x4 value = m_defaultValue;
return m_precisionString + "(" + value[ 0, 0 ] + "," + value[ 0, 1 ] + "," + value[ 0, 2 ] + "," +
+value[ 1, 0 ] + "," + value[ 1, 1 ] + "," + value[ 1, 2 ] + "," +
+value[ 2, 0 ] + "," + value[ 2, 1 ] + "," + value[ 2, 2 ] + ")";
return m_precisionString + "( " + value[ 0, 0 ] + ", " + value[ 0, 1 ] + ", " + value[ 0, 2 ] + ", " +
+value[ 1, 0 ] + ", " + value[ 1, 1 ] + ", " + value[ 1, 2 ] + ", " +
+value[ 2, 0 ] + ", " + value[ 2, 1 ] + ", " + value[ 2, 2 ] + " )";
}

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/Matrix3X3Node.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/Matrix3X3Node.cs
uploadId: 782635

View File

@ -64,9 +64,9 @@ namespace AmplifyShaderEditor
m_requireMaterialUpdate = true;
}
public override void OnNodeLayout( DrawInfo drawInfo )
public override void OnNodeLayout( DrawInfo drawInfo, NodeUpdateCache cache )
{
base.OnNodeLayout( drawInfo );
base.OnNodeLayout( drawInfo, cache );
m_propertyDrawPos.position = m_remainingBox.position;
m_propertyDrawPos.width = drawInfo.InvertedZoom * Constants.FLOAT_DRAW_WIDTH_FIELD_SIZE;

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/Matrix4X4Node.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/Matrix4X4Node.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/MatrixParentNode.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/MatrixParentNode.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/PiNode.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/PiNode.cs
uploadId: 782635

View File

@ -195,7 +195,7 @@ namespace AmplifyShaderEditor
[SerializeField]
protected List<int> m_selectedAttribs = new List<int>();
//Title editing
//Title editing
protected bool m_isEditing;
protected bool m_stopEditing;
protected bool m_startEditing;
@ -385,7 +385,7 @@ namespace AmplifyShaderEditor
if( parameterType == PropertyType.InstancedProperty )
{
//if( m_containerGraph.IsSRP )
//{
//{
// UIUtils.ShowMessage( InstancedPropertyWarning,MessageSeverity.Warning );
//}
@ -621,7 +621,7 @@ namespace AmplifyShaderEditor
DrawCustomAttrAddRemoveButtons();
EditorGUILayout.EndHorizontal();
}
protected void DrawHeaderAttrAddRemoveButtons()
{
// Add new port
@ -669,7 +669,7 @@ namespace AmplifyShaderEditor
EditorGUILayout.EndHorizontal();
}
public virtual void DrawAttributes()
{
int attribCount = m_selectedAttribs.Count;
@ -880,7 +880,7 @@ namespace AmplifyShaderEditor
if( m_customAttrCount > 0 )
NodeUtils.DrawPropertyGroup( ref m_visibleCustomAttrFoldout, CustomAttrStr, DrawCustomAttributes, DrawCustomAttrAddRemoveButtons );
}
CheckPropertyFromInspector();
}
}
@ -1119,9 +1119,9 @@ namespace AmplifyShaderEditor
}
public override void OnNodeLayout( DrawInfo drawInfo )
public override void OnNodeLayout( DrawInfo drawInfo, NodeUpdateCache cache )
{
//base.OnNodeLayout( drawInfo );
//base.OnNodeLayout( drawInfo, cache );
if( m_reRegisterName )
{
m_reRegisterName = false;
@ -1166,7 +1166,7 @@ namespace AmplifyShaderEditor
CheckPropertyFromInspector();
CheckDuplicateProperty();
// RUN LAYOUT CHANGES AFTER TITLES CHANGE
base.OnNodeLayout( drawInfo );
base.OnNodeLayout( drawInfo, cache );
m_titleClickArea = m_titlePos;
m_titleClickArea.height = Constants.NODE_HEADER_HEIGHT;
@ -1295,7 +1295,7 @@ namespace AmplifyShaderEditor
public virtual void CheckIfAutoRegister( ref MasterNodeDataCollector dataCollector )
{
// Also testing inside shader function because node can be used indirectly over a custom expression and directly over a Function Output node
// Also testing inside shader function because node can be used indirectly over a custom expression and directly over a Function Output node
// That isn't being used externaly making it to not be registered ( since m_connStatus it set to Connected by being connected to an output node
if( CurrentParameterType != PropertyType.Constant && m_autoRegister && ( m_connStatus != NodeConnectionStatus.Connected || InsideShaderFunction ) )
{
@ -1478,6 +1478,14 @@ namespace AmplifyShaderEditor
return attribs;
}
}
public string PropertyAttributesSeparator
{
get
{
return string.IsNullOrEmpty( PropertyAttributes ) ? string.Empty : " ";
}
}
public virtual void OnDirtyProperty() { }
public virtual void OnPropertyNameChanged() { UIUtils.UpdatePropertyDataNode( UniqueId, PropertyInspectorName ); }
public virtual void DrawSubProperties() { }
@ -1605,7 +1613,7 @@ namespace AmplifyShaderEditor
int attribCount = m_availableAttribs.Count;
for( int i = 0; i < attribCount; i++ )
{
if( m_availableAttribs[ i ].Attribute.Equals( name ) ||
if( m_availableAttribs[ i ].Attribute.Equals( name ) ||
(m_availableAttribs[ i ].HasDeprecatedValue && m_availableAttribs[ i ].DeprecatedValue.Equals( name ) ) )
return i;
}
@ -1752,14 +1760,14 @@ namespace AmplifyShaderEditor
}
ReleaseRansomedProperty();
}
public virtual void ReleaseRansomedProperty()
{
if( m_variableMode == VariableMode.Fetch/* && m_autoGlobalName */)
{
//Fooling setter to have a different value
//Fooling setter to have a different value
m_variableMode = VariableMode.Create;
CurrentVariableMode = VariableMode.Fetch;
}
@ -1867,7 +1875,7 @@ namespace AmplifyShaderEditor
}
}
}
public string PropertyData( MasterNodePortCategory portCategory )
{
return ( m_currentParameterType == PropertyType.InstancedProperty ) ? m_outputPorts[ 0 ].LocalValue( portCategory ) : m_propertyName;

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/PropertyNode.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/PropertyNode.cs
uploadId: 782635

View File

@ -40,7 +40,7 @@ namespace AmplifyShaderEditor
private string[] m_fieldText = new string[] { "0", "0", "0" };
public RangedFloatNode() : base() { }
public RangedFloatNode( int uniqueId, float x, float y, float width, float height ) : base( uniqueId, x, y, width, height ) { }
public RangedFloatNode( int uniqueId, float x, float y, float width, float height ) : base( uniqueId, x, y, width, height ) {}
protected override void CommonInit( int uniqueId )
{
@ -172,9 +172,9 @@ namespace AmplifyShaderEditor
PreviewMaterial.SetFloat( m_cachedPropertyId, m_defaultValue );
}
public override void OnNodeLayout( DrawInfo drawInfo )
public override void OnNodeLayout( DrawInfo drawInfo, NodeUpdateCache cache )
{
base.OnNodeLayout( drawInfo );
base.OnNodeLayout( drawInfo, cache );
if ( m_floatMode )
{
@ -438,13 +438,14 @@ namespace AmplifyShaderEditor
string value = UIUtils.PropertyFloatToString( m_defaultValue );
if ( m_floatMode )
{
return PropertyAttributes + m_propertyName + "(\"" + m_propertyInspectorName + "\", Float) = " + value;
return PropertyAttributes + PropertyAttributesSeparator + m_propertyName + "( \"" + m_propertyInspectorName + "\", Float ) = " + value;
}
else
{
string min = UIUtils.PropertyFloatToString( m_min );
string max = UIUtils.PropertyFloatToString( m_max );
return PropertyAttributes + m_propertyName + "(\"" + m_propertyInspectorName + "\", Range( " + min + " , " + max + ")) = " + value;
return PropertyAttributes + PropertyAttributesSeparator + m_propertyName + "( \"" + m_propertyInspectorName +
"\", Range( " + min + ", " + max + " ) ) = " + value;
}
}

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/RangedFloatNode.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/RangedFloatNode.cs
uploadId: 782635

View File

@ -0,0 +1,19 @@
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>
using System;
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes( "Camera Direction", "Camera And Screen", "" )]
public sealed class CameraDirection : ConstantShaderVariable
{
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
ChangeOutputProperties( 0, "Out", WirePortDataType.FLOAT3 );
m_value = "-UNITY_MATRIX_V[ 2 ].xyz";
m_previewShaderGUID = "61e2b74575969cb4c8746f6e41267b12";
}
}
}

View File

@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 0ffc235ca0b513640bfc9e7a047be9dd
timeCreated: 1481126954
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen/CameraDirection.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen/CameraProjectionNode.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen/CameraProjectionNode.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen/CameraWorldClipPlanes.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen/CameraWorldClipPlanes.cs
uploadId: 782635

View File

@ -0,0 +1,19 @@
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>
using System;
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes( "Eye Index", "Camera And Screen", "Eye Index when stereo rendering is enabled, zero otherwise." )]
public sealed class EyeIndex : ConstantShaderVariable
{
protected override void CommonInit( int uniqueId )
{
base.CommonInit( uniqueId );
ChangeOutputProperties( 0, "Out", WirePortDataType.INT );
m_value = "unity_StereoEyeIndex";
m_previewShaderGUID = "4ddc7827e3370c54b920471c2f47cdc9";
}
}
}

View File

@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 126808ee6f1e62c479f192481f3bc15e
timeCreated: 1481126960
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen/EyeIndex.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen/OrthoParams.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen/OrthoParams.cs
uploadId: 782635

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen/ProjectionParams.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen/ProjectionParams.cs
uploadId: 782635

View File

@ -16,6 +16,8 @@ namespace AmplifyShaderEditor
ChangeOutputName( 3, "1+1/Width" );
ChangeOutputName( 4, "1+1/Height" );
m_value = "_ScreenParams";
m_valueHDRP = "_ScreenParams";
m_valueURP = "_ScaledScreenParams";
m_previewShaderGUID = "78173633b803de4419206191fed3d61e";
}

View File

@ -14,6 +14,6 @@ AssetOrigin:
serializedVersion: 1
productId: 68570
packageName: Amplify Shader Editor
packageVersion: 1.9.8.1
assetPath: Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen/ScreenParams.cs
uploadId: 723576
packageVersion: 1.9.9.4
assetPath: Assets/External/AmplifyShaderEditor/Plugins/Editor/Nodes/Constants/ShaderVariables/CameraAndScreen/ScreenParams.cs
uploadId: 782635

Some files were not shown because too many files have changed in this diff Show More