Vital.sandbox
Rendertarget

rendertarget.create

Client

Creates a new rendertarget instance


Syntax

local instance = rendertarget.create(width, height, transparent = false)

Parameters

TypeNameDescription
intwidthWidth of the rendertarget in pixels
intheightHeight of the rendertarget in pixels
booltransparentWhether the rendertarget should have a transparent background

Returns

TypeNameDescription
rendertargetinstanceCreated rendertarget instance

Examples

Create a rendertarget and set it as active
local rt = rendertarget.create(1920, 1080, false)

rt:set_active()

On this page