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.

24 lines
762 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( "Max", "Math Operators", "Maximum of two scalars or each respective component of two vectors" )]
  8. public sealed class SimpleMaxOpNode : DynamicTypeNode
  9. {
  10. protected override void CommonInit( int uniqueId )
  11. {
  12. base.CommonInit( uniqueId );
  13. m_previewShaderGUID = "79d7f2a11092ac84a95ef6823b34adf2";
  14. }
  15. public override string BuildResults( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar )
  16. {
  17. base.BuildResults( outputId, ref dataCollector, ignoreLocalvar );
  18. return "max( " + m_inputA + " , " + m_inputB + " )";
  19. }
  20. }
  21. }