|
@@ -1971,6 +1971,14 @@ THREE.GLTFLoader = ( function () {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // Materials sample aoMap from UV set 1 and other maps from UV set 0 - this can't be configured
|
|
|
+ // However, we will copy UV set 0 to UV set 1 on demand for aoMap
|
|
|
+ if ( mapDef.texCoord !== undefined && mapDef.texCoord != 0 && ! ( mapName === 'aoMap' && mapDef.texCoord == 1 ) ) {
|
|
|
+
|
|
|
+ console.warn( 'THREE.GLTFLoader: Custom UV set ' + mapDef.texCoord + ' for texture ' + mapName + ' not yet supported.' );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if ( parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] ) {
|
|
|
|
|
|
var transform = mapDef.extensions !== undefined ? mapDef.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] : undefined;
|
|
@@ -2090,7 +2098,6 @@ THREE.GLTFLoader = ( function () {
|
|
|
|
|
|
if ( material.aoMap && geometry.attributes.uv2 === undefined && geometry.attributes.uv !== undefined ) {
|
|
|
|
|
|
- console.log( 'THREE.GLTFLoader: Duplicating UVs to support aoMap.' );
|
|
|
geometry.setAttribute( 'uv2', new THREE.BufferAttribute( geometry.attributes.uv.array, 2 ) );
|
|
|
|
|
|
}
|