class_visualshadernodecubemap.rst 5.7 KB

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