소스 검색

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.isColor ) {
+			if ( background.isTexture ) {
+
+				ptMaterial.backgroundMap = background;
+
+			} else if ( background.isColor ) {
 
 				ptMaterial.backgroundMap = buildColorTexture( background );