]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/material.h
Add support for alpha to coverage
[libs/gl.git] / source / materials / material.h
index 75ff972cd4e1312de7e6d63a74480bf3c3b0409a..3210c96612fcfc2739d7fb99134f086c0c3761f9 100644 (file)
@@ -28,6 +28,7 @@ private:
 
        private:
                void alpha_cutoff(float);
+               void alpha_cutoff_feather(float, float);
                void sampler(const std::string &);
        };
 
@@ -74,6 +75,7 @@ public:
 protected:
        const Sampler *sampler = 0;
        float alpha_cutoff = 0.0f;
+       float alpha_feather = 1.0f;
        ProgramData shdata;
 
        Material();
@@ -98,8 +100,10 @@ public:
        virtual const Texture *get_texture(Tag) const = 0;
        virtual const Sampler *get_sampler(Tag) const { return sampler; }
 
-       void set_alpha_cutoff(float a);
+       void set_alpha_cutoff(float);
+       void set_alpha_feather(float);
        float get_alpha_cutoff() const { return alpha_cutoff; }
+       float get_alpha_feather() const { return alpha_feather; }
 
        void set_debug_name(const std::string &);