[name]

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.

Constructor

[name]([page:Number width], [page:Number height], [page:Object options])

width -- The width of the renderTarget.
height -- The height of the renderTarget.
options is an optional object that holds texture parameters for an auto-generated target texture and depthBuffer/stencilBuffer booleans. For an explanation of the texture parameters see [page:Texture Texture].
wrapS — [page:Number] default is *THREE.ClampToEdgeWrapping*.
wrapT — [page:Number] default is *THREE.ClampToEdgeWrapping*.
magFilter — [page:Number], default is *THREE.LinearFilter*.
minFilter — [page:Number], default is *THREE.LinearFilter*.
format — [page:Number], default is *THREE.RGBAFormat*.
type — [page:Number], default is *THREE.UnsignedByteType*.
anisotropy — [page:Number], default is *1*.
encoding — [page:Number], default is *THREE.LinearEncoding*.
depthBuffer — [page:Boolean], default is *true*. Set this to false if you don't need it.
stencilBuffer — [page:Boolean], default is *true*. Set this to false if you don't need it.
Creates a new render target with a certain width and height.

Properties

[property:number uuid]

A unique number for this render target instance.

[property:number width]

The width of the render target.

[property:number height]

The height of the render target.

[property:Vector4 scissor]

A rectangular area inside the render target's viewport. Fragments that are outside the area will be discarded.

[property:boolean scissorTest]

Indicates whether the scissor test is active or not.

[property:Vector4 viewport]

The viewport of this render target.

[property:Texture texture]

This texture instance holds the rendered pixels. Use it as input for further processing.

[property:boolean depthBuffer]

Renders to the depth buffer. Default is true.

[property:boolean stencilBuffer]

Renders to the stencil buffer. Default is true.

[property:DepthTexture depthTexture]

If set, the scene depth will be rendered to this texture. Default is null.

Methods

[method:null setSize]( [page:Number width], [page:Number height] )

Sets the size of the render target.

[method:WebGLRenderTarget clone]()

Creates a copy of this render target.

[method:WebGLRenderTarget copy]( [page:WebGLRenderTarget source] )

Adopts the settings of the given render target.

[method:null dispose]()

Dispatches a dispose event.

[page:EventDispatcher EventDispatcher] methods are available on this class.

Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]