X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Fpbrmaterial.h;h=dadda9b52358c0b029f46971fcf4d2da73d088f1;hb=5b652353d545a3190ea2d86ba82a87b2e3382a0d;hp=a1f736f4bf3af657f938be004de70e621e4c9570;hpb=842c817bb679a5a0abc05e8149e2e6e0ae1a0412;p=libs%2Fgl.git diff --git a/source/materials/pbrmaterial.h b/source/materials/pbrmaterial.h index a1f736f4..dadda9b5 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,16 +31,22 @@ private: Property roughness; Property occlusion; Property emission; - bool receive_shadows; + const Texture2D &fresnel_lookup; + + 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: - 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; void set_base_color(const Color &); void set_base_color_map(const Texture *); @@ -50,7 +58,6 @@ public: void set_occlusion_map(const Texture *); void set_emission(const Color &); void set_emission_map(const Texture *); - void set_receive_shadows(bool); }; } // namespace GL