Inheritance: EventDispatcher →
A render target is a buffer where the video card draws pixels for a scene that is being rendered in the background. It is used in different effects, such as applying postprocessing to a rendered image before displaying it on the screen.
Constructs a new render target.
width
The width of the render target.
Default is 1.
height
The height of the render target.
Default is 1.
options
The configuration object.
The depth of the render target.
Default is 1.
Whether to allocate a depth buffer or not.
Default is true.
Instead of saving the depth in a renderbuffer, a texture can be used instead which is useful for further processing e.g. in context of post-processing.
Default is null.
The height of the render target.
Default is 1.
This flag can be used for type testing.
Default is true.
Whether to this target is used in multiview rendering.
Default is false.
Whether to resolve the depth buffer or not.
Default is true.
Whether to resolve the stencil buffer or not.
Default is true.
The number of MSAA samples.
A value of 0 disables MSAA.
Default is 0.
A rectangular area inside the render target's viewport. Fragments that are outside the area will be discarded.
Default is (0,0,width,height).
Indicates whether the scissor test should be enabled when rendering into this render target or not.
Default is false.
Whether to allocate a stencil buffer or not.
Default is false.
The texture representing the default color attachment.
An array of textures. Each color attachment is represented as a separate texture. Has at least a single entry for the default color attachment.
A rectangular area representing the render target's viewport.
Default is (0,0,width,height).
The width of the render target.
Default is 1.
Returns a new render target with copied values from this instance.
Returns: A clone of this instance.
Copies the settings of the given render target. This is a structural copy so no resources are shared between render targets after the copy. That includes all MRT textures and the depth texture.
source
The render target to copy.
Returns: A reference to this instance.
Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
Sets the size of this render target.
width
The width.
height
The height.
depth
The depth.
Default is 1.
Render target options.
generateMipmaps
boolean
Whether to generate mipmaps or not.
Default is false.
magFilter
number
The mag filter.
Default is LinearFilter.
minFilter
number
The min filter.
Default is LinearFilter.
format
number
The texture format.
Default is RGBAFormat.
type
number
The texture type.
Default is UnsignedByteType.
internalFormat
string
The texture's internal format.
Default is null.
wrapS
number
The texture's uv wrapping mode.
Default is ClampToEdgeWrapping.
wrapT
number
The texture's uv wrapping mode.
Default is ClampToEdgeWrapping.
anisotropy
number
The texture's anisotropy value.
Default is 1.
colorSpace
string
The texture's color space.
Default is NoColorSpace.
depthBuffer
boolean
Whether to allocate a depth buffer or not.
Default is true.
stencilBuffer
boolean
Whether to allocate a stencil buffer or not.
Default is false.
resolveDepthBuffer
boolean
Whether to resolve the depth buffer or not.
Default is true.
resolveStencilBuffer
boolean
Whether to resolve the stencil buffer or not.
Default is true.
depthTexture
Texture
Reference to a depth texture.
Default is null.
samples
number
The MSAA samples count.
Default is 0.
count
number
Defines the number of color attachments . Must be at least 1.
Default is 1.
depth
number
The texture depth.
Default is 1.
multiview
boolean
Whether this target is used for multiview rendering.
Default is false.