reckfellENGINE

BackBufferCopy

A node that copies a region of the screen to a buffer for access in shader code.

On this page
class BackBufferCopyReckfellSharpInherits Entity2D

A node that copies a region of the screen to a buffer for access in shader code.

Entity for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is buffered with the content of the screen it covers, or the entire screen according to the BackBufferCopy.CopyMode. It can be accessed in shader scripts using the screen texture (i.e. a uniform sampler with hint_screen_texture). Note: Since this node inherits from Entity2D (and not Control), anchors and margins won't apply to child Control-derived nodes. This can be problematic when resizing the window. To avoid this, add Control-derived nodes as siblings to the BackBufferCopy node instead of adding them as children.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

BackBufferCopyConstructor
# BackBufferCopy
C#
public BackBufferCopy();

Properties2

CopyModeProperty
# CopyMode
C#
public BackBufferCopy.CopyModeEnum CopyMode { get; set; }

Disabled turns off the explicit copy; Viewport copies the whole current screen; Rect copies the Rect region. To make a second canvas_item shader read the first pass’s result, place the copy between their draws. Without a new copy, screen-reading shaders can read the same previously captured screen.

RectProperty
# Rect
C#
public Rect2 Rect { get; set; }

Copy region in the BackBufferCopy’s local coordinates, used with CopyMode=Rect. Sample within the region actually copied. If a shader offsets SCREEN_UV, expand the region to cover its full sampling range. CopyMode=Viewport copies the whole screen rather than limiting the copy to this Rect.

Methods4

GetCopyModeBackBufferCopy.CopyModeEnum
# GetCopyMode
C#
public BackBufferCopy.CopyModeEnum GetCopyMode();
Returns BackBufferCopy.CopyModeEnum
GetRectRect2
# GetRect
C#
public Rect2 GetRect();
Returns Rect2
SetCopyModevoid
# SetCopyMode
C#
public void SetCopyMode(BackBufferCopy.CopyModeEnum copyMode);
Parameters
NameTypeDefault
copyModeBackBufferCopy.CopyModeEnum—
SetRectvoid
# SetRect
C#
public void SetRect(Rect2 rect);
Parameters
NameTypeDefault
rectRect2—

BackBufferCopy.CopyModeEnum

ValueDescription
Disabled = 0

Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers.

Rect = 1

BackBufferCopy buffers a rectangular region.

Viewport = 2

BackBufferCopy buffers the entire screen.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.