diff options
Diffstat (limited to 'Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/TransposeOpNode.cs')
-rw-r--r-- | Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/TransposeOpNode.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/TransposeOpNode.cs b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/TransposeOpNode.cs new file mode 100644 index 00000000..6e83e512 --- /dev/null +++ b/Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/Operators/TransposeOpNode.cs @@ -0,0 +1,23 @@ +// Amplify Shader Editor - Visual Shader Editing Tool +// Copyright (c) Amplify Creations, Lda <info@amplify.pt> + +using System; + +namespace AmplifyShaderEditor +{ + [Serializable] + [NodeAttributes( "Transpose", "Matrix Operators", "Transpose matrix of a matrix" )] + public sealed class TransposeOpNode : SingleInputOp + { + protected override void CommonInit( int uniqueId ) + { + base.CommonInit( uniqueId ); + m_opName = "transpose"; + m_drawPreview = false; + m_inputPorts[ 0 ].CreatePortRestrictions( WirePortDataType.FLOAT3x3, + WirePortDataType.FLOAT4x4 ); + m_inputPorts[ 0 ].ChangeType( WirePortDataType.FLOAT4x4, false ); + m_outputPorts[ 0 ].ChangeType( WirePortDataType.FLOAT4x4, false ); + } + } +} |