class_visualshadernodesmoothstep.rst 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeSmoothStep.xml.
  6. .. _class_VisualShaderNodeSmoothStep:
  7. VisualShaderNodeSmoothStep
  8. ==========================
  9. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Calculates a SmoothStep function within the visual shader graph.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Translates to ``smoothstep(edge0, edge1, x)`` in the shader language.
  15. Returns ``0.0`` if ``x`` is smaller than ``edge0`` and ``1.0`` if ``x`` is larger than ``edge1``. Otherwise, the return value is interpolated between ``0.0`` and ``1.0`` using Hermite polynomials.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +-------------------------------------------------------+-------------------------------------------------------------------+-------+
  22. | :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` | :ref:`op_type<class_VisualShaderNodeSmoothStep_property_op_type>` | ``0`` |
  23. +-------------------------------------------------------+-------------------------------------------------------------------+-------+
  24. .. rst-class:: classref-section-separator
  25. ----
  26. .. rst-class:: classref-descriptions-group
  27. Enumerations
  28. ------------
  29. .. _enum_VisualShaderNodeSmoothStep_OpType:
  30. .. rst-class:: classref-enumeration
  31. enum **OpType**:
  32. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_SCALAR:
  33. .. rst-class:: classref-enumeration-constant
  34. :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **OP_TYPE_SCALAR** = ``0``
  35. A floating-point scalar type.
  36. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_2D:
  37. .. rst-class:: classref-enumeration-constant
  38. :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **OP_TYPE_VECTOR_2D** = ``1``
  39. A 2D vector type.
  40. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_2D_SCALAR:
  41. .. rst-class:: classref-enumeration-constant
  42. :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **OP_TYPE_VECTOR_2D_SCALAR** = ``2``
  43. The ``x`` port uses a 2D vector type. The first two ports use a floating-point scalar type.
  44. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_3D:
  45. .. rst-class:: classref-enumeration-constant
  46. :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **OP_TYPE_VECTOR_3D** = ``3``
  47. A 3D vector type.
  48. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_3D_SCALAR:
  49. .. rst-class:: classref-enumeration-constant
  50. :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **OP_TYPE_VECTOR_3D_SCALAR** = ``4``
  51. The ``x`` port uses a 3D vector type. The first two ports use a floating-point scalar type.
  52. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_4D:
  53. .. rst-class:: classref-enumeration-constant
  54. :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **OP_TYPE_VECTOR_4D** = ``5``
  55. A 4D vector type.
  56. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_4D_SCALAR:
  57. .. rst-class:: classref-enumeration-constant
  58. :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **OP_TYPE_VECTOR_4D_SCALAR** = ``6``
  59. The ``a`` and ``b`` ports use a 4D vector type. The ``weight`` port uses a scalar type.
  60. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_MAX:
  61. .. rst-class:: classref-enumeration-constant
  62. :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **OP_TYPE_MAX** = ``7``
  63. Represents the size of the :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` enum.
  64. .. rst-class:: classref-section-separator
  65. ----
  66. .. rst-class:: classref-descriptions-group
  67. Property Descriptions
  68. ---------------------
  69. .. _class_VisualShaderNodeSmoothStep_property_op_type:
  70. .. rst-class:: classref-property
  71. :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **op_type** = ``0``
  72. .. rst-class:: classref-property-setget
  73. - void **set_op_type** **(** :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` value **)**
  74. - :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **get_op_type** **(** **)**
  75. A type of operands and returned value.
  76. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  77. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  78. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  79. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  80. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  81. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  82. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`