From 6f35fd55bed583d33ef9d935203e38d1a7b9f6b9 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 14 Mar 2011 01:40:30 +0000 Subject: [PATCH] video: make the dithering shader work with GLES2. --- src/video.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/video.cpp b/src/video.cpp index dc9bd201..a36390c2 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -81,12 +81,13 @@ static char const *fragmentshader = "void main()\n" "{\n" #if defined HAVE_GLES_2X - " gl_FragColor = texture2D(in_Texture, pass_TexCoord);\n" - //" gl_FragColor = vec4(0.5, 1.0, 0.0, 0.5);\n" - //" gl_FragColor = vec4(pass_TexCoord * 4.0, 0.0, 0.25);\n" + " vec4 col = texture2D(in_Texture, pass_TexCoord);\n" + //" vec4 col = vec4(0.5, 1.0, 0.0, 0.5);\n" + //" vec4 col = vec4(pass_TexCoord * 4.0, 0.0, 0.25);\n" #else " vec4 col = texture2D(in_Texture, vec2(gl_TexCoord[0]));\n" -#if 0 +#endif +#if 1 " float mul = 2.0;\n" " float dx1 = mod(gl_FragCoord.x, 2.0);\n" " float dy1 = mod(gl_FragCoord.y, 2.0);\n" @@ -109,7 +110,6 @@ static char const *fragmentshader = " col.z = (floor(col.z * mul) + fracz) / mul;\n" #endif " gl_FragColor = col;\n" -#endif "}\n"; #endif