Click or drag to resize
AB4D logo

AnaglyphVirtualRealityProviderAnaglyphColorTransformation Class

AnaglyphColorTransformation class defines the matrices that are used to multiply colors for left and right eye. It also defines the gamma value that is used to apply gamma correction before the matrix multiplication.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXAnaglyphVirtualRealityProviderAnaglyphColorTransformation

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public class AnaglyphColorTransformation

The AnaglyphVirtualRealityProviderAnaglyphColorTransformation type exposes the following members.

Constructors
Fields
 NameDescription
Public fieldGamma Color3 that specifies gamma correction values for red, green and blue colors. 1.0f means no gamma correction.
Public fieldLeftEyeMatrix Matrix3x3 for colors rendered for left eye
Public fieldRightEyeMatrix Matrix3x3 for colors rendered for right eye
Top
Remarks

AnaglyphColorTransformation class defines the matrices that are used to multiply colors for left and right eye. It also defines the gamma value that is used to apply gamma correction before the matrix multiplication.

The meaning behind the number in the matrices is the following:

The rows in the matrix represent the destination color. For example the left eye matrix defined above will output only red color because values are defined only in the first row (RGB means - 1st row = red, 2nd row = green, 3rd row = blue). The second and third row there are 0, 0, 0 - so left eye will not have any green or blue color. The right eye matrix defines values for green and blue colors (green + blue = cyan). So the right eye is best seen with cyan glasses.

The columns in the matrix represent how the source color is used. For example the "0.299f, 0.587f, 0.114f" means that the output color will be get with using 29.9% red, 58.7% green and 11.4% blue

The gamma values can be used to apply a gamma correction before the matrix calculations are applied. This "boost" specific colors. When value 1.0f is used for gamma, then this color will have any gamma correction. When gamma vector is 1, 1, 1 then a simplified and faster pixel shader without gamma correction is used.

See Also