API

Interface RenderTargetCreationOptions

Define options used to create a render target texture

interface RenderTargetCreationOptions {
    colorAttachment?: InternalTexture;
    comparisonFunction?: number;
    createMipMaps?: boolean;
    createMSAATexture?: boolean;
    creationFlags?: number;
    format?: number;
    generateDepthBuffer?: boolean;
    generateMipMaps?: boolean;
    generateStencilBuffer?: boolean;
    isCube?: boolean;
    label?: string;
    noColorAttachment?: boolean;
    samples?: number;
    samplingMode?: number;
    type?: number;
    useSRGBBuffer?: boolean;
}

Hierarchy (View Summary)

Index
colorAttachment?: InternalTexture

Specifies the internal texture to use directly instead of creating one (ignores noColorAttachment flag when set) *

comparisonFunction?: number

Comparison function. Used only for depth textures (default: 0)

createMipMaps?: boolean

Specifies if mipmaps must be created. If undefined, the value from generateMipMaps is taken instead

createMSAATexture?: boolean

If the MSAA texture must be created right away (default: false)

creationFlags?: number

Texture creation flags

format?: number

Defines format (RGBA by default)

generateDepthBuffer?: boolean

Specifies whether or not a depth should be allocated in the texture (true by default)

generateMipMaps?: boolean

Specifies if mipmaps must be generated

generateStencilBuffer?: boolean

Specifies whether or not a stencil should be allocated in the texture (false by default)

isCube?: boolean

If the created texture is a cube texture

label?: string

Label of the texture (used for debugging only)

noColorAttachment?: boolean

Specifies that no color target should be bound to the render target (useful if you only want to write to the depth buffer, for eg)

samples?: number

Defines sample count (1 by default)

samplingMode?: number

Defines sampling mode (trilinear by default)

type?: number

Defines texture type (unsigned byte by default)

useSRGBBuffer?: boolean

Creates the RTT in sRGB space