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
StringNamename
StringNamedataFormat
RenderingDevice.DataFormatusageBits
uinttextureSamples
RenderingDevice.TextureSamplessize
Vector2Ilayers
uintmipmaps
uintunique
bool
Returns
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
StringNamename
StringNameformat
RDTextureFormatview
RDTextureViewunique
bool
Returns
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
StringNamename
StringNameviewName
StringNameview
RDTextureView
Returns
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
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
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
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
GetInternalSize()
Returns the internal size of the render buffer (size before upscaling) with which textures are created by default.
public Vector2I GetInternalSize()
Returns
GetRenderTarget()
Returns the render target associated with this buffers object.
public Rid GetRenderTarget()
Returns
GetTexture(StringName, StringName)
Returns a cached texture with this name.
public Rid GetTexture(StringName context, StringName name)
Parameters
context
StringNamename
StringName
Returns
GetTextureFormat(StringName, StringName)
Returns the texture format information with which a cached texture was created.
public RDTextureFormat GetTextureFormat(StringName context, StringName name)
Parameters
context
StringNamename
StringName
Returns
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
StringNamename
StringNamelayer
uintmipmap
uintlayers
uintmipmaps
uint
Returns
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
StringNamename
StringNamemipmap
uint
Returns
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
StringNamename
StringNamelayer
uintmipmap
uintlayers
uintmipmaps
uintview
RDTextureView
Returns
GetUseTaa()
Returns true
if TAA is enabled.
public bool GetUseTaa()
Returns
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
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
GetViewCount()
Returns the view count for the associated viewport.
public uint GetViewCount()
Returns
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_nameName of the method to check for.
Returns
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_nameName of the signal to check for.
Returns
HasTexture(StringName, StringName)
Returns true
if a cached texture exists for this name.
public bool HasTexture(StringName context, StringName name)
Parameters
context
StringNamename
StringName
Returns
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_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.