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

Material/MaterialLoader: Support roughnessMap/metalnessMap.

上级 8787533c
......@@ -119,6 +119,9 @@ THREE.MaterialLoader.prototype = {
if ( json.displacementScale !== undefined ) material.displacementScale = json.displacementScale;
if ( json.displacementBias !== undefined ) material.displacementBias = json.displacementBias;
if ( json.roughnessMap !== undefined ) material.roughnessMap = this.getTexture( json.roughnessMap );
if ( json.metalnessMap !== undefined ) material.metalnessMap = this.getTexture( json.metalnessMap );
if ( json.specularMap !== undefined ) material.specularMap = this.getTexture( json.specularMap );
if ( json.envMap !== undefined ) {
......
......@@ -170,6 +170,8 @@ THREE.Material.prototype = {
data.displacementBias = this.displacementBias;
}
if ( this.roughnessMap instanceof THREE.Texture ) data.roughnessMap = this.roughnessMap.toJSON( meta ).uuid;
if ( this.metalnessMap instanceof THREE.Texture ) data.metalnessMap = this.metalnessMap.toJSON( meta ).uuid;
if ( this.specularMap instanceof THREE.Texture ) data.specularMap = this.specularMap.toJSON( meta ).uuid;
if ( this.envMap instanceof THREE.Texture ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册