]> git.sesse.net Git - movit/blobdiff - dither_effect.cpp
Make a pow() call unambiguous.
[movit] / dither_effect.cpp
index 62355b248fc406db1980e9ec76f9bde7afdd92ba..6e1ddd8d8ed4b7451698fd0b9d70382560bf0c52 100644 (file)
@@ -1,5 +1,6 @@
 #include <GL/glew.h>
 #include <assert.h>
+#include <stdio.h>
 #include <algorithm>
 
 #include "dither_effect.h"
@@ -44,7 +45,7 @@ DitherEffect::~DitherEffect()
 string DitherEffect::output_fragment_shader()
 {
        char buf[256];
-       sprintf(buf, "#define NEED_EXPLICIT_ROUND %d\n", (movit_num_wrongly_rounded > 0));
+       sprintf(buf, "#define NEED_EXPLICIT_ROUND %d\n", (movit_num_wrongly_rounded > 0 && movit_shader_rounding_supported));
        return buf + read_file("dither_effect.frag");
 }