Ver Fonte

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 há 3 anos atrás
pai
commit
8bea2a8408
1 ficheiros alterados com 1 adições e 1 exclusões
  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 ) {