Explorar o código

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

[glTF] Support aoMapIntensity.
Mr.doob %!s(int64=8) %!d(string=hai) anos
pai
achega
e3012a1b5f
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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 ) {