Lighting

Description

sealed class Tinman.Engine.Components.Lighting

The Lighting class defines global settings for controlling high-dynamic range lighting.

Public / Constructors

Lighting


public constructor Lighting → ()

Creates a new instance of Lighting.

Public / Methods

Apply


public method Apply → (1)

parameters in : LightingParameters

[not-null]
The LightingParameters object to update.

Applies the current tone mapping coefficients.

This method sets the LightingParameters.Lighting property.

Reset


public method Reset → ()

Resets the tone mapping coefficients to their default value, which produces the same result as lighting in the normalized range [0..1].

Public / Attributes

Ambient


public attribute Ambient → (get,set)

value : float64

The environment map scale factor.

The scale factor to apply to the ambient diffuse lighting term that results from hemispheric sampling of the environment map.

Defaults to 1.

See also

IEnvironmentMap

Directional


public attribute Directional → (get,set)

value : float64

The directional lighting scale factor.

The scale factor to apply to the directional diffuse lighting term that results from the prominent light source of the environment map.

Defaults to 1.

See also

ILightProvider

Exposure


public attribute Exposure → (get,set)

value : float64

The exposure factor.

The exposure scale factor.

Color values are scaled by the exposure scale factor before applying the tone mapping:

colorHdr := input HDR color from physically-based rendering / image-based lighting
colorLdr := output LDR color for display

colorLdr = ToneMap(color * Exposure)

Defaults to 1.

Occlusion


public attribute Occlusion → (get,set)

value : float64

The scale factor:
= 0 : full ambient lighting, without ambient occlusion
< 1 : ambient lighting, modulated with reduced ambient occlusion
= 1 : ambient lighting, modulated with actual ambient occlusion
> 1 : ambient lighting, modulated with exaggerated ambient occlusion

The scale factor for the ambient occlusion terms.

Defaults to 1.