From 63e1ae73d74bc51dba2f1bb9993fac7073480fa0 Mon Sep 17 00:00:00 2001 From: Jihwan Date: Wed, 3 Jun 2026 21:05:59 +0900 Subject: [PATCH 1/2] SSSNode: Fix typos in JSDoc. (#33713) Co-authored-by: hanityx --- examples/jsm/tsl/display/SSSNode.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/jsm/tsl/display/SSSNode.js b/examples/jsm/tsl/display/SSSNode.js index 41f66c577a589c..5f4c0bd49ab470 100644 --- a/examples/jsm/tsl/display/SSSNode.js +++ b/examples/jsm/tsl/display/SSSNode.js @@ -30,7 +30,7 @@ let _rendererState; * * - Ideally the maximum shadow length should not exceed `1` meter. Otherwise the effect gets * computationally very expensive since more samples during the ray marching process are evaluated. - * You can mitigate this issue by reducing the `quality` paramter. + * You can mitigate this issue by reducing the `quality` parameter. * - The effect can only be used with a single directional light, the main light of your scene. * This main light usually represents the sun or daylight. * - Like other Screen-Space techniques SSS can only honor objects in the shadowing computation that @@ -121,7 +121,7 @@ class SSSNode extends TempNode { /** * Whether to use temporal filtering or not. Setting this property to - * `true` requires the usage of `TRAANode`. This will help to reduce noice + * `true` requires the usage of `TRAANode`. This will help to reduce noise * although it introduces typical TAA artifacts like ghosting and temporal * instabilities. * From c0ac898cec4edd5dcafdf6190aa8325ea84a90ed Mon Sep 17 00:00:00 2001 From: mrdoob Date: Wed, 3 Jun 2026 21:39:34 +0900 Subject: [PATCH 2/2] MaterialXLoader: Avoid compiling unused BSDF lobes (#33712) Co-authored-by: Claude Opus 4.8 (1M context) --- examples/jsm/loaders/MaterialXLoader.js | 40 +++++++++++++++++++------ 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/examples/jsm/loaders/MaterialXLoader.js b/examples/jsm/loaders/MaterialXLoader.js index 8c4271c5142589..ae7d74b2c6b982 100644 --- a/examples/jsm/loaders/MaterialXLoader.js +++ b/examples/jsm/loaders/MaterialXLoader.js @@ -886,17 +886,39 @@ class MaterialXNode { material.specularIntensityNode = specularIntensityNode || float( 0.5 ); material.specularColorNode = specularColorNode || color( 1.0, 1.0, 1.0 ); material.iorNode = iorNode || float( 1.5 ); - material.anisotropyNode = anisotropyNode || float( 0 ); - material.anisotropyRotationNode = anisotropyRotationNode || float( 0 ); - material.transmissionNode = transmissionNode || float( 0 ); - material.transmissionColorNode = transmissionColorNode || color( 1.0, 1.0, 1.0 ); + + if ( anisotropyNode !== null ) { + + material.anisotropyNode = anisotropyNode; + material.anisotropyRotationNode = anisotropyRotationNode || float( 0 ); + + } + + if ( transmissionNode !== null ) { + + material.transmissionNode = transmissionNode; + material.transmissionColorNode = transmissionColorNode || color( 1.0, 1.0, 1.0 ); + + } + material.thinFilmThicknessNode = thinFilmThicknessNode || float( 0 ); material.thinFilmIorNode = thinFilmIorNode || float( 1.5 ); - material.sheenNode = sheenNode || float( 0 ); - material.sheenColorNode = sheenColorNode || color( 1.0, 1.0, 1.0 ); - material.sheenRoughnessNode = sheenRoughnessNode || float( 0.5 ); - material.clearcoatNode = clearcoatNode || float( 0 ); - material.clearcoatRoughnessNode = clearcoatRoughnessNode || float( 0 ); + + if ( sheenNode !== null ) { + + material.sheenNode = sheenNode; + material.sheenColorNode = sheenColorNode || color( 1.0, 1.0, 1.0 ); + material.sheenRoughnessNode = sheenRoughnessNode || float( 0.5 ); + + } + + if ( clearcoatNode !== null ) { + + material.clearcoatNode = clearcoatNode; + material.clearcoatRoughnessNode = clearcoatRoughnessNode || float( 0 ); + + } + if ( normalNode ) material.normalNode = normalNode; if ( emissiveNode ) material.emissiveNode = emissiveNode;