RendererConfiguration Class

Module: Core

Renderer configuration stores all the WebGL renderer related parameters.

Properties

@stencil

Boolean

Whether the drawing buffer has a stencil buffer of at least 8 bits.

antialiasing

Boolean

Antialiasing flag.

Default: false

autoClear

Boolean

Defines whether the renderer should automatically clear its output before rendering a frame.

autoClearColor

Boolean

Defines whether the renderer should clear the color buffer.

autoClearDepth

Boolean

Defines whether the renderer should clear the depth buffer.

autoClearStencil

Boolean

Defines whether the renderer should clear the stencil buffer.

backend

Number

Prefered redering backend API to use if available.

If the selected backend is not available it defaults to WebGL.

Shader code might not be cross compatible between rendering backends.

gammaFactor

Number

Gamma factor applied to the image.

gammaInput

Boolean

If set, then it expects that all textures and colors are premultiplied gamma.

gammaOutput

Boolean

If set, then it expects that all textures and colors need to be outputted in premultiplied gamma.

logarithmicDepthBuffer

Boolean

Whether to use a logarithmic depth buffer. It may be neccesary to use this if dealing with huge differences in scale in a single scene.

physicallyCorrectLights

Boolean

Whether to use physically correct lighting mode.

powerPreference

String

Provides a hint to the user agent indicating what configuration of GPU is suitable for this WebGL context. Can be "high-performance", "low-power" or "default".

precision

String

Shader precision. Can be "highp", "mediump" or "lowp". Defaults to "highp" if supported by the device.

premultipliedAlpha

Boolean

Whether the canvas contains an alpha (transparency) buffer or not.

premultipliedAlpha

Boolean

Whether the renderer will assume that colors have premultiplied alpha.

preserveDrawingBuffer

Boolean

Whether to preserve the buffers until manually cleared or overwritten.

shadows

Boolean

If true the program is rendered with shadows.

Default: true

shadowsAutoUpdate

Boolean

Enables automatic updates to the shadows in the scene.

If you do not require dynamic lighting / shadows, you may set this to false.

shadowsType

Number

Shadow map filtering type.

Default: PCFSoftShadowMap

sortObjects

Boolean

If true the renderer sorts the objects from back to front for rendering.

Important if using multiple transparent objects.

toneMapping

Number

Tonemapping can be used to remap the color of the image to a diferent set giving the scene a different color mood and/or dynamic color based on global luminosity.

Default: THREE.NoToneMapping

toneMappingExposure

Number

Exposure level of tone mapping.

toneMappingWhitePoint

Number

Tone mapping white point.

Attributes

WEBGL

Number static

Use WebGL 1.0 to render data.

Most devices fully support WebGL 1.0 at this point, should work for any type of device.

WEBGL2

Number static

Use WebGL 2.0 to render data, should be faster for some types of data.

Additinal features of GLSL can be used in WebGL 2.0. Most mobile device still dont support WebGL 2.0.