2
0

VisualShaderNodeIntFunc.xml 1.4 KB

1234567891011121314151617181920212223242526272829303132
  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. <methods>
  12. </methods>
  13. <members>
  14. <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="0">
  15. A function to be applied to the scalar. See [enum Function] for options.
  16. </member>
  17. </members>
  18. <constants>
  19. <constant name="FUNC_ABS" value="0" enum="Function">
  20. Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
  21. </constant>
  22. <constant name="FUNC_CLAMP" value="1" enum="Function">
  23. Constrains a parameter between [code]min[/code] and [code]max[/code]. Translates to [code]clamp(x, min, max)[/code] in the Godot Shader Language.
  24. </constant>
  25. <constant name="FUNC_NEGATE" value="2" enum="Function">
  26. Negates the [code]x[/code] using [code]-(x)[/code].
  27. </constant>
  28. <constant name="FUNC_SIGN" value="3" enum="Function">
  29. Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
  30. </constant>
  31. </constants>
  32. </class>