From 70fb9cad20adf73f49acbb66cf896df4ca6efad4 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Tue, 30 Jan 2024 23:43:42 +0900 Subject: [PATCH] Editor: Support equirect background in pathtracer. --- editor/js/Viewport.Pathtracer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/js/Viewport.Pathtracer.js b/editor/js/Viewport.Pathtracer.js index 8f24eef312db48..f7bf418aa61893 100644 --- a/editor/js/Viewport.Pathtracer.js +++ b/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 );