X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Fpbrmaterial.h;h=0204451b63efa0b595f39552e374da2648d819c7;hb=e92de029768eef5f0fd744329e589161b46d0762;hp=3e9b26ade8d525aff7b08c4d399d34f36e5d8f0c;hpb=cb7db94f7837e6a3be037d07575dc248177d9426;p=libs%2Fgl.git diff --git a/source/materials/pbrmaterial.h b/source/materials/pbrmaterial.h index 3e9b26ad..0204451b 100644 --- a/source/materials/pbrmaterial.h +++ b/source/materials/pbrmaterial.h @@ -6,6 +6,8 @@ namespace Msp { namespace GL { +class Texture2D; + class PbrMaterial: public Material { public: @@ -29,20 +31,24 @@ private: Property roughness; Property occlusion; Property emission; + const Texture2D &fresnel_lookup; + const Sampler &fresnel_sampler; static const Tag texture_tags[]; public: PbrMaterial(); +private: + static const Texture2D &get_or_create_fresnel_lookup(); + protected: virtual void fill_program_info(std::string &, std::map &) const; public: - DEPRECATED virtual void attach_textures_to(Texturing &, ProgramData &) const; - virtual const Tag *get_texture_tags() const { return texture_tags; } virtual const Texture *get_texture(Tag) const; + virtual const Sampler *get_sampler(Tag) const; void set_base_color(const Color &); void set_base_color_map(const Texture *);