class_visualshadernodeexpression.rst 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 VisualShaderNodeExpression.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeExpression:
  6. VisualShaderNodeExpression
  7. ==========================
  8. **Inherits:** :ref:`VisualShaderNodeGroupBase<class_VisualShaderNodeGroupBase>` **<** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`VisualShaderNodeGlobalExpression<class_VisualShaderNodeGlobalExpression>`
  10. A custom visual shader graph expression written in Godot Shading Language.
  11. Description
  12. -----------
  13. Custom Godot Shading Language expression, with a custom amount of input and output ports.
  14. The provided code is directly injected into the graph's matching shader function (``vertex``, ``fragment``, or ``light``), so it cannot be used to declare functions, varyings, uniforms, or global constants. See :ref:`VisualShaderNodeGlobalExpression<class_VisualShaderNodeGlobalExpression>` for such global definitions.
  15. Properties
  16. ----------
  17. +-----------------------------+-------------------------------------------------------------------------+--------+
  18. | :ref:`String<class_String>` | :ref:`expression<class_VisualShaderNodeExpression_property_expression>` | ``""`` |
  19. +-----------------------------+-------------------------------------------------------------------------+--------+
  20. Property Descriptions
  21. ---------------------
  22. .. _class_VisualShaderNodeExpression_property_expression:
  23. - :ref:`String<class_String>` **expression**
  24. +-----------+-----------------------+
  25. | *Default* | ``""`` |
  26. +-----------+-----------------------+
  27. | *Setter* | set_expression(value) |
  28. +-----------+-----------------------+
  29. | *Getter* | get_expression() |
  30. +-----------+-----------------------+
  31. An expression in Godot Shading Language, which will be injected at the start of the graph's matching shader function (``vertex``, ``fragment``, or ``light``), and thus cannot be used to declare functions, varyings, uniforms, or global constants.
  32. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  33. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  34. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`