glTF KHR_materials_specular fixes
parent
dc399f7343
commit
762ad8e9b7
|
@ -426,13 +426,14 @@ namespace glTF2 {
|
||||||
|
|
||||||
if (specular.specularFactor != 0.0f) {
|
if (specular.specularFactor != 0.0f) {
|
||||||
WriteFloat(materialSpecular, specular.specularFactor, "specularFactor", w.mAl);
|
WriteFloat(materialSpecular, specular.specularFactor, "specularFactor", w.mAl);
|
||||||
WriteTex(materialSpecular, specular.specularTexture, "specularTexture", w.mAl);
|
|
||||||
}
|
}
|
||||||
if (specular.specularColorFactor[0] != defaultSpecularColorFactor[0] && specular.specularColorFactor[1] != defaultSpecularColorFactor[1] && specular.specularColorFactor[2] != defaultSpecularColorFactor[2]) {
|
if (specular.specularColorFactor[0] != defaultSpecularColorFactor[0] && specular.specularColorFactor[1] != defaultSpecularColorFactor[1] && specular.specularColorFactor[2] != defaultSpecularColorFactor[2]) {
|
||||||
WriteVec(materialSpecular, specular.specularColorFactor, "specularColorFactor", w.mAl);
|
WriteVec(materialSpecular, specular.specularColorFactor, "specularColorFactor", w.mAl);
|
||||||
WriteTex(materialSpecular, specular.specularColorTexture, "specularColorTexture", w.mAl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WriteTex(materialSpecular, specular.specularTexture, "specularTexture", w.mAl);
|
||||||
|
WriteTex(materialSpecular, specular.specularColorTexture, "specularColorTexture", w.mAl);
|
||||||
|
|
||||||
if (!materialSpecular.ObjectEmpty()) {
|
if (!materialSpecular.ObjectEmpty()) {
|
||||||
exts.AddMember("KHR_materials_specular", materialSpecular, w.mAl);
|
exts.AddMember("KHR_materials_specular", materialSpecular, w.mAl);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue