Parcourir la source

Editor: Support equirect background in pathtracer.

Mr.doob il y a 1 an
Parent
commit
70fb9cad20
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  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 );