未验证 提交 494ccf6f 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15758 from mrdoob/gltfloader

GLTFLoader: Use RGBFormat for aoMap, emissiveMap, metalnessMap, normalMap and roughnessMap.
......@@ -2232,6 +2232,18 @@ THREE.GLTFLoader = ( function () {
return this.getDependency( 'texture', mapDef.index ).then( function ( texture ) {
switch ( mapName ) {
case 'aoMap':
case 'emissiveMap':
case 'metalnessMap':
case 'normalMap':
case 'roughnessMap':
texture.format = THREE.RGBFormat;
break;
}
if ( parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] ) {
var transform = mapDef.extensions !== undefined ? mapDef.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] : undefined;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册