]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/pbrmaterial.h
Implement ambient lighting in the Cook-Torrance shader
[libs/gl.git] / source / materials / pbrmaterial.h
index 00e5e1babc64ded6c83b1ff894f0f5a78a0e672b..7c0d545936db21b5464c20bf60512f3566b94ae2 100644 (file)
@@ -6,6 +6,8 @@
 namespace Msp {
 namespace GL {
 
+class Texture2D;
+
 class PbrMaterial: public Material
 {
 public:
@@ -29,13 +31,16 @@ private:
        Property<float> roughness;
        Property<float> occlusion;
        Property<Color> 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<std::string, int> &) const;
 
@@ -55,7 +60,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