class_visualshadernodemix.rst 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the VisualShaderNodeMix.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeMix:
  6. VisualShaderNodeMix
  7. ===================
  8. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. Linearly interpolates between two values within the visual shader graph.
  10. Description
  11. -----------
  12. Translates to ``mix(a, b, weight)`` in the shader language.
  13. Properties
  14. ----------
  15. +------------------------------------------------+------------------------------------------------------------+-------+
  16. | :ref:`OpType<enum_VisualShaderNodeMix_OpType>` | :ref:`op_type<class_VisualShaderNodeMix_property_op_type>` | ``0`` |
  17. +------------------------------------------------+------------------------------------------------------------+-------+
  18. Enumerations
  19. ------------
  20. .. _enum_VisualShaderNodeMix_OpType:
  21. .. _class_VisualShaderNodeMix_constant_OP_TYPE_SCALAR:
  22. .. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_2D:
  23. .. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_2D_SCALAR:
  24. .. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_3D:
  25. .. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_3D_SCALAR:
  26. .. _class_VisualShaderNodeMix_constant_OP_TYPE_MAX:
  27. enum **OpType**:
  28. - **OP_TYPE_SCALAR** = **0** --- A floating-point scalar.
  29. - **OP_TYPE_VECTOR_2D** = **1** --- A 2D vector type.
  30. - **OP_TYPE_VECTOR_2D_SCALAR** = **2** --- The ``a`` and ``b`` ports use a 2D vector type. The ``weight`` port uses a scalar type.
  31. - **OP_TYPE_VECTOR_3D** = **3** --- A 3D vector type.
  32. - **OP_TYPE_VECTOR_3D_SCALAR** = **4** --- The ``a`` and ``b`` ports use a 3D vector type. The ``weight`` port uses a scalar type.
  33. - **OP_TYPE_MAX** = **5** --- Represents the size of the :ref:`OpType<enum_VisualShaderNodeMix_OpType>` enum.
  34. Property Descriptions
  35. ---------------------
  36. .. _class_VisualShaderNodeMix_property_op_type:
  37. - :ref:`OpType<enum_VisualShaderNodeMix_OpType>` **op_type**
  38. +-----------+--------------------+
  39. | *Default* | ``0`` |
  40. +-----------+--------------------+
  41. | *Setter* | set_op_type(value) |
  42. +-----------+--------------------+
  43. | *Getter* | get_op_type() |
  44. +-----------+--------------------+
  45. A type of operands and returned value.
  46. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  47. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  48. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  49. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  50. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  51. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`