2
0

VisualShaderNodeIntFunc.xml 1.3 KB

123456789101112131415161718192021222324252627282930
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="VisualShaderNodeIntFunc" inherits="VisualShaderNode" version="4.0">
  3. <brief_description>
  4. A scalar integer function to be used within the visual shader graph.
  5. </brief_description>
  6. <description>
  7. Accept an integer scalar ([code]x[/code]) to the input port and transform it according to [member function].
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <members>
  12. <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="2">
  13. A function to be applied to the scalar. See [enum Function] for options.
  14. </member>
  15. </members>
  16. <constants>
  17. <constant name="FUNC_ABS" value="0" enum="Function">
  18. Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
  19. </constant>
  20. <constant name="FUNC_NEGATE" value="1" enum="Function">
  21. Negates the [code]x[/code] using [code]-(x)[/code].
  22. </constant>
  23. <constant name="FUNC_SIGN" value="2" enum="Function">
  24. Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
  25. </constant>
  26. <constant name="FUNC_MAX" value="3" enum="Function">
  27. Represents the size of the [enum Function] enum.
  28. </constant>
  29. </constants>
  30. </class>