BackBufferCopy
Inherits:Node2D<CanvasItem<Node<Object
A node that copies a region of the screen to a buffer for access in shader code.
Description
Node for back-buffering the currently-displayed screen. The region defined in theBackBufferCopy node is buffered with the content of the screen it covers, or the entire screen according to thecopy_mode. It can be accessed in shader scripts using the screen texture (i.e. a uniform sampler withhint_screen_texture
).
Note: Since this node inherits fromNode2D (and notControl), anchors and margins won't apply to childControl-derived nodes. This can be problematic when resizing the window. To avoid this, addControl-derived nodes assiblings to theBackBufferCopy node instead of adding them as children.
Tutorials
Properties
| ||
|
Enumerations
enumCopyMode:🔗
CopyModeCOPY_MODE_DISABLED =0
Disables the buffering mode. This means theBackBufferCopy node will directly use the portion of screen it covers.
CopyModeCOPY_MODE_RECT =1
BackBufferCopy buffers a rectangular region.
CopyModeCOPY_MODE_VIEWPORT =2
BackBufferCopy buffers the entire screen.
Property Descriptions
CopyModeget_copy_mode()
Buffer mode. SeeCopyMode constants.
Rect2rect =Rect2(-100,-100,200,200)
🔗
Rect2get_rect()
The area covered by theBackBufferCopy. Only used ifcopy_mode isCOPY_MODE_RECT.