瀏覽代碼

Merge pull request #12019 from donmccurdy/feat-gltf-ao-strength

[glTF] Support aoMapIntensity.
Mr.doob 8 年之前
父節點
當前提交
e3012a1b5f
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      examples/js/loaders/GLTFLoader.js

+ 6 - 0
examples/js/loaders/GLTFLoader.js

@@ -1619,6 +1619,12 @@ THREE.GLTFLoader = ( function () {
 
 				pending.push( parser.assignTexture( materialParams, 'aoMap', material.occlusionTexture.index ) );
 
+				if ( material.occlusionTexture.strength !== undefined ) {
+
+					materialParams.aoMapIntensity = material.occlusionTexture.strength;
+
+				}
+
 			}
 
 			if ( material.emissiveFactor !== undefined ) {