You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
722 B

  1. // Amplify Shader Editor - Visual Shader Editing Tool
  2. // Copyright (c) Amplify Creations, Lda <info@amplify.pt>
  3. using System;
  4. namespace AmplifyShaderEditor
  5. {
  6. [Serializable]
  7. [NodeAttributes( "Transpose", "Matrix Operators", "Transpose matrix of a matrix" )]
  8. public sealed class TransposeOpNode : SingleInputOp
  9. {
  10. protected override void CommonInit( int uniqueId )
  11. {
  12. base.CommonInit( uniqueId );
  13. m_opName = "transpose";
  14. m_drawPreview = false;
  15. m_inputPorts[ 0 ].CreatePortRestrictions( WirePortDataType.FLOAT3x3,
  16. WirePortDataType.FLOAT4x4 );
  17. m_inputPorts[ 0 ].ChangeType( WirePortDataType.FLOAT4x4, false );
  18. m_outputPorts[ 0 ].ChangeType( WirePortDataType.FLOAT4x4, false );
  19. }
  20. }
  21. }