Save some bandwidth by not including unity texture transforms in material jsons

This commit is contained in:
sabrina-shanman 2019-04-18 17:43:03 -07:00
parent 9cb5ed888a
commit 74b4b47a2a

View file

@ -470,12 +470,12 @@ namespace scriptable {
// These need to be implemented, but set the fallthrough for now
if (hasPropertyFallthroughs && material.propertyFallthroughs.at(graphics::Material::TEXCOORDTRANSFORM0)) {
obj.setProperty("texCoordTransform0", FALLTHROUGH);
} else {
} else if (material.texCoordTransforms[0] != mat4()) {
obj.setProperty("texCoordTransform0", mat4toScriptValue(engine, material.texCoordTransforms[0]));
}
if (hasPropertyFallthroughs && material.propertyFallthroughs.at(graphics::Material::TEXCOORDTRANSFORM1)) {
obj.setProperty("texCoordTransform1", FALLTHROUGH);
} else {
} else if (material.texCoordTransforms[1] != mat4()) {
obj.setProperty("texCoordTransform1", mat4toScriptValue(engine, material.texCoordTransforms[1]));
}
if (hasPropertyFallthroughs && material.propertyFallthroughs.at(graphics::Material::LIGHTMAP_PARAMS)) {