提交 de06cab1 编写于 作者: M Mr.doob

GLTFLoader: Use RGBFormat for `aoMap`, `roughnessMap` and `metalnessMap` textures.

上级 692e8204
...@@ -2232,6 +2232,16 @@ THREE.GLTFLoader = ( function () { ...@@ -2232,6 +2232,16 @@ THREE.GLTFLoader = ( function () {
return this.getDependency( 'texture', mapDef.index ).then( function ( texture ) { return this.getDependency( 'texture', mapDef.index ).then( function ( texture ) {
switch ( mapName ) {
case 'aoMap':
case 'roughnessMap':
case 'metalnessMap':
texture.format = THREE.RGBFormat;
break;
}
if ( parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] ) { if ( parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] ) {
var transform = mapDef.extensions !== undefined ? mapDef.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] : undefined; 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.
先完成此消息的编辑!
想要评论请 注册