RenderSceneBuffersRD
Inherits: RenderSceneBuffers < RefCounted < Object
Abstract render scene buffer implementation for the RenderingDevice based renderers.
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.
Methods
Method Descriptions
void clear_context ( StringName context )
Frees all buffers related to this context.
RID create_texture ( StringName context, StringName name, DataFormat data_format, int usage_bits, TextureSamples texture_samples, Vector2i size, int layers, int mipmaps, 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.
RID create_texture_from_format ( StringName context, StringName name, RDTextureFormat format, RDTextureView view, 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.
RID create_texture_view ( StringName context, StringName name, StringName view_name, 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.
RID get_color_layer ( int layer )
Returns the specified layer from the color texture we are rendering 3D content to.
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.
RID get_depth_layer ( int layer )
Returns the specified layer from the depth texture we are rendering 3D content to.
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.
Vector2i get_internal_size ( ) const
Returns the internal size of the render buffer (size before upscaling) with which textures are created by default.
RID get_render_target ( ) const
Returns the render target associated with this buffers object.
RID get_texture ( StringName context, StringName name ) const
Returns a cached texture with this name.
RDTextureFormat get_texture_format ( StringName context, StringName name ) const
Returns the texture format information with which a cached texture was created.
RID get_texture_slice ( StringName context, StringName name, int layer, int mipmap, int layers, int mipmaps )
Returns a specific slice (layer or mipmap) for a cached texture.
Vector2i get_texture_slice_size ( StringName context, StringName name, int mipmap )
Returns the texture size of a given slice of a cached texture.
RID get_texture_slice_view ( StringName context, StringName name, int layer, int mipmap, int layers, int mipmaps, RDTextureView view )
Returns a specific view of a slice (layer or mipmap) for a cached texture.
bool get_use_taa ( ) const
Returns true
if TAA is enabled.
RID get_velocity_layer ( int layer )
Returns the specified layer from the velocity texture we are rendering 3D content to.
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.
int get_view_count ( ) const
Returns the view count for the associated viewport.
bool has_texture ( StringName context, StringName name ) const
Returns true
if a cached texture exists for this name.
© Copyright 2014-present Juan Linietsky, Ariel Manzur and the Godot community (CC BY 3.0). Revision 53e837c6
.
Built with Sphinx using a theme provided by Read the Docs.