提交 cfacb47f 编写于 作者: T Takahiro

Support Texture format in GLTFLoader

上级 b06ab404
......@@ -1072,6 +1072,15 @@ THREE.GLTFLoader = ( function () {
if ( texture.name !== undefined ) _texture.name = texture.name;
_texture.format = texture.format !== undefined ? WEBGL_TEXTURE_FORMATS[ texture.format ] : THREE.RGBAFormat;
if ( texture.internalFormat !== undefined && _texture.format !== WEBGL_TEXTURE_FORMATS[ texture.internalFormat ] ) {
console.warn( 'THREE.GLTFLoader: Three.js doesn\'t support texture internalFormat which is different from texture format. ' +
'internalFormat will be forced to be the same value as format.' );
}
_texture.type = texture.type !== undefined ? WEBGL_TEXTURE_TYPES[ texture.type ] : THREE.UnsignedByteType;
if ( texture.sampler ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册