class_visualshadernodesmoothstep.rst 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. Description
  12. -----------
  13. Translates to ``smoothstep(edge0, edge1, x)`` in the shader language.
  14. 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.
  15. Properties
  16. ----------
  17. +-------------------------------------------------------+-------------------------------------------------------------------+-------+
  18. | :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` | :ref:`op_type<class_VisualShaderNodeSmoothStep_property_op_type>` | ``0`` |
  19. +-------------------------------------------------------+-------------------------------------------------------------------+-------+
  20. Enumerations
  21. ------------
  22. .. _enum_VisualShaderNodeSmoothStep_OpType:
  23. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_SCALAR:
  24. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_2D:
  25. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_2D_SCALAR:
  26. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_3D:
  27. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_3D_SCALAR:
  28. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_4D:
  29. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_4D_SCALAR:
  30. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_MAX:
  31. enum **OpType**:
  32. - **OP_TYPE_SCALAR** = **0** --- A floating-point scalar type.
  33. - **OP_TYPE_VECTOR_2D** = **1** --- A 2D vector type.
  34. - **OP_TYPE_VECTOR_2D_SCALAR** = **2** --- The ``x`` port uses a 2D vector type. The first two ports use a floating-point scalar type.
  35. - **OP_TYPE_VECTOR_3D** = **3** --- A 3D vector type.
  36. - **OP_TYPE_VECTOR_3D_SCALAR** = **4** --- The ``x`` port uses a 3D vector type. The first two ports use a floating-point scalar type.
  37. - **OP_TYPE_VECTOR_4D** = **5** --- A 4D vector type.
  38. - **OP_TYPE_VECTOR_4D_SCALAR** = **6** --- The ``a`` and ``b`` ports use a 4D vector type. The ``weight`` port uses a scalar type.
  39. - **OP_TYPE_MAX** = **7** --- Represents the size of the :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` enum.
  40. Property Descriptions
  41. ---------------------
  42. .. _class_VisualShaderNodeSmoothStep_property_op_type:
  43. - :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **op_type**
  44. +-----------+--------------------+
  45. | *Default* | ``0`` |
  46. +-----------+--------------------+
  47. | *Setter* | set_op_type(value) |
  48. +-----------+--------------------+
  49. | *Getter* | get_op_type() |
  50. +-----------+--------------------+
  51. A type of operands and returned value.
  52. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  53. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  54. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  55. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  56. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  57. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`