123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RenderSceneBuffersRD.xml.
- .. _class_RenderSceneBuffersRD:
- RenderSceneBuffersRD
- ====================
- **Inherits:** :ref:`RenderSceneBuffers<class_RenderSceneBuffers>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- Abstract render scene buffer implementation for the RenderingDevice based renderers.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- This object manages all 3D rendering buffers for the rendering device based renderers. An instance of this object is created for every viewport that has 3D rendering enabled.
- All buffers are organized in **contexts**. The default context is called **render_buffers** and can contain amongst others the color buffer, depth buffer, velocity buffers, VRS density map and MSAA variants of these buffers.
- Buffers are only guaranteed to exist during rendering of the viewport.
- \ **Note:** this is an internal rendering server object only exposed for GDExtension plugins.
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`clear_context<class_RenderSceneBuffersRD_method_clear_context>` **(** :ref:`StringName<class_StringName>` context **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`create_texture<class_RenderSceneBuffersRD_method_create_texture>` **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name, :ref:`DataFormat<enum_RenderingDevice_DataFormat>` data_format, :ref:`int<class_int>` usage_bits, :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` texture_samples, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` layers, :ref:`int<class_int>` mipmaps, :ref:`bool<class_bool>` unique **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`create_texture_from_format<class_RenderSceneBuffersRD_method_create_texture_from_format>` **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name, :ref:`RDTextureFormat<class_RDTextureFormat>` format, :ref:`RDTextureView<class_RDTextureView>` view, :ref:`bool<class_bool>` unique **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`create_texture_view<class_RenderSceneBuffersRD_method_create_texture_view>` **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` view_name, :ref:`RDTextureView<class_RDTextureView>` view **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`get_color_layer<class_RenderSceneBuffersRD_method_get_color_layer>` **(** :ref:`int<class_int>` layer **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`get_color_texture<class_RenderSceneBuffersRD_method_get_color_texture>` **(** **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`get_depth_layer<class_RenderSceneBuffersRD_method_get_depth_layer>` **(** :ref:`int<class_int>` layer **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`get_depth_texture<class_RenderSceneBuffersRD_method_get_depth_texture>` **(** **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2i<class_Vector2i>` | :ref:`get_internal_size<class_RenderSceneBuffersRD_method_get_internal_size>` **(** **)** |const| |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`get_render_target<class_RenderSceneBuffersRD_method_get_render_target>` **(** **)** |const| |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`get_texture<class_RenderSceneBuffersRD_method_get_texture>` **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name **)** |const| |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RDTextureFormat<class_RDTextureFormat>` | :ref:`get_texture_format<class_RenderSceneBuffersRD_method_get_texture_format>` **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name **)** |const| |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`get_texture_slice<class_RenderSceneBuffersRD_method_get_texture_slice>` **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` layer, :ref:`int<class_int>` mipmap, :ref:`int<class_int>` layers, :ref:`int<class_int>` mipmaps **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2i<class_Vector2i>` | :ref:`get_texture_slice_size<class_RenderSceneBuffersRD_method_get_texture_slice_size>` **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` mipmap **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`get_texture_slice_view<class_RenderSceneBuffersRD_method_get_texture_slice_view>` **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` layer, :ref:`int<class_int>` mipmap, :ref:`int<class_int>` layers, :ref:`int<class_int>` mipmaps, :ref:`RDTextureView<class_RDTextureView>` view **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`get_use_taa<class_RenderSceneBuffersRD_method_get_use_taa>` **(** **)** |const| |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`get_velocity_layer<class_RenderSceneBuffersRD_method_get_velocity_layer>` **(** :ref:`int<class_int>` layer **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID<class_RID>` | :ref:`get_velocity_texture<class_RenderSceneBuffersRD_method_get_velocity_texture>` **(** **)** |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_view_count<class_RenderSceneBuffersRD_method_get_view_count>` **(** **)** |const| |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_texture<class_RenderSceneBuffersRD_method_has_texture>` **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name **)** |const| |
- +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_RenderSceneBuffersRD_method_clear_context:
- .. rst-class:: classref-method
- void **clear_context** **(** :ref:`StringName<class_StringName>` context **)**
- Frees all buffers related to this context.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_create_texture:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **create_texture** **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name, :ref:`DataFormat<enum_RenderingDevice_DataFormat>` data_format, :ref:`int<class_int>` usage_bits, :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` texture_samples, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` layers, :ref:`int<class_int>` mipmaps, :ref:`bool<class_bool>` unique **)**
- Create a new texture with the given definition and cache this under the given name. Will return the existing texture if it already exists.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_create_texture_from_format:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **create_texture_from_format** **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name, :ref:`RDTextureFormat<class_RDTextureFormat>` format, :ref:`RDTextureView<class_RDTextureView>` view, :ref:`bool<class_bool>` unique **)**
- Create a new texture using the given format and view and cache this under the given name. Will return the existing texture if it already exists.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_create_texture_view:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **create_texture_view** **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` view_name, :ref:`RDTextureView<class_RDTextureView>` view **)**
- Create a new texture view for an existing texture and cache this under the given view_name. Will return the existing teture view if it already exists. Will error if the source texture doesn't exist.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_color_layer:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **get_color_layer** **(** :ref:`int<class_int>` layer **)**
- Returns the specified layer from the color texture we are rendering 3D content to.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_color_texture:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **get_color_texture** **(** **)**
- Returns the color texture we are rendering 3D content to. If multiview is used this will be a texture array with all views.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_depth_layer:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **get_depth_layer** **(** :ref:`int<class_int>` layer **)**
- Returns the specified layer from the depth texture we are rendering 3D content to.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_depth_texture:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **get_depth_texture** **(** **)**
- Returns the depth texture we are rendering 3D content to. If multiview is used this will be a texture array with all views.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_internal_size:
- .. rst-class:: classref-method
- :ref:`Vector2i<class_Vector2i>` **get_internal_size** **(** **)** |const|
- Returns the internal size of the render buffer (size before upscaling) with which textures are created by default.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_render_target:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **get_render_target** **(** **)** |const|
- Returns the render target associated with this buffers object.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_texture:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **get_texture** **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name **)** |const|
- Returns a cached texture with this name.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_texture_format:
- .. rst-class:: classref-method
- :ref:`RDTextureFormat<class_RDTextureFormat>` **get_texture_format** **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name **)** |const|
- Returns the texture format information with which a cached texture was created.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_texture_slice:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **get_texture_slice** **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` layer, :ref:`int<class_int>` mipmap, :ref:`int<class_int>` layers, :ref:`int<class_int>` mipmaps **)**
- Returns a specific slice (layer or mipmap) for a cached texture.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_texture_slice_size:
- .. rst-class:: classref-method
- :ref:`Vector2i<class_Vector2i>` **get_texture_slice_size** **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` mipmap **)**
- Returns the texture size of a given slice of a cached texture.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_texture_slice_view:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **get_texture_slice_view** **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` layer, :ref:`int<class_int>` mipmap, :ref:`int<class_int>` layers, :ref:`int<class_int>` mipmaps, :ref:`RDTextureView<class_RDTextureView>` view **)**
- Returns a specific view of a slice (layer or mipmap) for a cached texture.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_use_taa:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **get_use_taa** **(** **)** |const|
- Returns ``true`` if TAA is enabled.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_velocity_layer:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **get_velocity_layer** **(** :ref:`int<class_int>` layer **)**
- Returns the specified layer from the velocity texture we are rendering 3D content to.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_velocity_texture:
- .. rst-class:: classref-method
- :ref:`RID<class_RID>` **get_velocity_texture** **(** **)**
- Returns the velocity texture we are rendering 3D content to. If multiview is used this will be a texture array with all views.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_get_view_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_view_count** **(** **)** |const|
- Returns the view count for the associated viewport.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RenderSceneBuffersRD_method_has_texture:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_texture** **(** :ref:`StringName<class_StringName>` context, :ref:`StringName<class_StringName>` name **)** |const|
- Returns ``true`` if a cached texture exists for this name.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|