diff --git a/examples/screenshots/webgpu_clearcoat.jpg b/examples/screenshots/webgpu_clearcoat.jpg index 7dfb0d565f2ea0..c2f83f67f9c537 100644 Binary files a/examples/screenshots/webgpu_clearcoat.jpg and b/examples/screenshots/webgpu_clearcoat.jpg differ diff --git a/examples/screenshots/webgpu_cubemap_adjustments.jpg b/examples/screenshots/webgpu_cubemap_adjustments.jpg index c39c61d57d9394..2eee2ce988ab50 100644 Binary files a/examples/screenshots/webgpu_cubemap_adjustments.jpg and b/examples/screenshots/webgpu_cubemap_adjustments.jpg differ diff --git a/examples/screenshots/webgpu_cubemap_dynamic.jpg b/examples/screenshots/webgpu_cubemap_dynamic.jpg index bc60165d9754e1..87699ddbbf94ef 100644 Binary files a/examples/screenshots/webgpu_cubemap_dynamic.jpg and b/examples/screenshots/webgpu_cubemap_dynamic.jpg differ diff --git a/examples/screenshots/webgpu_lightprobe.jpg b/examples/screenshots/webgpu_lightprobe.jpg index 0c8e987c1761ef..8a7a07577b2644 100644 Binary files a/examples/screenshots/webgpu_lightprobe.jpg and b/examples/screenshots/webgpu_lightprobe.jpg differ diff --git a/examples/screenshots/webgpu_loader_gltf.jpg b/examples/screenshots/webgpu_loader_gltf.jpg index d20a8f92a17bc2..cc500be3e326ab 100644 Binary files a/examples/screenshots/webgpu_loader_gltf.jpg and b/examples/screenshots/webgpu_loader_gltf.jpg differ diff --git a/examples/screenshots/webgpu_loader_gltf_iridescence.jpg b/examples/screenshots/webgpu_loader_gltf_iridescence.jpg index 52f58d9a837022..b428169290518c 100644 Binary files a/examples/screenshots/webgpu_loader_gltf_iridescence.jpg and b/examples/screenshots/webgpu_loader_gltf_iridescence.jpg differ diff --git a/examples/screenshots/webgpu_loader_gltf_sheen.jpg b/examples/screenshots/webgpu_loader_gltf_sheen.jpg index 6ab02b66ee9e4c..19dec65317c284 100644 Binary files a/examples/screenshots/webgpu_loader_gltf_sheen.jpg and b/examples/screenshots/webgpu_loader_gltf_sheen.jpg differ diff --git a/examples/screenshots/webgpu_loader_materialx.jpg b/examples/screenshots/webgpu_loader_materialx.jpg index 532aeea0d5a63c..d7e4af62863833 100644 Binary files a/examples/screenshots/webgpu_loader_materialx.jpg and b/examples/screenshots/webgpu_loader_materialx.jpg differ diff --git a/examples/screenshots/webgpu_materials_basic.jpg b/examples/screenshots/webgpu_materials_basic.jpg index 3d4b25a98523a9..381aceef9a3bb5 100644 Binary files a/examples/screenshots/webgpu_materials_basic.jpg and b/examples/screenshots/webgpu_materials_basic.jpg differ diff --git a/examples/screenshots/webgpu_materials_envmaps.jpg b/examples/screenshots/webgpu_materials_envmaps.jpg index 8b01c918d91f6f..5ac9992d916821 100644 Binary files a/examples/screenshots/webgpu_materials_envmaps.jpg and b/examples/screenshots/webgpu_materials_envmaps.jpg differ diff --git a/examples/screenshots/webgpu_materials_transmission.jpg b/examples/screenshots/webgpu_materials_transmission.jpg index 7169f34b73cd50..ed8b630a469300 100644 Binary files a/examples/screenshots/webgpu_materials_transmission.jpg and b/examples/screenshots/webgpu_materials_transmission.jpg differ diff --git a/examples/screenshots/webgpu_mrt.jpg b/examples/screenshots/webgpu_mrt.jpg index 77c8150cd9b719..0da0040e7a2d7c 100644 Binary files a/examples/screenshots/webgpu_mrt.jpg and b/examples/screenshots/webgpu_mrt.jpg differ diff --git a/examples/screenshots/webgpu_parallax_uv.jpg b/examples/screenshots/webgpu_parallax_uv.jpg index fae722857148d6..521f0038bb3784 100644 Binary files a/examples/screenshots/webgpu_parallax_uv.jpg and b/examples/screenshots/webgpu_parallax_uv.jpg differ diff --git a/examples/screenshots/webgpu_postprocessing_3dlut.jpg b/examples/screenshots/webgpu_postprocessing_3dlut.jpg index 8f323bd45cff3f..af9dc431747b5a 100644 Binary files a/examples/screenshots/webgpu_postprocessing_3dlut.jpg and b/examples/screenshots/webgpu_postprocessing_3dlut.jpg differ diff --git a/src/renderers/common/CubeRenderTarget.js b/src/renderers/common/CubeRenderTarget.js index b7d1167aeb52a4..450e28fe1cee86 100644 --- a/src/renderers/common/CubeRenderTarget.js +++ b/src/renderers/common/CubeRenderTarget.js @@ -54,8 +54,14 @@ class CubeRenderTarget extends WebGLCubeRenderTarget { if ( texture.minFilter === LinearMipmapLinearFilter ) texture.minFilter = LinearFilter; const camera = new CubeCamera( 1, 10, this ); + + const currentMRT = renderer.getMRT(); + renderer.setMRT( null ); + camera.update( renderer, scene ); + renderer.setMRT( currentMRT ); + texture.minFilter = currentMinFilter; texture.currentGenerateMipmaps = currentGenerateMipmaps; diff --git a/src/renderers/common/nodes/Nodes.js b/src/renderers/common/nodes/Nodes.js index 7b2a3adcce4f8b..6ac158c0c6f9e7 100644 --- a/src/renderers/common/nodes/Nodes.js +++ b/src/renderers/common/nodes/Nodes.js @@ -1,6 +1,7 @@ import DataMap from '../DataMap.js'; import ChainMap from '../ChainMap.js'; import NodeBuilderState from './NodeBuilderState.js'; +import { cubeMapNode } from '../../../nodes/utils/CubeMapNode.js'; import { NodeFrame, objectGroup, renderGroup, frameGroup, cubeTexture, texture, rangeFog, densityFog, reference, viewportBottomLeft, normalWorld, pmremTexture, viewportTopLeft } from '../../../nodes/Nodes.js'; import { EquirectangularReflectionMapping, EquirectangularRefractionMapping } from '../../../constants.js'; @@ -264,13 +265,35 @@ class Nodes extends DataMap { if ( background ) { - if ( sceneData.background !== background ) { + const forceUpdate = ( scene.backgroundBlurriness === 0 && sceneData.backgroundBlurriness > 0 ) || ( scene.backgroundBlurriness > 0 && sceneData.backgroundBlurriness === 0 ); + + if ( sceneData.background !== background || forceUpdate ) { let backgroundNode = null; if ( background.isCubeTexture === true || ( background.mapping === EquirectangularReflectionMapping || background.mapping === EquirectangularRefractionMapping ) ) { - backgroundNode = pmremTexture( background, normalWorld ); + if ( scene.backgroundBlurriness > 0 ) { + + backgroundNode = pmremTexture( background, normalWorld ); + + } else { + + let envMap; + + if ( background.isCubeTexture === true ) { + + envMap = cubeTexture( background ); + + } else { + + envMap = texture( background ); + + } + + backgroundNode = cubeMapNode( envMap ); + + } } else if ( background.isTexture === true ) { @@ -284,6 +307,7 @@ class Nodes extends DataMap { sceneData.backgroundNode = backgroundNode; sceneData.background = background; + sceneData.backgroundBlurriness = scene.backgroundBlurriness; }