summaryrefslogtreecommitdiffstats
path: root/video/out/gl_video_shaders.glsl
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2015-01-07 08:25:22 +0100
committerwm4 <wm4@nowhere>2015-01-07 14:22:17 +0100
commitd66598eeed10175b946fda8c76712714f578bb56 (patch)
tree2241625d869f4e54c46b36fe69849896b4ae9382 /video/out/gl_video_shaders.glsl
parenta0959582631118078cd39695d023678ff4bfe9f8 (diff)
downloadmpv-d66598eeed10175b946fda8c76712714f578bb56.tar.bz2
mpv-d66598eeed10175b946fda8c76712714f578bb56.tar.xz
video: Remove some stale CMS code, minor cosmetics
This removes an old code path that was disabled in 016bb14.
Diffstat (limited to 'video/out/gl_video_shaders.glsl')
-rw-r--r--video/out/gl_video_shaders.glsl12
1 files changed, 4 insertions, 8 deletions
diff --git a/video/out/gl_video_shaders.glsl b/video/out/gl_video_shaders.glsl
index 1549539d2c..2f5940c26f 100644
--- a/video/out/gl_video_shaders.glsl
+++ b/video/out/gl_video_shaders.glsl
@@ -453,14 +453,10 @@ void main() {
// Adapt and compand from the linear BT2020 source to the sRGB output
color = srgb_compand(color);
#endif
- // If none of these options took care of companding again, we have to do
- // it manually here for the previously-expanded channels. This again
- // comes in two flavours, one for the approximate gamma system and one
- // for the actual gamma system.
-#ifdef USE_CONST_LUMA_INV_APPROX
- color = pow(color, vec3(1.0/1.95));
-#endif
-#ifdef USE_CONST_LUMA_INV_BT2020
+ // If none of these options took care of companding again (ie. CMS is
+ // disabled), we still need to re-compand const luma signals, because
+ // they always come out as linear light (and we can't simply output that).
+#ifdef USE_CONST_LUMA_INV
color = bt2020_compand(color);
#endif
#ifdef USE_DITHER