class_visualshadernodesmoothstep.rst 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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:
  24. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_SCALAR:
  25. .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_MAX:
  26. enum **OpType**:
  27. - **OP_TYPE_SCALAR** = **0** --- A scalar type.
  28. - **OP_TYPE_VECTOR** = **1** --- A vector type.
  29. - **OP_TYPE_VECTOR_SCALAR** = **2** --- A vector type. ``edge0`` and ``edge1`` are using a scalar type.
  30. - **OP_TYPE_MAX** = **3** --- Represents the size of the :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` enum.
  31. Property Descriptions
  32. ---------------------
  33. .. _class_VisualShaderNodeSmoothStep_property_op_type:
  34. - :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **op_type**
  35. +-----------+--------------------+
  36. | *Default* | ``0`` |
  37. +-----------+--------------------+
  38. | *Setter* | set_op_type(value) |
  39. +-----------+--------------------+
  40. | *Getter* | get_op_type() |
  41. +-----------+--------------------+
  42. A type of operands and returned value.
  43. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  44. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  45. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  46. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  47. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  48. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`