]> git.sesse.net Git - movit/blobdiff - dither_effect.h
Remove stray file movit_pch.h, which was never meant to be checked in.
[movit] / dither_effect.h
index 943220aed55ad3dc524e4404b06ef2838f917831..314390752cebde884f87f8d54db798f33f310cae 100644 (file)
 // like many LCD monitors do, but it starts to get very hairy, again, for limited gains.)
 // The dither is also deterministic across runs.
 
+#include <GL/glew.h>
+#include <string>
+
 #include "effect.h"
 
 class DitherEffect : public Effect {
-public:
+private:
+       // Should not be instantiated by end users;
+       // call EffectChain::set_dither_bits() instead.
        DitherEffect();
+       friend class EffectChain;
+
+public:
        ~DitherEffect();
        virtual std::string effect_type_id() const { return "DitherEffect"; }
        std::string output_fragment_shader();
 
+       // Note that if we did error diffusion, we'd actually want to diffuse the
+       // premultiplied error. However, we need to do dithering in the same
+       // space as quantization, whether that be pre- or postmultiply.
+       virtual AlphaHandling alpha_handling() const { return DONT_CARE_ALPHA_TYPE; }
+
        void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num);
 
 private: