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.

25 lines
770 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( "Determinant", "Matrix Operators", "Scalar determinant of a square matrix" )]
  8. public sealed class DeterminantOpNode : SingleInputOp
  9. {
  10. protected override void CommonInit( int uniqueId )
  11. {
  12. base.CommonInit( uniqueId );
  13. m_opName = "determinant";
  14. m_drawPreview = false;
  15. m_inputPorts[ 0 ].CreatePortRestrictions( WirePortDataType.FLOAT3x3,
  16. WirePortDataType.FLOAT4x4 );
  17. m_autoUpdateOutputPort = false;
  18. m_inputPorts[ 0 ].ChangeType( WirePortDataType.FLOAT4x4, false );
  19. m_outputPorts[ 0 ].ChangeType( WirePortDataType.FLOAT, false );
  20. }
  21. }
  22. }