StepOpNode.cs 733 B

123456789101112131415161718192021222324
  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( "Step", "Math Operators", "Step function returning either zero or one" )]
  8. public sealed class StepOpNode : DynamicTypeNode
  9. {
  10. protected override void CommonInit( int uniqueId )
  11. {
  12. base.CommonInit( uniqueId );
  13. m_previewShaderGUID = "2c757add7f97ecd4abd9ce6ec4659697";
  14. }
  15. public override string BuildResults( int outputId, ref MasterNodeDataCollector dataCollector, bool ignoreLocalvar )
  16. {
  17. base.BuildResults( outputId, ref dataCollector, ignoreLocalvar );
  18. return "step( " + m_inputA + " , " + m_inputB + " )";
  19. }
  20. }
  21. }