Add quality scaling settings

This commit is contained in:
schmelczerandras 2020-10-19 11:47:27 +02:00
parent 044f84c769
commit 763952de21
2 changed files with 19 additions and 0 deletions

View file

@ -9,6 +9,8 @@ export const defaultRuntimeSettings: RuntimeSettings = {
tileMultiplier: 8, tileMultiplier: 8,
isWorldInverted: false, isWorldInverted: false,
lightCutoffDistance: 400, lightCutoffDistance: 400,
distanceRenderScale: 0.5,
lightsRenderScale: 1,
colorPalette: [], colorPalette: [],
ambientLight: vec3.fromValues(0.25, 0.15, 0.25), ambientLight: vec3.fromValues(0.25, 0.15, 0.25),
textures: {}, textures: {},

View file

@ -48,6 +48,23 @@ export interface RuntimeSettings {
*/ */
colorPalette: Array<vec3 | vec4>; colorPalette: Array<vec3 | vec4>;
/**
* 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.
*/
distanceRenderScale: number;
/**
* The resolution of the final frame will be scaled by this value.
*
* Setting this is a great way to balance quality and performance.
*/
lightsRenderScale: number;
/** /**
* It is possible to use your own textures in your SDF definitions. * It is possible to use your own textures in your SDF definitions.
* *