// The D65 white point. Given in both Rec. 601 and 709.
double d65_x = 0.3127, d65_y = 0.3290;
-ColorSpaceConversionEffect::ColorSpaceConversionEffect()
+ColorspaceConversionEffect::ColorspaceConversionEffect()
: source_space(COLORSPACE_sRGB),
destination_space(COLORSPACE_sRGB)
{
register_int("destination_space", (int *)&destination_space);
}
-void get_xyz_matrix(ColorSpace space, Matrix3x3 m)
+void get_xyz_matrix(Colorspace space, Matrix3x3 m)
{
if (space == COLORSPACE_XYZ) {
m[0] = 1.0f; m[3] = 0.0f; m[6] = 0.0f;
// Some algebraic fiddling yields (unsurprisingly):
//
// X_R = (x_R / y_R) Y_R
- // Z_R = (z_R / y_R) Z_R
+ // Z_R = (z_R / y_R) Y_R
//
// We also know that since RGB=(1,1,1) should give us the
// D65 illuminant, we must have
m[2] = Z_R; m[5] = Z_G; m[8] = Z_B;
}
-std::string ColorSpaceConversionEffect::output_fragment_shader()
+std::string ColorspaceConversionEffect::output_fragment_shader()
{
// Create a matrix to convert from source space -> XYZ,
// another matrix to convert from XYZ -> destination space,