]> git.sesse.net Git - nageru/commitdiff
Fix an issue where you needed to install a .vert file into a Movit directory. Reporte...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 31 Jan 2016 11:18:01 +0000 (12:18 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 31 Jan 2016 11:20:40 +0000 (12:20 +0100)
mixer.cpp
vs-cbcr.130.vert [deleted file]

index 133fc28108a9b50e68e1e7ffa46848313a5e3d65..70e4a9d0ea2170c665d1dcf594e33751a7105447 100644 (file)
--- a/mixer.cpp
+++ b/mixer.cpp
@@ -167,7 +167,26 @@ Mixer::Mixer(const QSurfaceFormat &format, unsigned num_cards)
        // Set up stuff for NV12 conversion.
 
        // Cb/Cr shader.
-       string cbcr_vert_shader = read_file("vs-cbcr.130.vert");
+       string cbcr_vert_shader =
+               "#version 130 \n"
+               " \n"
+               "in vec2 position; \n"
+               "in vec2 texcoord; \n"
+               "out vec2 tc0; \n"
+               "uniform vec2 foo_chroma_offset_0; \n"
+               " \n"
+               "void main() \n"
+               "{ \n"
+               "    // The result of glOrtho(0.0, 1.0, 0.0, 1.0, 0.0, 1.0) is: \n"
+               "    // \n"
+               "    //   2.000  0.000  0.000 -1.000 \n"
+               "    //   0.000  2.000  0.000 -1.000 \n"
+               "    //   0.000  0.000 -2.000 -1.000 \n"
+               "    //   0.000  0.000  0.000  1.000 \n"
+               "    gl_Position = vec4(2.0 * position.x - 1.0, 2.0 * position.y - 1.0, -1.0, 1.0); \n"
+               "    vec2 flipped_tc = texcoord; \n"
+               "    tc0 = flipped_tc + foo_chroma_offset_0; \n"
+               "} \n";
        string cbcr_frag_shader =
                "#version 130 \n"
                "in vec2 tc0; \n"
diff --git a/vs-cbcr.130.vert b/vs-cbcr.130.vert
deleted file mode 100644 (file)
index 3c639ce..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#version 130
-
-in vec2 position;
-in vec2 texcoord;
-out vec2 tc0;
-//out vec2 tc1;
-uniform vec2 foo_chroma_offset_0;
-//uniform vec2 foo_chroma_offset_1;
-
-void main()
-{
-       // The result of glOrtho(0.0, 1.0, 0.0, 1.0, 0.0, 1.0) is:
-       //
-       //   2.000  0.000  0.000 -1.000
-       //   0.000  2.000  0.000 -1.000
-       //   0.000  0.000 -2.000 -1.000
-       //   0.000  0.000  0.000  1.000
-       gl_Position = vec4(2.0 * position.x - 1.0, 2.0 * position.y - 1.0, -1.0, 1.0);
-       vec2 flipped_tc = texcoord;
-//     flipped_tc.y = 1.0 - flipped_tc.y;
-       tc0 = flipped_tc + foo_chroma_offset_0;
-//     tc1 = flipped_tc + foo_chroma_offset_1;
-}