1 #ifndef MSP_GL_PBRMATERIAL_H_
2 #define MSP_GL_PBRMATERIAL_H_
11 class PbrMaterial: public Material
14 class Loader: public DataFile::DerivedObjectLoader<PbrMaterial, Material::PropertyLoader<PbrMaterial> >
17 static ActionMap shared_actions;
20 Loader(PbrMaterial &);
21 Loader(PbrMaterial &, Collection &);
24 virtual void init_actions();
28 Property<Color> base_color;
29 Property<Vector3> normal;
30 Property<float> metalness;
31 Property<float> roughness;
32 Property<float> occlusion;
33 Property<Color> emission;
34 const Texture2D &fresnel_lookup;
36 static const Tag texture_tags[];
42 static const Texture2D &get_or_create_fresnel_lookup();
45 virtual void fill_program_info(std::string &, std::map<std::string, int> &) const;
48 virtual const Tag *get_texture_tags() const { return texture_tags; }
49 virtual const Texture *get_texture(Tag) const;
51 void set_base_color(const Color &);
52 void set_base_color_map(const Texture *);
53 void set_normal_map(const Texture *);
54 void set_metalness(float);
55 void set_metalness_map(const Texture *);
56 void set_roughness(float);
57 void set_roughness_map(const Texture *);
58 void set_occlusion_map(const Texture *);
59 void set_emission(const Color &);
60 void set_emission_map(const Texture *);