]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/pbrmaterial.h
Remove collection-less constructor overloads from most loaders
[libs/gl.git] / source / materials / pbrmaterial.h
index 00e5e1babc64ded6c83b1ff894f0f5a78a0e672b..9669bc35a3a1086e117c73cc8aa2e2f4d677d315 100644 (file)
@@ -6,6 +6,8 @@
 namespace Msp {
 namespace GL {
 
+class Texture2D;
+
 class PbrMaterial: public Material
 {
 public:
@@ -15,7 +17,6 @@ public:
                static ActionMap shared_actions;
 
        public:
-               Loader(PbrMaterial &);
                Loader(PbrMaterial &, Collection &);
 
        private:
@@ -29,21 +30,24 @@ private:
        Property<float> roughness;
        Property<float> occlusion;
        Property<Color> emission;
-       bool receive_shadows;
+       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<std::string, int> &) 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 *);
@@ -55,7 +59,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