Deprecate set method on MaterialBuilder (#545)

* Remove the defines entry in material definitions

* Deprecate set function

* Remove some getter methods from MaterilaBuilder

* Fix tests, add to CI
This commit is contained in:
Ben Doherty
2018-11-28 15:35:19 -08:00
committed by GitHub
parent 3a677fa832
commit b759074c8f
14 changed files with 168 additions and 246 deletions

View File

@@ -261,25 +261,19 @@ static void setup(Engine* engine, View*, Scene* scene) {
MaterialBuilder builder = MaterialBuilder()
.name("DefaultMaterial")
.set(Property::BASE_COLOR)
.set(Property::METALLIC)
.set(Property::ROUGHNESS)
.material(shader.c_str())
.shading(Shading::LIT);
if (hasNormalMap) {
builder
.require(VertexAttribute::UV0)
.parameter(MaterialBuilder::SamplerType::SAMPLER_2D, "normalMap")
.set(Property::NORMAL);
.parameter(MaterialBuilder::SamplerType::SAMPLER_2D, "normalMap");
}
if (hasClearCoatNormalMap) {
builder
.require(VertexAttribute::UV0)
.parameter(MaterialBuilder::SamplerType::SAMPLER_2D, "clearCoatNormalMap")
.set(Property::CLEAR_COAT)
.set(Property::CLEAR_COAT_NORMAL);
.parameter(MaterialBuilder::SamplerType::SAMPLER_2D, "clearCoatNormalMap");
}
if (hasBaseColorMap) {