Struct ColorCorrection
- Namespace
- OmegaEngine.Foundation.Light
- Assembly
- OmegaEngine.Foundation.dll
Color correction values for use in post-processing.
[TypeConverter(typeof(ColorCorrectionConverter))]
public struct ColorCorrection : IEquatable<ColorCorrection>
- Implements
- Inherited Members
- Extension Methods
Constructors
ColorCorrection(float, float, float, float)
Creates a new color correction structure.
public ColorCorrection(float brightness = 1, float contrast = 1, float saturation = 1, float hue = 0)
Parameters
brightness
floatHow bright the picture should be - values between 0 (black) and 5 (5x normal).
contrast
floatThe contrast level of the picture - values between -5 and 5.
saturation
floatThe color saturation level of the picture - values between -5 and 5.
hue
floatThe color hue rotation of the picture - values between 0 and 360.
Fields
Default
No color change.
public static readonly ColorCorrection Default
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
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
Equals(ColorCorrection)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ColorCorrection other)
Parameters
other
ColorCorrectionAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
SinusInterpolate(float, params ColorCorrection[])
Performs smooth (sinus-based) interpolation between two or more value sets.
[Pure]
public static ColorCorrection SinusInterpolate(float factor, params ColorCorrection[] values)
Parameters
factor
floatA factor between 0 and
values
.Length.values
ColorCorrection[]The value checkpoints.
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(ColorCorrection, ColorCorrection)
public static bool operator ==(ColorCorrection left, ColorCorrection right)
Parameters
left
ColorCorrectionright
ColorCorrection
Returns
explicit operator Vector4(ColorCorrection)
Convert ColorCorrection into SlimDX.Vector4
public static explicit operator Vector4(ColorCorrection correction)
Parameters
correction
ColorCorrection
Returns
- Vector4
explicit operator ColorCorrection(Vector4)
Convert SlimDX.Vector4 into see ColorCorrection
public static explicit operator ColorCorrection(Vector4 vector)
Parameters
vector
Vector4
Returns
operator !=(ColorCorrection, ColorCorrection)
public static bool operator !=(ColorCorrection left, ColorCorrection right)
Parameters
left
ColorCorrectionright
ColorCorrection