3#include "resources/ResourcesManager.hpp"
4#include "system/Codable.hpp"
Represent a surface material, including textures describing the surface parameters.
Definition: Material.hpp:72
virtual ~Material()=default
Material(const Material &)=delete
bool decode(const KeyValues ¶ms, Storage options)
Definition: Material.cpp:41
void addParameter(const glm::vec4 ¶m)
Definition: Material.cpp:131
bool masked() const
Definition: Material.hpp:132
const std::vector< glm::vec4 > & parameters() const
Definition: Material.hpp:116
Material(Material &&)=default
std::vector< const Texture * > _textures
Textures used by the material.
Definition: Material.hpp:181
void addTexture(const Texture *infos)
Definition: Material.cpp:126
Material & operator=(Material &&)=default
Type _material
The material type.
Definition: Material.hpp:184
const std::string & name() const
Definition: Material.hpp:135
std::string _name
The material name.
Definition: Material.hpp:183
Type
Type of shading/effects.
Definition: Material.hpp:76
@ Regular
PBR shading.
Definition: Material.hpp:78
@ Clearcoat
PBR shading with an additional clear coat specular layer.
Definition: Material.hpp:80
@ TransparentIrid
Transparent object with iridescent Fresnel.
Definition: Material.hpp:87
@ Subsurface
PBR shading with subsurface scattering.
Definition: Material.hpp:84
@ Iridescent
PBR shading with iridescent Fresnel.
Definition: Material.hpp:83
@ Sheen
PBR shading with a sheen BRDF.
Definition: Material.hpp:82
@ Parallax
PBR with parallax mapping.
Definition: Material.hpp:79
@ Emissive
Emissive objects (no diffuse shading).
Definition: Material.hpp:85
@ Anisotropic
PBR shading with an anisotropic BRDF.
Definition: Material.hpp:81
@ Transparent
Transparent object.
Definition: Material.hpp:86
@ None
Any type of shading.
Definition: Material.hpp:77
Material & operator=(const Material &)=delete
const Type & type() const
Definition: Material.hpp:122
bool _twoSided
Should faces of objects be visible from the two sides.
Definition: Material.hpp:185
bool _masked
The material uses alpha cutout.
Definition: Material.hpp:186
virtual KeyValues encode() const
Definition: Material.cpp:88
bool twoSided() const
Definition: Material.hpp:127
const std::vector< const Texture * > & textures() const
Definition: Material.hpp:111
std::vector< glm::vec4 > _parameters
Parameters used by the material.
Definition: Material.hpp:182
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12
Storage
Storage and loading options.
Definition: ResourcesManager.hpp:14
Represent a key-values tuple.
Definition: Config.hpp:9