class_visualshadernodesmoothstep.rst 3.4 KB

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