Blend & FX

This commit is contained in:
jordan4ibanez 2023-11-28 08:41:21 -05:00
parent 162f45327c
commit da18594daf
1 changed files with 22 additions and 0 deletions

View File

@ -298,7 +298,29 @@ std::tuple<bool, std::string> CB3DJSONMeshFileLoader::readChunkBRUS() {
return {false, "BRUS: Element (" + std::to_string(index) + ") \"alpha\" is not a number."};
}
//* Blend.
if (b.contains("blend") && b["blend"].is_number_integer()) {
B3DMaterial.blend = b["blend"];
} else {
if (!b.contains("blend")) {
return {false, "BRUS: Element (" + std::to_string(index) + ") is missing \"blend\"."};
}
return {false, "BRUS: Element (" + std::to_string(index) + ") \"blend\" is not an integer."};
}
//* FX.
if (b.contains("fx") && b["fx"].is_number_integer()) {
B3DMaterial.fx = b["fx"];
} else {
if (!b.contains("fx")) {
return {false, "BRUS: Element (" + std::to_string(index) + ") is missing \"fx\"."};
}
return {false, "BRUS: Element (" + std::to_string(index) + ") \"fx\" is not an integer."};
}