summaryrefslogtreecommitdiffstats
path: root/video/out/gl_video_shaders.glsl
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-03 17:12:04 +0100
committerwm4 <wm4@nowhere>2015-02-03 17:19:34 +0100
commit98828886d40258a410250b09ef3059c77562651e (patch)
tree8cfd469e30664d414a06b58691140d68c97fb93d /video/out/gl_video_shaders.glsl
parentf296dcb248625d6e5979eae1e683b5f4522896f9 (diff)
downloadmpv-98828886d40258a410250b09ef3059c77562651e.tar.bz2
mpv-98828886d40258a410250b09ef3059c77562651e.tar.xz
vo_opengl: change initialization of gamma option
Make the lazy gamma initialization less weird, and make the default value of the "gamma" sub-option 1.0. This means --vo=opengl:help will list the actual default value. Also change the lower bound to 0.1 - avoids a division by zero (I don't know how shaders handle NaN, but it's probably not a good idea to give them this value).
Diffstat (limited to 'video/out/gl_video_shaders.glsl')
-rw-r--r--video/out/gl_video_shaders.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/gl_video_shaders.glsl b/video/out/gl_video_shaders.glsl
index 032248516d..a7348a47e7 100644
--- a/video/out/gl_video_shaders.glsl
+++ b/video/out/gl_video_shaders.glsl
@@ -493,7 +493,7 @@ void main() {
// TODO: Desaturate colorimetrically; this happens automatically for
// 3dlut targets but not for sRGB mode. Not sure if this is a requirement.
color = clamp(color, 0.0, 1.0);
-#ifdef USE_GAMMA_POW
+#ifdef USE_INV_GAMMA
// User-defined gamma correction factor (via the gamma sub-option)
color = pow(color, vec3(inv_gamma));
#endif