<<<<<<< HEAD ======= RuntimeSettings | SDF-2D - v0.7.6 >>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

Interface for a configuration object containing the settings that can be changed during runtime.

The default values for RuntimeSettings can be found in defaultRuntimeSettings.

### Hierarchy

- RuntimeSettings

## Index

### Properties

- ambientLight
- colorPalette
- distanceRenderScale
- enableHighDpiRendering
- isWorldInverted
- lightCutoffDistance
- lightsRenderScale
- motionBlur
- textures
- tileMultiplier

## Properties

### ambientLight

ambientLight: vec3

<<<<<<< HEAD
- Defined in graphics/rendering/settings/runtime-settings.ts:91
=======
- Defined in graphics/rendering/settings/runtime-settings.ts:91
>>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

A light affecting every pixel (even the ones inside objects).

### colorPalette

colorPalette: Array<vec3 | vec4>

<<<<<<< HEAD
- Defined in graphics/rendering/settings/runtime-settings.ts:49
=======
- Defined in graphics/rendering/settings/runtime-settings.ts:49
>>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

Its length should be less than the one specified in StartupSettings.paletteSize.

The possible colors for the objects. Each color is referenced by its index in the palette.

Can have transparency, but only if WebGL2 support is enabled.

### distanceRenderScale

distanceRenderScale: number

<<<<<<< HEAD
- Defined in graphics/rendering/settings/runtime-settings.ts:59
=======
- Defined in graphics/rendering/settings/runtime-settings.ts:59
>>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

The resolution of the distance field rendering will be scaled up or down with this value.

Because of interpolation, this can be set much lower than the `lightsRenderScale`, while maintaining closely the same perceived quality.

Setting this is a great way to balance quality and performance.

### enableHighDpiRendering

enableHighDpiRendering: boolean

<<<<<<< HEAD
- Defined in graphics/rendering/settings/runtime-settings.ts:14
=======
- Defined in graphics/rendering/settings/runtime-settings.ts:14
>>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

When set to `true` rendering will be done on the screen's real resolution.

### isWorldInverted

isWorldInverted: boolean

<<<<<<< HEAD
- Defined in graphics/rendering/settings/runtime-settings.ts:33
=======
- Defined in graphics/rendering/settings/runtime-settings.ts:33
>>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

By default, every pixel is outside of objects. Flipping this value to `true` will result in every pixel being inside a large object. From then it only makes sense to draw inverted objects.

### lightCutoffDistance

lightCutoffDistance: number

<<<<<<< HEAD
- Defined in graphics/rendering/settings/runtime-settings.ts:39
=======
- Defined in graphics/rendering/settings/runtime-settings.ts:39
>>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

When lights reach the end of the display, they are slowly faded out. The length of this phaseout can be set through this value.

### lightsRenderScale

lightsRenderScale: number

<<<<<<< HEAD
- Defined in graphics/rendering/settings/runtime-settings.ts:66
=======
- Defined in graphics/rendering/settings/runtime-settings.ts:66
>>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

The resolution of the final frame will be scaled by this value.

Setting this is a great way to balance quality and performance.

### motionBlur

motionBlur: number

<<<<<<< HEAD
- Defined in graphics/rendering/settings/runtime-settings.ts:74
=======
- Defined in graphics/rendering/settings/runtime-settings.ts:74
>>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

Set the extent of the motion blur.

The values must be between 0 and 1. Where 0 means no motion blur, and values just below 1 mean an extreme amount of motion blur.

### textures

textures: {}

<<<<<<< HEAD
- Defined in graphics/rendering/settings/runtime-settings.ts:84
=======
- Defined in graphics/rendering/settings/runtime-settings.ts:84
>>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

It is possible to use your own textures in your SDF definitions.

The keys of the object should be the name used to reference them in the GLSL code, and the values should be the textures themselves or a TextureWithOptions specifying the texture's TextureOptions. It can be a canvas, img element, Image and so on.

#### Type declaration

- ##### [textureName: string]: TexImageSource | TextureWithOptions

### tileMultiplier

tileMultiplier: number

<<<<<<< HEAD
- Defined in graphics/rendering/settings/runtime-settings.ts:26
=======
- Defined in graphics/rendering/settings/runtime-settings.ts:26
>>>>>>> 2454f2f37d581c69f5d0c844a028712ddbc0a1cc

First, the SDF of the scene is evaluated at every single pixel. For speeding this process up, the screen is divided up into tiles, this way each having to deal with a fewer objects.

For each tile, it is decided which objects are near its close vicinity. This comes with some overhead for the CPU, while saving the GPU from loads of calculations. The workload can be balanced between the CPU and the GPU by setting this number.