X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fmaterials%2Fpbrmaterial.cpp;fp=source%2Fmaterials%2Fpbrmaterial.cpp;h=c5d849c1cfcc6030a5caa5ff430907db439d9462;hp=ebd3321f2268a05054c05f086c035e5b88fdb39a;hb=7a5d84b06d0217c5edad5d9f4ef51404de0cb911;hpb=60f288b3a6b5753702ed2b2c035f29778ae0b7d0 diff --git a/source/materials/pbrmaterial.cpp b/source/materials/pbrmaterial.cpp index ebd3321f..c5d849c1 100644 --- a/source/materials/pbrmaterial.cpp +++ b/source/materials/pbrmaterial.cpp @@ -116,6 +116,12 @@ void PbrMaterial::set_base_color_map(const Texture *tex) base_color.texture = tex; } +void PbrMaterial::set_tint(const Color &color) +{ + tint.value = color; + shdata.uniform("pbr_material.tint", color); +} + void PbrMaterial::set_normal_map(const Texture *tex) { normal.texture = tex; @@ -177,6 +183,7 @@ void PbrMaterial::Loader::init_actions() add_property("roughness", &PbrMaterial::set_roughness, &PbrMaterial::set_roughness_map); add_property("occlusion", &PbrMaterial::set_occlusion_map); add_property("emission", &PbrMaterial::set_emission, &PbrMaterial::set_emission_map, false); + add_property("tint", &PbrMaterial::set_tint, 0, true); } } // namespace GL