class_visualshadernodecubemap.rst 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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:`Reference<class_Reference>` **<** :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. enum **Source**:
  28. - **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.
  29. - **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.
  30. ----
  31. .. _enum_VisualShaderNodeCubeMap_TextureType:
  32. .. _class_VisualShaderNodeCubeMap_constant_TYPE_DATA:
  33. .. _class_VisualShaderNodeCubeMap_constant_TYPE_COLOR:
  34. .. _class_VisualShaderNodeCubeMap_constant_TYPE_NORMALMAP:
  35. enum **TextureType**:
  36. - **TYPE_DATA** = **0** --- No hints are added to the uniform declaration.
  37. - **TYPE_COLOR** = **1** --- Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion.
  38. - **TYPE_NORMALMAP** = **2** --- Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
  39. Property Descriptions
  40. ---------------------
  41. .. _class_VisualShaderNodeCubeMap_property_cube_map:
  42. - :ref:`CubeMap<class_CubeMap>` **cube_map**
  43. +----------+---------------------+
  44. | *Setter* | set_cube_map(value) |
  45. +----------+---------------------+
  46. | *Getter* | get_cube_map() |
  47. +----------+---------------------+
  48. 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>`.
  49. ----
  50. .. _class_VisualShaderNodeCubeMap_property_source:
  51. - :ref:`Source<enum_VisualShaderNodeCubeMap_Source>` **source**
  52. +-----------+-------------------+
  53. | *Default* | ``0`` |
  54. +-----------+-------------------+
  55. | *Setter* | set_source(value) |
  56. +-----------+-------------------+
  57. | *Getter* | get_source() |
  58. +-----------+-------------------+
  59. Defines which source should be used for the sampling. See :ref:`Source<enum_VisualShaderNodeCubeMap_Source>` for options.
  60. ----
  61. .. _class_VisualShaderNodeCubeMap_property_texture_type:
  62. - :ref:`TextureType<enum_VisualShaderNodeCubeMap_TextureType>` **texture_type**
  63. +-----------+-------------------------+
  64. | *Default* | ``0`` |
  65. +-----------+-------------------------+
  66. | *Setter* | set_texture_type(value) |
  67. +-----------+-------------------------+
  68. | *Getter* | get_texture_type() |
  69. +-----------+-------------------------+
  70. Defines the type of data provided by the source texture. See :ref:`TextureType<enum_VisualShaderNodeCubeMap_TextureType>` for options.
  71. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  72. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  73. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`