Index · Object → RefCounted → RenderSceneBuffers → RenderSceneBuffersRD

RenderSceneBuffersRD

Render scene buffer implementation for the RenderingDevice based renderers.

Class 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. See also RenderSceneBuffers.

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 class from a script.

Methods

func clear_context(context: StringName) -> void

Frees all buffers related to this context.

func create_texture(context: StringName, name: StringName, data_format: RenderingDevice.DataFormat, usage_bits: int, texture_samples: RenderingDevice.TextureSamples, size: Vector2i, layers: int, mipmaps: int, unique: bool, discardable: bool) -> RID

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

func create_texture_from_format(context: StringName, name: StringName, format: RDTextureFormat, view: RDTextureView, unique: bool) -> RID

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.

func create_texture_view(context: StringName, name: StringName, view_name: StringName, view: RDTextureView) -> RID

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.

func get_color_layer(layer: int, msaa: bool = false) -> RID

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.

func get_color_texture(msaa: bool = false) -> RID

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.

func get_depth_layer(layer: int, msaa: bool = false) -> RID

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.

func get_depth_texture(msaa: bool = false) -> RID

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.

func get_fsr_sharpness() -> float

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

func get_internal_size() -> Vector2i

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

func get_msaa_3d() -> RenderingServer.ViewportMSAA

Returns the applied 3D MSAA mode for this viewport.

func get_render_target() -> RID

Returns the render target associated with this buffers object.

func get_scaling_3d_mode() -> RenderingServer.ViewportScaling3DMode

Returns the scaling mode used for upscaling.

func get_screen_space_aa() -> RenderingServer.ViewportScreenSpaceAA

Returns the screen-space antialiasing method applied.

func get_target_size() -> Vector2i

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

func get_texture(context: StringName, name: StringName) -> RID

Returns a cached texture with this name.

func get_texture_format(context: StringName, name: StringName) -> RDTextureFormat

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

func get_texture_samples() -> RenderingDevice.TextureSamples

Returns the number of MSAA samples used.

func get_texture_slice(context: StringName, name: StringName, layer: int, mipmap: int, layers: int, mipmaps: int) -> RID

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

func get_texture_slice_size(context: StringName, name: StringName, mipmap: int) -> Vector2i

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

func get_texture_slice_view(context: StringName, name: StringName, layer: int, mipmap: int, layers: int, mipmaps: int, view: RDTextureView) -> RID

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

func get_use_debanding() -> bool

Returns true if debanding is enabled.

func get_use_taa() -> bool

Returns true if TAA is enabled.

func get_velocity_layer(layer: int, msaa: bool = false) -> RID

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

func get_velocity_texture(msaa: bool = false) -> RID

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.

func get_view_count() -> int

Returns the view count for the associated viewport.

func has_texture(context: StringName, name: StringName) -> bool

Returns true if a cached texture exists for this name.

Inherited from RenderSceneBuffers (1)
Inherited from RefCounted (4)
func init_ref() -> bool
func reference() -> bool
func unreference() -> bool
Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

Inherited from Object (2)