mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 09:35:39 +00:00
Changed the color channel mix for grayscale conversions.
This commit is contained in:
parent
468d7aa09d
commit
59d5e1b5b8
|
@ -75,9 +75,9 @@ void main()
|
|||
vec3 grayscale;
|
||||
// Premultiplied textures are all in BGRA format.
|
||||
if (0x0u != (shaderFlags & 0x01u))
|
||||
grayscale = vec3(dot(sampledColor.bgr, vec3(0.0721, 0.7154, 0.2125)));
|
||||
grayscale = vec3(dot(sampledColor.bgr, vec3(0.114, 0.587, 0.299)));
|
||||
else
|
||||
grayscale = vec3(dot(sampledColor.rgb, vec3(0.2125, 0.7154, 0.0721)));
|
||||
grayscale = vec3(dot(sampledColor.rgb, vec3(0.299, 0.587, 0.114)));
|
||||
vec3 blendedColor = mix(grayscale, sampledColor.rgb, saturation);
|
||||
sampledColor = vec4(blendedColor, sampledColor.a);
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ void main()
|
|||
// Saturation.
|
||||
if (saturation != 1.0) {
|
||||
vec3 grayscale;
|
||||
grayscale = vec3(dot(colorTemp.bgr, vec3(0.0721, 0.7154, 0.2125)));
|
||||
grayscale = vec3(dot(colorTemp.bgr, vec3(0.114, 0.587, 0.299)));
|
||||
vec3 blendedColor = mix(grayscale, colorTemp.rgb, saturation);
|
||||
colorTemp = vec4(blendedColor, colorTemp.a);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue