Table of Contents

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 float

How bright the picture should be - values between 0 (black) and 5 (5x normal).

contrast float

The contrast level of the picture - values between -5 and 5.

saturation float

The color saturation level of the picture - values between -5 and 5.

hue float

The color hue rotation of the picture - values between 0 and 360.

Fields

Default

No color change.

public static readonly ColorCorrection Default

Field Value

ColorCorrection

Properties

Brightness

How bright the picture should be - values between 0 (black) and 5 (5x normal).

public float Brightness { get; set; }

Property Value

float

Contrast

The contrast level of the picture - values between -5 and 5.

public float Contrast { get; set; }

Property Value

float

Hue

The color hue rotation of the picture - values between 0 and 360.

public float Hue { get; set; }

Property Value

float

Saturation

The color saturation level of the picture - values between -5 and 5.

public float Saturation { get; set; }

Property Value

float

Methods

Equals(ColorCorrection)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ColorCorrection other)

Parameters

other ColorCorrection

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The 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 float

A factor between 0 and values.Length.

values ColorCorrection[]

The value checkpoints.

Returns

ColorCorrection

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 ColorCorrection
right ColorCorrection

Returns

bool

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

ColorCorrection

operator !=(ColorCorrection, ColorCorrection)

public static bool operator !=(ColorCorrection left, ColorCorrection right)

Parameters

left ColorCorrection
right ColorCorrection

Returns

bool