X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Fpbrmaterial.h;h=e863ca642481a0b64b651c814f537590cbd60ae8;hb=e196a09d1df1e8504ff037d1701b7159c4f04e84;hp=9669bc35a3a1086e117c73cc8aa2e2f4d677d315;hpb=ae45c0397e2cb8f0a01f2f31d01c95ff3870271e;p=libs%2Fgl.git diff --git a/source/materials/pbrmaterial.h b/source/materials/pbrmaterial.h index 9669bc35..e863ca64 100644 --- a/source/materials/pbrmaterial.h +++ b/source/materials/pbrmaterial.h @@ -8,6 +8,15 @@ namespace GL { class Texture2D; +/** +A physically-based material using the Cook-Torrance BRDF. + +The material is characterized by base color, metalness and roughness. Fully +metallic materials have no diffuse reflection and their specular reflection is +tinted by the base color. For fully dielectric materials base color determines +the color of the diffuse reflection; specular reflection is untinted. +Roughness affects how blurry specular reflections are. +*/ class PbrMaterial: public Material { public: @@ -25,6 +34,7 @@ public: private: Property base_color; + Property tint; Property normal; Property metalness; Property roughness; @@ -51,6 +61,7 @@ public: void set_base_color(const Color &); void set_base_color_map(const Texture *); + void set_tint(const Color &); void set_normal_map(const Texture *); void set_metalness(float); void set_metalness_map(const Texture *);