Class reference

RenderSceneBuffersRD

Inherits RenderSceneBuffers

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, do not instantiate this from script.

Methods

void clear_context(StringName context)

Frees all buffers related to this context.

RID create_texture(StringName context, StringName name, int data_format, int usage_bits, int texture_samples, Vector2i size, int layers, int mipmaps, bool unique, bool discardable)

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_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 texture view if it already exists. Will error if the source texture doesn't exist.

RID get_color_layer(int layer, bool msaa = false)

Returns the specified layer from the color texture we are rendering 3D content to. If msaa is true and MSAA is enabled, this returns the MSAA variant of the buffer.

RID get_color_texture(bool msaa = false)

Returns the color texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. If msaa is true and MSAA is enabled, this returns the MSAA variant of the buffer.

RID get_depth_layer(int layer, bool msaa = false)

Returns the specified layer from the depth texture we are rendering 3D content to. If msaa is true and MSAA is enabled, this returns the MSAA variant of the buffer.

RID get_depth_texture(bool msaa = false)

Returns the depth texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. If msaa is true and MSAA is enabled, this returns the MSAA variant of the buffer.

float get_fsr_sharpness() const

Returns the FSR sharpness value used while rendering the 3D content (if get_scaling_3d_mode() is an FSR mode).

Vector2i get_internal_size() const

Returns the internal size of the render buffer (size before upscaling) with which textures are created by default.

int get_msaa_3d() const

Returns the applied 3D MSAA mode for this viewport.

RID get_render_target() const

Returns the render target associated with this buffers object.

int get_scaling_3d_mode() const

Returns the scaling mode used for upscaling.

int get_screen_space_aa() const

Returns the screen-space antialiasing method applied.

Vector2i get_target_size() const

Returns the target size of the render buffer (size after upscaling).

int get_texture_samples() const

Returns the number of MSAA samples used.

bool get_use_debanding() const

Returns true if debanding is enabled.

bool get_use_taa() const

Returns true if TAA is enabled.

RID get_velocity_layer(int layer, bool msaa = false)

Returns the specified layer from the velocity texture we are rendering 3D content to.

RID get_velocity_texture(bool msaa = false)

Returns the velocity texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. If msaa is true and MSAA is enabled, this returns the MSAA variant of the buffer.

int get_view_count() const

Returns the view count for the associated viewport.

Source revision 5592dc3a7a61
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.