Anaglyph |
public class AnaglyphColorTransformation
The AnaglyphVirtualRealityProviderAnaglyphColorTransformation type exposes the following members.
Name | Description | |
---|---|---|
AnaglyphVirtualRealityProviderAnaglyphColorTransformation(Matrix3x3, Matrix3x3) | Constructor without specified gamma values | |
AnaglyphVirtualRealityProviderAnaglyphColorTransformation(Matrix3x3, Matrix3x3, Color3) | Constructor with specified gamma values |
Name | Description | |
---|---|---|
Gamma | Color3 that specifies gamma correction values for red, green and blue colors. 1.0f means no gamma correction. | |
LeftEyeMatrix | Matrix3x3 for colors rendered for left eye | |
RightEyeMatrix | Matrix3x3 for colors rendered for right eye |
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.