浏览代码

GLTFExporter: Avoid writing default alphaCutoff.

Don McCurdy 7 年之前
父节点
当前提交
727ce2e932
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      examples/js/exporters/GLTFExporter.js

+ 2 - 1
examples/js/exporters/GLTFExporter.js

@@ -600,7 +600,8 @@ THREE.GLTFExporter.prototype = {
 
 				gltfMaterial.alphaMode = material.opacity < 1.0 ? 'BLEND' : 'MASK';
 
-				if ( material.alphaTest > 0.0 ) {
+				// Write alphaCutoff if it's non-zero and different from the default (0.5).
+				if ( material.alphaTest > 0.0 && material.alphaTest !== 0.5 ) {
 
 					gltfMaterial.alphaCutoff = material.alphaTest;