X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Fmaterial.h;h=3210c96612fcfc2739d7fb99134f086c0c3761f9;hb=HEAD;hp=ff7f53c0d3ffdb23acf15f55c649f6aacaa1708d;hpb=190a7e11237351f6b730c28f7b16f183e8adc69c;p=libs%2Fgl.git diff --git a/source/materials/material.h b/source/materials/material.h index ff7f53c0..3210c966 100644 --- a/source/materials/material.h +++ b/source/materials/material.h @@ -27,6 +27,8 @@ private: virtual void init_actions(); private: + void alpha_cutoff(float); + void alpha_cutoff_feather(float, float); void sampler(const std::string &); }; @@ -72,9 +74,11 @@ public: protected: const Sampler *sampler = 0; + float alpha_cutoff = 0.0f; + float alpha_feather = 1.0f; ProgramData shdata; - Material() = default; + Material(); public: virtual ~Material() = default; @@ -96,6 +100,11 @@ public: virtual const Texture *get_texture(Tag) const = 0; virtual const Sampler *get_sampler(Tag) const { return sampler; } + 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 &); template