浏览代码

Editor: Support equirect background in pathtracer.

Mr.doob 1 年之前
父节点
当前提交
70fb9cad20
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      editor/js/Viewport.Pathtracer.js

+ 5 - 1
editor/js/Viewport.Pathtracer.js

@@ -66,7 +66,11 @@ function ViewportPathtracer( renderer ) {
 
 
 		if ( background ) {
 		if ( background ) {
 
 
-			if ( background.isColor ) {
+			if ( background.isTexture ) {
+
+				ptMaterial.backgroundMap = background;
+
+			} else if ( background.isColor ) {
 
 
 				ptMaterial.backgroundMap = buildColorTexture( background );
 				ptMaterial.backgroundMap = buildColorTexture( background );