فهرست منبع

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 ) {