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

Merge pull request #13415 from takahirox/GLTFExporterMetallicRoughnessTexture

GLTFExporter: Support metallicRoughnessTexture
......@@ -613,6 +613,25 @@ THREE.GLTFExporter.prototype = {
}
// pbrMetallicRoughness.metallicRoughnessTexture
if ( material.metalnessMap || material.roughnessMap ) {
if ( material.metalnessMap === material.roughnessMap ) {
gltfMaterial.pbrMetallicRoughness.metallicRoughnessTexture = {
index: processTexture( material.metalnessMap )
};
} else {
console.warn( 'THREE.GLTFExporter: Ignoring metalnessMap and roughnessMap because they are not the same Texture.' );
}
}
// pbrMetallicRoughness.baseColorTexture
if ( material.map ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册