Add.hx 341 B

12345678910111213141516171819
  1. package hrt.shgraph.nodes;
  2. using hxsl.Ast;
  3. @name("Add")
  4. @description("The output is the result of A + B")
  5. @width(80)
  6. @group("Operation")
  7. class Add extends Operation {
  8. static var SRC = {
  9. @sginput(0.0) var a : Dynamic;
  10. @sginput(0.0) var b : Dynamic;
  11. @sgoutput var output : Dynamic;
  12. function fragment() {
  13. output = a + b;
  14. }
  15. }
  16. }