class_visualshadernodecubemap.rst 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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 VisualShaderNodeCubemap.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeCubemap:
  6. VisualShaderNodeCubemap
  7. =======================
  8. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. A :ref:`Cubemap<class_Cubemap>` sampling node to be used within the visual shader graph.
  10. Description
  11. -----------
  12. Translated to ``texture(cubemap, vec3)`` in the shader language. Returns a color vector and alpha channel as scalar.
  13. Properties
  14. ----------
  15. +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
  16. | :ref:`Cubemap<class_Cubemap>` | :ref:`cube_map<class_VisualShaderNodeCubemap_property_cube_map>` | |
  17. +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
  18. | :ref:`Source<enum_VisualShaderNodeCubemap_Source>` | :ref:`source<class_VisualShaderNodeCubemap_property_source>` | ``0`` |
  19. +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
  20. | :ref:`TextureType<enum_VisualShaderNodeCubemap_TextureType>` | :ref:`texture_type<class_VisualShaderNodeCubemap_property_texture_type>` | ``0`` |
  21. +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+
  22. Enumerations
  23. ------------
  24. .. _enum_VisualShaderNodeCubemap_Source:
  25. .. _class_VisualShaderNodeCubemap_constant_SOURCE_TEXTURE:
  26. .. _class_VisualShaderNodeCubemap_constant_SOURCE_PORT:
  27. .. _class_VisualShaderNodeCubemap_constant_SOURCE_MAX:
  28. enum **Source**:
  29. - **SOURCE_TEXTURE** = **0** --- Use the :ref:`Cubemap<class_Cubemap>` set via :ref:`cube_map<class_VisualShaderNodeCubemap_property_cube_map>`. If this is set to :ref:`source<class_VisualShaderNodeCubemap_property_source>`, the ``samplerCube`` port is ignored.
  30. - **SOURCE_PORT** = **1** --- Use the :ref:`Cubemap<class_Cubemap>` sampler reference passed via the ``samplerCube`` port. If this is set to :ref:`source<class_VisualShaderNodeCubemap_property_source>`, the :ref:`cube_map<class_VisualShaderNodeCubemap_property_cube_map>` texture is ignored.
  31. - **SOURCE_MAX** = **2** --- Represents the size of the :ref:`Source<enum_VisualShaderNodeCubemap_Source>` enum.
  32. ----
  33. .. _enum_VisualShaderNodeCubemap_TextureType:
  34. .. _class_VisualShaderNodeCubemap_constant_TYPE_DATA:
  35. .. _class_VisualShaderNodeCubemap_constant_TYPE_COLOR:
  36. .. _class_VisualShaderNodeCubemap_constant_TYPE_NORMAL_MAP:
  37. .. _class_VisualShaderNodeCubemap_constant_TYPE_MAX:
  38. enum **TextureType**:
  39. - **TYPE_DATA** = **0** --- No hints are added to the uniform declaration.
  40. - **TYPE_COLOR** = **1** --- Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion.
  41. - **TYPE_NORMAL_MAP** = **2** --- Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
  42. - **TYPE_MAX** = **3** --- Represents the size of the :ref:`TextureType<enum_VisualShaderNodeCubemap_TextureType>` enum.
  43. Property Descriptions
  44. ---------------------
  45. .. _class_VisualShaderNodeCubemap_property_cube_map:
  46. - :ref:`Cubemap<class_Cubemap>` **cube_map**
  47. +----------+---------------------+
  48. | *Setter* | set_cube_map(value) |
  49. +----------+---------------------+
  50. | *Getter* | get_cube_map() |
  51. +----------+---------------------+
  52. The :ref:`Cubemap<class_Cubemap>` texture to sample when using :ref:`SOURCE_TEXTURE<class_VisualShaderNodeCubemap_constant_SOURCE_TEXTURE>` as :ref:`source<class_VisualShaderNodeCubemap_property_source>`.
  53. ----
  54. .. _class_VisualShaderNodeCubemap_property_source:
  55. - :ref:`Source<enum_VisualShaderNodeCubemap_Source>` **source**
  56. +-----------+-------------------+
  57. | *Default* | ``0`` |
  58. +-----------+-------------------+
  59. | *Setter* | set_source(value) |
  60. +-----------+-------------------+
  61. | *Getter* | get_source() |
  62. +-----------+-------------------+
  63. Defines which source should be used for the sampling. See :ref:`Source<enum_VisualShaderNodeCubemap_Source>` for options.
  64. ----
  65. .. _class_VisualShaderNodeCubemap_property_texture_type:
  66. - :ref:`TextureType<enum_VisualShaderNodeCubemap_TextureType>` **texture_type**
  67. +-----------+-------------------------+
  68. | *Default* | ``0`` |
  69. +-----------+-------------------------+
  70. | *Setter* | set_texture_type(value) |
  71. +-----------+-------------------------+
  72. | *Getter* | get_texture_type() |
  73. +-----------+-------------------------+
  74. Defines the type of data provided by the source texture. See :ref:`TextureType<enum_VisualShaderNodeCubemap_TextureType>` for options.
  75. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  76. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  77. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  78. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  79. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  80. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`