Class RenderTarget

Create a render target. A render target allows you to render a scene to a texture, instead of to screen. And can be used to either render a different view for composition to a scene, or to create advanced post processing effects.

Constructors

Properties

buffer: WebGLFramebuffer

The WebGL frame buffer object to render to.

depth: boolean

Whether to render a depth buffer.

depthBuffer: WebGLFramebuffer

The depth buffer.

depthStencilBuffer: WebGLFramebuffer

The depth-stencil buffer.

depthTexture: null | Texture

The depth texture.

The WTCGL rendering context.

height: number

The height of the target.

stencil: boolean

Whether to render a stencil buffer.

stencilBuffer: WebGLFramebuffer

The stencil buffer.

target: number

A GLEnum representing the binding point for the texture / buffer.

gl.FRAMEBUFFER
textures: Texture[]

The texture array. If you supply only one colour, you can just output this as you normally would with gl_FragColor, otherwise you need to output one at a time with gl_FragData[x]

width: number

The width of the target.

Accessors