Class AutoExposure
Updates the exposure each frame to adapt it to the average frame luminance.
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public class AutoExposure
Constructors
AutoExposure()
Initializes a new instance of the AutoExposure class.
Declaration
public AutoExposure()
Fields
ComputeCommandQueue
Command queue.
Declaration
protected CommandQueue ComputeCommandQueue
Field Value
| Type | Description |
|---|---|
| CommandQueue |
GenerateHistogram
Generates the luminance histogram of an image.
Declaration
protected Histogram GenerateHistogram
Field Value
| Type | Description |
|---|---|
| Histogram |
HistogramZeroValues
Resets the histogram buffer.
Declaration
protected uint[] HistogramZeroValues
Field Value
| Type | Description |
|---|---|
| uint[] |
LogLuminanceRange
Gets or sets the logarithmic luminance range (Default 12.0f).
Declaration
public float LogLuminanceRange
Field Value
| Type | Description |
|---|---|
| float |
LuminanceAverage
Gets the luminance average from the luminance histogram.
Declaration
protected LuminanceAvg LuminanceAverage
Field Value
| Type | Description |
|---|---|
| LuminanceAvg |
LuminanceAvgBuffer
Buffer with a luminance average value. (size: 1 float).
Declaration
protected Buffer LuminanceAvgBuffer
Field Value
| Type | Description |
|---|---|
| Buffer |
LuminanceHistogramBuffer
Buffer with luminance histogram (size: 256 uints).
Declaration
protected Buffer LuminanceHistogramBuffer
Field Value
| Type | Description |
|---|---|
| Buffer |
MinLogLuminance
Gets or sets the minimum logarithmic luminance (default is -10).
Declaration
public float MinLogLuminance
Field Value
| Type | Description |
|---|---|
| float |
StagingLuminanceAvgBuffer
Staging buffer to read the luminance average value.
Declaration
protected Buffer StagingLuminanceAvgBuffer
Field Value
| Type | Description |
|---|---|
| Buffer |
TAU
Gets or sets the TAU. (Default is 1.1).
Declaration
public float TAU
Field Value
| Type | Description |
|---|---|
| float |
TimeDelta
Gets or sets the time delta with the previous frame (Default 1/60).
Declaration
public float TimeDelta
Field Value
| Type | Description |
|---|---|
| float |
Methods
Dispose()
Disposes all reserved resources.
Declaration
public void Dispose()
ProcessFrame(Texture, Camera, float)
Processes and returns the luminance average of the frame.
Declaration
public void ProcessFrame(Texture frame, Camera camera, float timeDelta)
Parameters
| Type | Name | Description |
|---|---|---|
| Texture | frame | Current frame. |
| Camera | camera | Current camera. |
| float | timeDelta | Delta time from the previous frame. |