Struct TonemapSettings ​
Namespace: ValveResourceFormat.Renderer.SceneEnvironment
Assembly: Renderer.dll
Filmic tonemapping curve parameters for HDR-to-LDR conversion.
public readonly struct TonemapSettingsConstructors ​
TonemapSettings() ​
Initializes a new with default filmic curve values.
public TonemapSettings()TonemapSettings(KVObject) ​
Initializes a new by reading values from a KV object.
public TonemapSettings(KVObject tonemapParams)Parameters ​
tonemapParams KVObject
The KV object containing tonemapping parameters.
Properties ​
ExposureBias ​
Gets the exposure bias in log2 stops; converted to linear via exp2 before GPU upload.
public float ExposureBias { get; init; }Property Value ​
LinearAngle ​
Gets the linear section angle of the tonemapping curve.
public float LinearAngle { get; init; }Property Value ​
LinearStrength ​
Gets the linear section strength of the tonemapping curve.
public float LinearStrength { get; init; }Property Value ​
ShoulderStrength ​
Gets the shoulder strength of the Uncharted 2 tonemapping curve.
public float ShoulderStrength { get; init; }Property Value ​
ToeDenom ​
Gets the toe denominator of the tonemapping curve.
public float ToeDenom { get; init; }Property Value ​
ToeNum ​
Gets the toe numerator of the tonemapping curve.
public float ToeNum { get; init; }Property Value ​
ToeStrength ​
Gets the toe strength of the tonemapping curve.
public float ToeStrength { get; init; }Property Value ​
WhitePoint ​
Gets the white point value; passed through the tonemapper before GPU upload.
public float WhitePoint { get; init; }Property Value ​
Methods ​
ApplyTonemapping(float) ​
Applies the Uncharted 2 filmic tonemapping curve to a single input value.
public float ApplyTonemapping(float inputValue)Parameters ​
inputValue float
The linear HDR value to tonemap.
Returns ​
The tonemapped LDR output value.
BlendTonemapSettings(float, TonemapSettings, TonemapSettings) ​
Linearly interpolates between two by a given weight.
public static TonemapSettings BlendTonemapSettings(float weight, TonemapSettings TonemapSettings1, TonemapSettings TonemapSettings2)Parameters ​
weight float
Blend factor in the range [0, 1]; 0 returns TonemapSettings1, 1 returns TonemapSettings2.
TonemapSettings1 TonemapSettings
The first (start) tonemapping settings.
TonemapSettings2 TonemapSettings
The second (end) tonemapping settings.
Returns ​
A new whose fields are component-wise lerped between the two inputs.
Linear() ​
Returns a configured for linear (passthrough) tonemapping.
public static TonemapSettings Linear()
