class_rdshaderfile.rst 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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/RDShaderFile.xml.
  6. .. _class_RDShaderFile:
  7. RDShaderFile
  8. ============
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Compiled shader file in SPIR-V form (used by :ref:`RenderingDevice<class_RenderingDevice>`). Not to be confused with Godot's own :ref:`Shader<class_Shader>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Compiled shader file in SPIR-V form.
  15. See also :ref:`RDShaderSource<class_RDShaderSource>`. **RDShaderFile** is only meant to be used with the :ref:`RenderingDevice<class_RenderingDevice>` API. It should not be confused with Godot's own :ref:`Shader<class_Shader>` resource, which is what Godot's various nodes use for high-level shader programming.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +-----------------------------+-----------------------------------------------------------+--------+
  22. | :ref:`String<class_String>` | :ref:`base_error<class_RDShaderFile_property_base_error>` | ``""`` |
  23. +-----------------------------+-----------------------------------------------------------+--------+
  24. .. rst-class:: classref-reftable-group
  25. Methods
  26. -------
  27. .. table::
  28. :widths: auto
  29. +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` | :ref:`get_spirv<class_RDShaderFile_method_get_spirv>` **(** :ref:`StringName<class_StringName>` version=&"" **)** |const| |
  31. +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`StringName[]<class_StringName>` | :ref:`get_version_list<class_RDShaderFile_method_get_version_list>` **(** **)** |const| |
  33. +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`set_bytecode<class_RDShaderFile_method_set_bytecode>` **(** :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` bytecode, :ref:`StringName<class_StringName>` version=&"" **)** |
  35. +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. .. rst-class:: classref-section-separator
  37. ----
  38. .. rst-class:: classref-descriptions-group
  39. Property Descriptions
  40. ---------------------
  41. .. _class_RDShaderFile_property_base_error:
  42. .. rst-class:: classref-property
  43. :ref:`String<class_String>` **base_error** = ``""``
  44. .. rst-class:: classref-property-setget
  45. - void **set_base_error** **(** :ref:`String<class_String>` value **)**
  46. - :ref:`String<class_String>` **get_base_error** **(** **)**
  47. The base compilation error message, which indicates errors not related to a specific shader stage if non-empty. If empty, shader compilation is not necessarily successful (check :ref:`RDShaderSPIRV<class_RDShaderSPIRV>`'s error message members).
  48. .. rst-class:: classref-section-separator
  49. ----
  50. .. rst-class:: classref-descriptions-group
  51. Method Descriptions
  52. -------------------
  53. .. _class_RDShaderFile_method_get_spirv:
  54. .. rst-class:: classref-method
  55. :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` **get_spirv** **(** :ref:`StringName<class_StringName>` version=&"" **)** |const|
  56. Returns the SPIR-V intermediate representation for the specified shader ``version``.
  57. .. rst-class:: classref-item-separator
  58. ----
  59. .. _class_RDShaderFile_method_get_version_list:
  60. .. rst-class:: classref-method
  61. :ref:`StringName[]<class_StringName>` **get_version_list** **(** **)** |const|
  62. Returns the list of compiled versions for this shader.
  63. .. rst-class:: classref-item-separator
  64. ----
  65. .. _class_RDShaderFile_method_set_bytecode:
  66. .. rst-class:: classref-method
  67. void **set_bytecode** **(** :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` bytecode, :ref:`StringName<class_StringName>` version=&"" **)**
  68. Sets the SPIR-V ``bytecode`` that will be compiled for the specified ``version``.
  69. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  70. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  71. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  72. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  73. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  74. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  75. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`