Parameters used to create a RenderTarget

interface RenderTargetParams {
    label?: string;
    sampleCount?: number;
    qualityRatio?: number;
    fixedSize?: TextureSize;
    useColorAttachments?: boolean;
    renderToSwapChain?: boolean;
    colorAttachments?: ColorAttachmentParams[];
    useDepth?: boolean;
    depthTexture?: Texture;
    depthLoadOp?: GPULoadOp;
    depthStoreOp?: GPUStoreOp;
    depthClearValue?: number;
    depthFormat?: GPUTextureFormat;
    depthReadOnly?: boolean;
    stencilClearValue?: number;
    stencilLoadOp?: GPULoadOp;
    stencilStoreOp?: GPUStoreOp;
    stencilReadOnly?: boolean;
    autoRender?: boolean;
    renderTextureName?: string;
}

Hierarchy (View Summary)

Properties

label?: string

The label of the RenderPass, sent to various GPU objects for debugging purpose.

sampleCount?: number

Whether the view and depth textures should use multisampling or not.

qualityRatio?: number

Force all the RenderPass textures size to be set to the given ratio of the renderer canvas size. Used mainly to lower the rendered definition.

fixedSize?: TextureSize

Force the all the RenderPass textures to be set at given size. Used mainly to lower the rendered definition.

useColorAttachments?: boolean

Whether this RenderPass should handle a view texture.

renderToSwapChain?: boolean

Whether the main (first colorAttachments) view texture should use the content of the swap chain and render to it each frame.

colorAttachments?: ColorAttachmentParams[]

Array of one or multiple (Multiple Render Targets) color attachments parameters.

useDepth?: boolean

Whether this RenderPass should handle a depth texture.

depthTexture?: Texture

Whether this RenderPass should use an already created depth texture.

depthLoadOp?: GPULoadOp

The depth load operation to perform while drawing this RenderPass. Default to 'clear.

depthStoreOp?: GPUStoreOp

The depth store operation to perform while drawing this RenderPass. Default to 'store'.

depthClearValue?: number

The depth clear value to clear to before drawing this RenderPass.

depthFormat?: GPUTextureFormat

Optional format of the depth texture.

depthReadOnly?: boolean

Indicates that the depth component of the depth texture view is read only. Default to false.

stencilClearValue?: number

A number indicating the value to clear view's stencil component to prior to executing the render pass. This is ignored if stencilLoadOp is not set to "clear". Default to 0.

stencilLoadOp?: GPULoadOp

The stencil load operation to perform while drawing this RenderPass. Default to 'clear.

stencilStoreOp?: GPUStoreOp

The stencil store operation to perform while drawing this RenderPass. Default to 'store'.

stencilReadOnly?: boolean

Indicates that the stencil component of the depth texture view is read only. Default to false.

autoRender?: boolean

Whether we should add this RenderTarget to our Scene to let it handle the rendering process automatically

renderTextureName?: string

Texture name to use for the RenderTarget render texture. Default to 'renderTexture'.