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.


maxDirLights

Maximum number of directional lights inside a dynamic WebGL 2.0 shader.


maxLightProbes

Maximum number of light probes inside a dynamic WebGL 2.0 shader.


maxPointSpotLights

Maximum number of point / spot lights inside a dynamic WebGL 2.0 shader.


maxSkeletonJoints

The maximum supported number of joints for skinning animations.


numLightingCellsX

Number of cells for clustered rendering in WebGL 2.0


numLightingCellsY

Number of cells for clustered 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.


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.


webgl2

Use WebGL 2 if available.