filters/color-grading: Use explicit matrix initializer for GLSL support

Fixes #510
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2021-04-22 11:58:20 +02:00
parent 3533a86b96
commit 7e1c2ca80d

View file

@ -75,11 +75,11 @@ float3 grade_tint(float3 v) {
} else if (pTintDetection == TINT_DETECTION_HSL) { // HSL } else if (pTintDetection == TINT_DETECTION_HSL) { // HSL
value = RGBtoHSL(v).z; value = RGBtoHSL(v).z;
} else if (pTintDetection == TINT_DETECTION_YUV_SDR) { // YUV HD SDR } else if (pTintDetection == TINT_DETECTION_YUV_SDR) { // YUV HD SDR
const float3x3 mYUV709n = { // Normalized const float3x3 mYUV709n = float3x3( // Normalized
0.2126, 0.7152, 0.0722, 0.2126, 0.7152, 0.0722,
-0.1145721060573399, -0.3854278939426601, 0.5, -0.1145721060573399, -0.3854278939426601, 0.5,
0.5, -0.4541529083058166, -0.0458470916941834 0.5, -0.4541529083058166, -0.0458470916941834
}; );
value = RGBtoYUV(v, mYUV709n).r; value = RGBtoYUV(v, mYUV709n).r;
} }
@ -110,8 +110,6 @@ float3 grade_colorcorrection(float3 v) {
v1.g *= pCorrection.g; // Saturation Multiplier v1.g *= pCorrection.g; // Saturation Multiplier
v1.b *= pCorrection.b; // Lightness Multiplier v1.b *= pCorrection.b; // Lightness Multiplier
float3 v2 = HSVtoRGB(v1); float3 v2 = HSVtoRGB(v1);
return v2; return v2;
}; };