Class: InitOptions

InitOptions

Provides a set of options to configure Helix at init. Once passed, the options get assigned to META#OPTIONS but the values may have changed to reflect the capabilities of the device. For example: hdr may be set to false if floating point render targets aren't supported. It's important to check options like these through META.OPTIONS to handle them correctly. (lack of hdr may require a different lighting setup).


new InitOptions()

Author:
  • derschmale <http://www.derschmale.com>

Members


ambientOcclusion

Allows applying ambient occlusion (SSAO or HBAO) to the scene.


debug

This enables some error-checking (such as on shader compilation). This has a big performance impact on shader initialisation.


defaultLightingModel

The default {@codelink LightingModel} to use.


hdr

Use high dynamic range for rendering. May be forced to "false" if floating point render targets are not supported.


ignoreExtensions

This disables all optional WebGL extensions; generally for debugging purposes.


maxDiffuseProbes

Maximum number of diffuse probes when using dynamic lighting. Increase this to support multiple probes.


maxDirLights

Maximum number of directional lights when using dynamic WebGL 2.0 lighting.


maxPointSpotLights

Maximum number of point / spot lights when using dynamic WebGL 2.0 lighting.


maxSkeletonJoints

The maximum supported number of joints for skinning animations.


maxSpecularProbes

Maximum number of specular probes when using dynamic lighting. Increase this to support multiple probes.


numLightingCellsX

Number of cells for tiled rendering in WebGL 2.0


numLightingCellsY

Number of cells for tiled rendering in WebGL 2.0


numShadowCascades

The amount of shadow cascades to use. Cascades split up the view frustum into areas with their own shadow maps, increasing quality at the cost of performance.


preserveDrawingBuffer

Whether or not the drawing buffer is cleared or not between frames. Set this to true for VR mirroring.


renderMotionVectors

Indicates whether the renderer should render a motion vector buffer when needed. This has some rendering overhead, but can improve things such as TAA and motion blur for dynamic scenes. This can also help if depth precision issues is introducing ghosting in TAA.


shadowFilter

The shadow filter to use when rendering directional light shadows.


throwOnShaderError

Throws errors when shaders fail to compile.


transparentBackground

Indicates whether the back buffer should support transparency.


useGammaCorrection

Apply gamma correction. This allows lighting to happen in linear space, as it should.


usePreciseGammaCorrection

If true, uses a gamma of 2.2 instead of 2. The latter is faster and generally "good enough".


useSkinningTexture

Whether or not to use a texture to store skinning data. May be forced to "false" if floating point textures are not supported.


vrUserHeight

The default eye height for room-scale positions - in case the VR device does not support room-scale VR


webgl2

Use WebGL 2 if available.