From: Steinar H. Gunderson Date: Sun, 4 Oct 2015 00:43:02 +0000 (+0200) Subject: Some small cleanups after we got rid of GLSL 1.10; we can now unify 1.30 and ES 3... X-Git-Tag: 1.3.0~39 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=865a82f44545fa48a67eda605a18315d6ea15cfd Some small cleanups after we got rid of GLSL 1.10; we can now unify 1.30 and ES 3.00 some places. --- diff --git a/effect_chain.cpp b/effect_chain.cpp index 751a6be..af0710e 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -391,7 +391,7 @@ void EffectChain::compile_glsl_program(Phase *phase) frag_shader_header += "#define YCBCR_ALSO_OUTPUT_RGBA 1\n"; } } - frag_shader.append(read_version_dependent_file("footer", "frag")); + frag_shader.append(read_file("footer.frag")); // Collect uniforms from all effects and output them. Note that this needs // to happen after output_fragment_shader(), even though the uniforms come diff --git a/footer.300es.frag b/footer.300es.frag deleted file mode 100644 index 04c8e7c..0000000 --- a/footer.300es.frag +++ /dev/null @@ -1,40 +0,0 @@ -#if YCBCR_OUTPUT_PLANAR -out vec4 Y; -out vec4 Cb; -out vec4 Cr; -#elif YCBCR_OUTPUT_SPLIT_Y_AND_CBCR -out vec4 Y; -out vec4 Chroma; -#else -out vec4 FragColor; -#endif - -#if YCBCR_ALSO_OUTPUT_RGBA -out vec4 RGBA; -#endif - -void main() -{ -#if YCBCR_ALSO_OUTPUT_RGBA - vec4 color[2] = INPUT(tc); - vec4 color0 = color[0]; - vec4 color1 = color[1]; -#else - vec4 color0 = INPUT(tc); -#endif - -#if YCBCR_OUTPUT_PLANAR - Y = color0.rrra; - Cb = color0.ggga; - Cr = color0.bbba; -#elif YCBCR_OUTPUT_SPLIT_Y_AND_CBCR - Y = color0.rrra; - Chroma = color0.gbba; -#else - FragColor = color0; -#endif - -#if YCBCR_ALSO_OUTPUT_RGBA - RGBA = color1; -#endif -} diff --git a/footer.130.frag b/footer.frag similarity index 100% rename from footer.130.frag rename to footer.frag diff --git a/texture1d.frag b/texture1d.frag deleted file mode 100644 index addf900..0000000 --- a/texture1d.frag +++ /dev/null @@ -1,11 +0,0 @@ -#ifdef GL_ES -precision highp float; -#endif - -uniform sampler2D tex; -varying vec2 tc; - -void main() -{ - gl_FragColor = texture2D(tex, tc); // Second component is irrelevant. -}