# Interface StartupSettings

Interface for a configuration object containing the settings that need to be given before shader compilation.

The default values for StartupSettings can be found in [[defaultStartupSettings]].

interface StartupSettings {
backgroundColor:
| IndexedCollection
| [number, number, number]
| [number, number, number, number];
enableContextLostSimulator: boolean;
enableStopwatch: boolean;
ignoreWebGL2: boolean;
lightOverlapReduction: number;
lightPenetrationRatio: number;
paletteSize: number;
shadowTraceCount: number;
}

- Defined in graphics/rendering/settings/startup-settings.ts:9

##### Index

### Properties

backgroundColor
enableContextLostSimulator
enableStopwatch
ignoreWebGL2
lightOverlapReduction
lightPenetrationRatio
paletteSize
shadowTraceCount

## Properties

### backgroundColor

backgroundColor:
| IndexedCollection
| [number, number, number]
| [number, number, number, number]

The default background color of the scene, can have transparency on every platform.

- Defined in graphics/rendering/settings/startup-settings.ts:67

### enableContextLostSimulator

enableContextLostSimulator: boolean

Many context-lost events will be simulated when enabled.

Useful for testing.

- Defined in graphics/rendering/settings/startup-settings.ts:62

### enableStopwatch

enableStopwatch: boolean

Creates a stopwatch used for measuring the GPU render time when its required extension is available.

You should only have one renderer with the stopwatch enabled.

- Defined in graphics/rendering/settings/startup-settings.ts:16

### ignoreWebGL2

ignoreWebGL2: boolean

When set to `true`, rendering will fall back to WebGL even when WebGL2 is present.

Useful for testing compatibility.

- Defined in graphics/rendering/settings/startup-settings.ts:75

### lightOverlapReduction

lightOverlapReduction: number

Controls how overlapping lights combine.

At `0` lights are summed additively (the physically-correct default): two nearby lights brighten their overlap and their glows merge into a shape larger than either alone. At `1` overlapping lights instead take the per-channel maximum, so a combination never reads brighter or larger than its strongest contributor. Values in between blend the two.

A single light looks the same at any value. Should be between 0 and 1.

- Defined in graphics/rendering/settings/startup-settings.ts:46

### lightPenetrationRatio

lightPenetrationRatio: number

The illumination is multiplied by this constant where the distance field is negative (i.e. inside objects).

Should be between 0 and 1, but other values are also permitted.

- Defined in graphics/rendering/settings/startup-settings.ts:33

### paletteSize

paletteSize: number

Gives the number of possible object colors for the scene.

When using WebGL, only 256 different colors can be used. On WebGL2, its value should not be larger than 4096 for maintaining compatibility with low-end devices.

- Defined in graphics/rendering/settings/startup-settings.ts:55

### shadowTraceCount

shadowTraceCount: number

The raytracing algorithm used for shadows requires a step count. Sensible values for this are between 8 and 32.

The higher the number, the harder the shadows will get. Some ambient-occlusion-like effects can be visible at lower trace counts.

- Defined in graphics/rendering/settings/startup-settings.ts:25