mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
gsk: Make shader matrices match
We were using slightly different numbers here, which isn't good. The matrices in gdkcolordefs.h are tested in the colorstate-internal tests, so they are at least properly inverse, and the products match. It would be better to generate the glsl definitions, somehow.
This commit is contained in:
parent
8d87ed1a6a
commit
d8775d0194
@ -99,15 +99,15 @@ pq_oetf (float v)
|
||||
/* Note that these matrices are transposed from the C version */
|
||||
|
||||
const mat3 srgb_from_rec2020 = mat3(
|
||||
1.659944, -0.124350, -0.018466,
|
||||
-0.588220, 1.132559, -0.102459,
|
||||
-0.071724, -0.008210, 1.120924
|
||||
1.660227, -0.124553, -0.018155,
|
||||
-0.587548, 1.132926, -0.100603,
|
||||
-0.072838, -0.008350, 1.118998
|
||||
);
|
||||
|
||||
const mat3 rec2020_from_srgb = mat3(
|
||||
0.627610, 0.069029, 0.016649,
|
||||
0.329815, 0.919817, 0.089510,
|
||||
0.042574, 0.011154, 0.893842
|
||||
0.627504, 0.069108, 0.016394,
|
||||
0.329275, 0.919519, 0.088011,
|
||||
0.043303, 0.011360, 0.895380
|
||||
);
|
||||
|
||||
vec3
|
||||
|
@ -31,21 +31,21 @@ const mat3 identity = mat3(
|
||||
);
|
||||
|
||||
const mat3 srgb_to_xyz = mat3(
|
||||
0.4125288, 0.2127102, 0.0193373,
|
||||
0.3581642, 0.7163284, 0.1193881,
|
||||
0.1774037, 0.0709615, 0.9343260
|
||||
0.4124564, 0.2126729, 0.0193339,
|
||||
0.3575761, 0.7151522, 0.1191920,
|
||||
0.1804375, 0.0721750, 0.9503041
|
||||
);
|
||||
|
||||
const mat3 xyz_to_srgb = mat3(
|
||||
3.2409699, -0.9692436, 0.0556301,
|
||||
-1.5373832, 1.8759675, -0.2039770,
|
||||
-0.4986108, 0.0415551, 1.0569715
|
||||
3.2404542, -0.9692660, 0.0556434,
|
||||
-1.5371385, 1.8760108, -0.2040259,
|
||||
-0.4985314, 0.0415560, 1.0572252
|
||||
);
|
||||
|
||||
const mat3 rec2020_to_xyz = mat3(
|
||||
0.6369615, 0.2627016, 0.0000000,
|
||||
0.1448079, 0.6788934, 0.0281098,
|
||||
0.1663273, 0.0584050, 1.0449416
|
||||
0.6369580, 0.2627002, 0.0000000,
|
||||
0.1446169, 0.6779981, 0.0280727,
|
||||
0.1688810, 0.0593017, 1.0609851
|
||||
);
|
||||
|
||||
const mat3 xyz_to_rec2020 = mat3(
|
||||
|
Loading…
Reference in New Issue
Block a user