Class PostColorCorrectionShader
- Namespace
- OmegaEngine.Graphics.Shaders
- Assembly
- OmegaEngine.dll
A post-screen shader for applying TV-like settings like brightness, contrast, hue, gamma, etc.
public class PostColorCorrectionShader : PostShader, IDisposable
- Inheritance
-
objectPostColorCorrectionShader
- Implements
- Inherited Members
Fields
DefaultGamma
The value for Gamma that leaves the image unchanged.
public const float DefaultGamma = 2.2
Field Value
Properties
Brightness
How bright the picture should be - values between 0 (black) and 5 (5x normal)
public float Brightness { get; set; }
Property Value
Contrast
The contrast level of the picture - values between -5 and 5
public float Contrast { get; set; }
Property Value
Gamma
The gamma of the display the image is shown on
public float Gamma { get; set; }
Property Value
Remarks
The engine already gamma-encodes its output for a standard sRGB display (gamma 2.2). Other values re-target the image for a different gamma: higher values brighten the mid-tones, lower values darken them.
Hue
The color hue rotation of the picture - values between 0 and 360
public float Hue { get; set; }
Property Value
Saturation
The color saturation level of the picture - values between -5 and 5
public float Saturation { get; set; }
Property Value
Methods
OnEngineSet()
Hook that is called when Engine is set for the first time.
protected override void OnEngineSet()
SetParameters(ColorCorrection)
Sets multiple color correction parameters in one goe.
public void SetParameters(ColorCorrection correction)
Parameters
correctionColorCorrection