mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 17:15:52 +08:00
Merge pull request #188 from ux3d/fix/alphaMode
Fixed saving of alphaMode if not OPAQUE
This commit is contained in:
commit
67d3d2504d
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user