--- /dev/null
+#ifndef MSP_GL_PBRMATERIAL_H_
+#define MSP_GL_PBRMATERIAL_H_
+
+#include "material.h"
+
+namespace Msp {
+namespace GL {
+
+class PbrMaterial: public Material
+{
+public:
+ class Loader: public DataFile::DerivedObjectLoader<PbrMaterial, Material::LoaderBase<PbrMaterial> >
+ {
+ private:
+ static ActionMap shared_actions;
+
+ public:
+ Loader(PbrMaterial &);
+ Loader(PbrMaterial &, Collection &);
+
+ private:
+ virtual void init_actions();
+ };
+
+private:
+ Property<Color> base_color;
+ Property<Vector3> normal;
+ Property<float> metalness;
+ Property<float> roughness;
+ Property<float> occlusion;
+ Property<Color> emission;
+ bool receive_shadows;
+
+public:
+ PbrMaterial();
+
+protected:
+ virtual std::string create_program_source() const;
+
+public:
+ virtual void attach_textures_to(Texturing &, ProgramData &) const;
+
+ void set_base_color(const Color &);
+ void set_base_color_map(const Texture *);
+ void set_normal_map(const Texture *);
+ void set_metalness(float);
+ void set_metalness_map(const Texture *);
+ void set_roughness(float);
+ void set_roughness_map(const Texture *);
+ void set_occlusion_map(const Texture *);
+ void set_emission(const Color &);
+ void set_emission_map(const Texture *);
+ void set_receive_shadows(bool);
+};
+
+} // namespace GL
+} // namespace Msp
+
+#endif