VisualShaderNodeFloatOp.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="VisualShaderNodeFloatOp" inherits="VisualShaderNode" version="4.0">
  3. <brief_description>
  4. A floating-point scalar operator to be used within the visual shader graph.
  5. </brief_description>
  6. <description>
  7. Applies [member operator] to two floating-point inputs: [code]a[/code] and [code]b[/code].
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. </methods>
  13. <members>
  14. <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeFloatOp.Operator" default="0">
  15. An operator to be applied to the inputs. See [enum Operator] for options.
  16. </member>
  17. </members>
  18. <constants>
  19. <constant name="OP_ADD" value="0" enum="Operator">
  20. Sums two numbers using [code]a + b[/code].
  21. </constant>
  22. <constant name="OP_SUB" value="1" enum="Operator">
  23. Subtracts two numbers using [code]a - b[/code].
  24. </constant>
  25. <constant name="OP_MUL" value="2" enum="Operator">
  26. Multiplies two numbers using [code]a * b[/code].
  27. </constant>
  28. <constant name="OP_DIV" value="3" enum="Operator">
  29. Divides two numbers using [code]a / b[/code].
  30. </constant>
  31. <constant name="OP_MOD" value="4" enum="Operator">
  32. Calculates the remainder of two numbers. Translates to [code]mod(a, b)[/code] in the Godot Shader Language.
  33. </constant>
  34. <constant name="OP_POW" value="5" enum="Operator">
  35. Raises the [code]a[/code] to the power of [code]b[/code]. Translates to [code]pow(a, b)[/code] in the Godot Shader Language.
  36. </constant>
  37. <constant name="OP_MAX" value="6" enum="Operator">
  38. Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language.
  39. </constant>
  40. <constant name="OP_MIN" value="7" enum="Operator">
  41. Returns the lesser of two numbers. Translates to [code]min(a, b)[/code] in the Godot Shader Language.
  42. </constant>
  43. <constant name="OP_ATAN2" value="8" enum="Operator">
  44. Returns the arc-tangent of the parameters. Translates to [code]atan(a, b)[/code] in the Godot Shader Language.
  45. </constant>
  46. <constant name="OP_STEP" value="9" enum="Operator">
  47. Generates a step function by comparing [code]b[/code](x) to [code]a[/code](edge). Returns 0.0 if [code]x[/code] is smaller than [code]edge[/code] and otherwise 1.0. Translates to [code]step(a, b)[/code] in the Godot Shader Language.
  48. </constant>
  49. </constants>
  50. </class>