Class HableCurve
An implementation of Hable's artist-friendly tonemapping curve. http://filmicworlds.com/blog/filmic-tonemapping-with-piecewise-power-curves/
Namespace: UnityEngine.Rendering
Syntax
public class HableCurve : object
Constructors
HableCurve()
Creates a new curve.
Declaration
public HableCurve()
Fields
segments
The three segments of the curve.
Declaration
public readonly HableCurve.Segment[] segments
Field Value
Type | Description |
---|---|
HableCurve.Segment[] |
uniforms
An instance of the HableCurve.Uniforms utility class for this curve.
Declaration
public readonly HableCurve.Uniforms uniforms
Field Value
Type | Description |
---|---|
HableCurve.Uniforms |
Properties
inverseWhitePoint
The inverse of the white point.
Declaration
public float inverseWhitePoint { get; }
Property Value
Type | Description |
---|---|
Single |
See Also
whitePoint
The white point.
Declaration
public float whitePoint { get; }
Property Value
Type | Description |
---|---|
Single |
x0
The start of the linear section (middle segment of the curve).
Declaration
public float x0 { get; }
Property Value
Type | Description |
---|---|
Single |
x1
The end of the linear section (middle segment of the curve).
Declaration
public float x1 { get; }
Property Value
Type | Description |
---|---|
Single |
Methods
Eval(Single)
Evaluates a point on the curve.
Declaration
public float Eval(float x)
Parameters
Type | Name | Description |
---|---|---|
Single | x |
Returns
Type | Description |
---|---|
Single |
Init(Single, Single, Single, Single, Single, Single)
Initializes the curve.
Declaration
public void Init(float toeStrength, float toeLength, float shoulderStrength, float shoulderLength, float shoulderAngle, float gamma)
Parameters
Type | Name | Description |
---|---|---|
Single | toeStrength | The strength of the transition between the curve's toe and the curve's mid-section. A value of 0 results in no transition and a value of 1 results in a very hard transition. |
Single | toeLength | The length of the curve's toe. Higher values result in longer toes and therefore contain more of the dynamic range. |
Single | shoulderStrength | The strength of the transition between the curve's midsection and the curve's shoulder. A value of 0 results in no transition and a value of 1 results in a very hard transition. |
Single | shoulderLength | The amount of f-stops to add to the dynamic range of the curve. This is how much of the highlights that the curve takes into account. |
Single | shoulderAngle | How much overshoot to add to the curve's shoulder. |
Single | gamma | A gamma correction to the entire curve. |