]> git.sesse.net Git - casparcg/blobdiff - accelerator/ogl/image/blending_glsl.h
#174 Fixed bug in the contrast/saturation/brightness code where the wrong luma coeffi...
[casparcg] / accelerator / ogl / image / blending_glsl.h
index 42e95f37f83a9775a76369955d587ce49dc3c459..2dc65f4ccf69b1ecff6704b48019d7084245dbd5 100644 (file)
@@ -36,7 +36,9 @@ static std::string get_adjustement_glsl()
                                const float AvgLumG = 0.5;
                                const float AvgLumB = 0.5;
 
-                               const vec3 LumCoeff = vec3(0.2125, 0.7154, 0.0721);
+                               vec3 LumCoeff = is_hd
+                                               ? vec3(0.0722, 0.7152, 0.2126)
+                                               : vec3(0.114, 0.587, 0.299);
 
                                vec3 AvgLumin = vec3(AvgLumR, AvgLumG, AvgLumB);
                                vec3 brtColor = color * brt;