Table of Contents

Class RenderSceneBuffersRD

Namespace
Godot
Assembly
GodotSharp.dll

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.

public class RenderSceneBuffersRD : RenderSceneBuffers, IDisposable
Inheritance
RenderSceneBuffersRD
Implements
Inherited Members

Methods

ClearContext(StringName)

Frees all buffers related to this context.

public void ClearContext(StringName context)

Parameters

context StringName

CreateTexture(StringName, StringName, DataFormat, uint, TextureSamples, Vector2I, uint, uint, bool)

Create a new texture with the given definition and cache this under the given name. Will return the existing texture if it already exists.

public Rid CreateTexture(StringName context, StringName name, RenderingDevice.DataFormat dataFormat, uint usageBits, RenderingDevice.TextureSamples textureSamples, Vector2I size, uint layers, uint mipmaps, bool unique)

Parameters

context StringName
name StringName
dataFormat RenderingDevice.DataFormat
usageBits uint
textureSamples RenderingDevice.TextureSamples
size Vector2I
layers uint
mipmaps uint
unique bool

Returns

Rid

CreateTextureFromFormat(StringName, StringName, RDTextureFormat, RDTextureView, bool)

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.

public Rid CreateTextureFromFormat(StringName context, StringName name, RDTextureFormat format, RDTextureView view, bool unique)

Parameters

context StringName
name StringName
format RDTextureFormat
view RDTextureView
unique bool

Returns

Rid

CreateTextureView(StringName, StringName, StringName, RDTextureView)

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.

public Rid CreateTextureView(StringName context, StringName name, StringName viewName, RDTextureView view)

Parameters

context StringName
name StringName
viewName StringName
view RDTextureView

Returns

Rid

GetColorLayer(uint)

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

public Rid GetColorLayer(uint layer)

Parameters

layer uint

Returns

Rid

GetColorTexture()

Returns the color texture we are rendering 3D content to. If multiview is used this will be a texture array with all views.

public Rid GetColorTexture()

Returns

Rid

GetDepthLayer(uint)

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

public Rid GetDepthLayer(uint layer)

Parameters

layer uint

Returns

Rid

GetDepthTexture()

Returns the depth texture we are rendering 3D content to. If multiview is used this will be a texture array with all views.

public Rid GetDepthTexture()

Returns

Rid

GetInternalSize()

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

public Vector2I GetInternalSize()

Returns

Vector2I

GetRenderTarget()

Returns the render target associated with this buffers object.

public Rid GetRenderTarget()

Returns

Rid

GetTexture(StringName, StringName)

Returns a cached texture with this name.

public Rid GetTexture(StringName context, StringName name)

Parameters

context StringName
name StringName

Returns

Rid

GetTextureFormat(StringName, StringName)

Returns the texture format information with which a cached texture was created.

public RDTextureFormat GetTextureFormat(StringName context, StringName name)

Parameters

context StringName
name StringName

Returns

RDTextureFormat

GetTextureSlice(StringName, StringName, uint, uint, uint, uint)

Returns a specific slice (layer or mipmap) for a cached texture.

public Rid GetTextureSlice(StringName context, StringName name, uint layer, uint mipmap, uint layers, uint mipmaps)

Parameters

context StringName
name StringName
layer uint
mipmap uint
layers uint
mipmaps uint

Returns

Rid

GetTextureSliceSize(StringName, StringName, uint)

Returns the texture size of a given slice of a cached texture.

public Vector2I GetTextureSliceSize(StringName context, StringName name, uint mipmap)

Parameters

context StringName
name StringName
mipmap uint

Returns

Vector2I

GetTextureSliceView(StringName, StringName, uint, uint, uint, uint, RDTextureView)

Returns a specific view of a slice (layer or mipmap) for a cached texture.

public Rid GetTextureSliceView(StringName context, StringName name, uint layer, uint mipmap, uint layers, uint mipmaps, RDTextureView view)

Parameters

context StringName
name StringName
layer uint
mipmap uint
layers uint
mipmaps uint
view RDTextureView

Returns

Rid

GetUseTaa()

Returns true if TAA is enabled.

public bool GetUseTaa()

Returns

bool

GetVelocityLayer(uint)

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

public Rid GetVelocityLayer(uint layer)

Parameters

layer uint

Returns

Rid

GetVelocityTexture()

Returns the velocity texture we are rendering 3D content to. If multiview is used this will be a texture array with all views.

public Rid GetVelocityTexture()

Returns

Rid

GetViewCount()

Returns the view count for the associated viewport.

public uint GetViewCount()

Returns

uint

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

HasTexture(StringName, StringName)

Returns true if a cached texture exists for this name.

public bool HasTexture(StringName context, StringName name)

Parameters

context StringName
name StringName

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool