mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-08-21 02:28:41 +00:00
Merge pull request #188 from ux3d/fix/alphaMode
Fixed saving of alphaMode if not OPAQUE
This commit is contained in:
@@ -5412,14 +5412,10 @@ static void SerializeGltfMaterial(Material &material, json &o) {
|
||||
SerializeNumberProperty("alphaCutoff", material.alphaCutoff, o);
|
||||
}
|
||||
|
||||
if (material.alphaMode.compare("OPAQUE") == 0) {
|
||||
if (material.alphaMode.compare("OPAQUE") != 0) {
|
||||
SerializeStringProperty("alphaMode", material.alphaMode, o);
|
||||
}
|
||||
|
||||
if (!TINYGLTF_DOUBLE_EQUAL(material.alphaCutoff, 0.5)) {
|
||||
SerializeNumberProperty("alphaCutoff", material.alphaCutoff, o);
|
||||
}
|
||||
|
||||
o["doubleSided"] = json(material.doubleSided);
|
||||
|
||||
if (material.normalTexture.index >= -1) {
|
||||
|
||||
Reference in New Issue
Block a user