浏览代码

GLTFExporter: Fix buildORMTexture() (#23463)

Currently buildORMTexture() returns Texture.image
if aoMap.image, roughnessMap.image, and metalnessMap.image
are identical but it should return Texture.
This PR fixes the problem by returning Texture.
Takahiro 3 年之前
父节点
当前提交
8bea2a8408
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/jsm/exporters/GLTFExporter.js

+ 1 - 1
examples/jsm/exporters/GLTFExporter.js

@@ -695,7 +695,7 @@ class GLTFWriter {
 		const roughness = material.roughnessMap?.image;
 		const metalness = material.metalnessMap?.image;
 
-		if ( occlusion === roughness && roughness === metalness ) return occlusion;
+		if ( occlusion === roughness && roughness === metalness ) return material.aoMap;
 
 		if ( occlusion || roughness || metalness ) {