@@ -15520,21 +15520,96 @@ index 27986a7d..05ee79b0 100644
1552015520 init();
1552115521
1552215522diff --git a/examples-testing/examples/webgpu_loader_materialx.ts b/examples-testing/examples/webgpu_loader_materialx.ts
15523- index 8a2d2a0e..603f034c 100644
15523+ index a790281e..b2740408 100644
1552415524--- a/examples-testing/examples/webgpu_loader_materialx.ts
1552515525+++ b/examples-testing/examples/webgpu_loader_materialx.ts
15526- @@ -59,8 +59,8 @@ const localSamples = [
15526+ @@ -1,6 +1,19 @@
15527+ import * as THREE from 'three/webgpu';
15528+
15529+ -import { Fn, length, fract, vec4, positionWorld, smoothstep, max, abs, float, cameraPosition, clamp } from 'three/tsl';
15530+ +import {
15531+ + Fn,
15532+ + length,
15533+ + fract,
15534+ + vec4,
15535+ + positionWorld,
15536+ + smoothstep,
15537+ + max,
15538+ + abs,
15539+ + float,
15540+ + cameraPosition,
15541+ + clamp,
15542+ + ShaderNodeObject,
15543+ +} from 'three/tsl';
15544+
15545+ import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
15546+
15547+ @@ -61,9 +74,9 @@ const localSamples = [
1552715548 'sheen_test.mtlx',
1552815549 ];
1552915550
15530- -let camera, scene, renderer, prefab;
15551+ -let camera, scene, renderer;
15552+ -let controls, prefab;
1553115553-const models = [];
15532- +let camera: THREE.PerspectiveCamera, scene: THREE.Scene, renderer: THREE.WebGPURenderer, prefab: THREE.Group;
15554+ +let camera: THREE.PerspectiveCamera, scene: THREE.Scene, renderer: THREE.WebGPURenderer;
15555+ +let controls: OrbitControls, prefab: THREE.Group;
1553315556+const models: THREE.Group[] = [];
1553415557
1553515558 init();
1553615559
15537- @@ -129,7 +129,7 @@ function updateModelsAlign() {
15560+ @@ -89,29 +102,33 @@ function init() {
15561+
15562+ const material = new THREE.MeshStandardNodeMaterial();
15563+
15564+ - const gridXZ = Fn(([gridSize = float(1.0), dotWidth = float(0.1), lineWidth = float(0.02)]) => {
15565+ - const worldPos = positionWorld;
15566+ - const grid = fract(worldPos.xz.div(gridSize));
15567+ + const gridXZ = Fn<[ShaderNodeObject<THREE.Node>, ShaderNodeObject<THREE.Node>, ShaderNodeObject<THREE.Node>]>(
15568+ + ([gridSize = float(1.0), dotWidth = float(0.1), lineWidth = float(0.02)]) => {
15569+ + const worldPos = positionWorld;
15570+ + const grid = fract(worldPos.xz.div(gridSize));
15571+
15572+ - // Distance-based antialiasing
15573+ - const distToCamera = length(worldPos.sub(cameraPosition));
15574+ - const smoothing = clamp(distToCamera.div(100.0), 0.01, 0.02);
15575+ + // Distance-based antialiasing
15576+ + const distToCamera = length(worldPos.sub(cameraPosition));
15577+ + const smoothing = clamp(distToCamera.div(100.0), 0.01, 0.02);
15578+
15579+ - // Create dots at cell centers
15580+ - const dotDist = length(grid.sub(0.5));
15581+ - const dots = smoothstep(dotWidth.add(smoothing), dotWidth.sub(smoothing), dotDist);
15582+ + // Create dots at cell centers
15583+ + const dotDist = length(grid.sub(0.5));
15584+ + const dots = smoothstep(dotWidth.add(smoothing), dotWidth.sub(smoothing), dotDist);
15585+
15586+ - // Create grid lines
15587+ - const lineX = smoothstep(lineWidth.add(smoothing), lineWidth.sub(smoothing), abs(grid.x.sub(0.5)));
15588+ - const lineZ = smoothstep(lineWidth.add(smoothing), lineWidth.sub(smoothing), abs(grid.y.sub(0.5)));
15589+ - const lines = max(lineX, lineZ);
15590+ + // Create grid lines
15591+ + const lineX = smoothstep(lineWidth.add(smoothing), lineWidth.sub(smoothing), abs(grid.x.sub(0.5)));
15592+ + const lineZ = smoothstep(lineWidth.add(smoothing), lineWidth.sub(smoothing), abs(grid.y.sub(0.5)));
15593+ + const lines = max(lineX, lineZ);
15594+
15595+ - return max(dots, lines);
15596+ - });
15597+ + return max(dots, lines);
15598+ + },
15599+ + );
15600+
15601+ - const radialGradient = Fn(([radius = float(10.0), falloff = float(1.0)]) => {
15602+ - return smoothstep(radius, radius.sub(falloff), length(positionWorld));
15603+ - });
15604+ + const radialGradient = Fn<[ShaderNodeObject<THREE.Node>, ShaderNodeObject<THREE.Node>]>(
15605+ + ([radius = float(10.0), falloff = float(1.0)]) => {
15606+ + return smoothstep(radius, radius.sub(falloff), length(positionWorld));
15607+ + },
15608+ + );
15609+
15610+ // Create grid pattern
15611+ const gridPattern = gridXZ(1.0, 0.04, 0.01);
15612+ @@ -176,7 +193,7 @@ function updateModelsAlign() {
1553815613 }
1553915614 }
1554015615
@@ -15543,7 +15618,7 @@ index 8a2d2a0e..603f034c 100644
1554315618 const model = prefab.clone();
1554415619
1554515620 models.push(model);
15546- @@ -143 ,12 +143 ,12 @@ async function addSample(sample, path) {
15621+ @@ -190 ,12 +207 ,12 @@ async function addSample(sample, path) {
1554715622 const material = await new MaterialXLoader()
1554815623 .setPath(path)
1554915624 .loadAsync(sample)
@@ -15557,9 +15632,9 @@ index 8a2d2a0e..603f034c 100644
1555715632- const previewMesh = model.getObjectByName('Preview_Mesh');
1555815633+ const previewMesh = model.getObjectByName('Preview_Mesh') as THREE.Mesh;
1555915634 previewMesh.material = material;
15560- }
1556115635
15562- @@ -177,9 +177,9 @@ function addGUI() {
15636+ if (material.transparent) {
15637+ @@ -229,9 +246,9 @@ function addGUI() {
1556315638 });
1556415639 }
1556515640
@@ -16347,7 +16422,7 @@ index b4694ef3..68ad678b 100644
1634716422 init();
1634816423
1634916424diff --git a/examples-testing/examples/webgpu_mrt_mask.ts b/examples-testing/examples/webgpu_mrt_mask.ts
16350- index eec81e1c..4aa3cbac 100644
16425+ index 6125b972..f579d340 100644
1635116426--- a/examples-testing/examples/webgpu_mrt_mask.ts
1635216427+++ b/examples-testing/examples/webgpu_mrt_mask.ts
1635316428@@ -6,11 +6,11 @@ import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
@@ -17553,21 +17628,21 @@ index 45e298e7..207a463b 100644
1755317628 postProcessing.render();
1755417629
1755517630diff --git a/examples-testing/examples/webgpu_postprocessing_ssr.ts b/examples-testing/examples/webgpu_postprocessing_ssr.ts
17556- index 1579a8d8..e5a06ef1 100644
17631+ index 00320f58..22780f64 100644
1755717632--- a/examples-testing/examples/webgpu_postprocessing_ssr.ts
1755817633+++ b/examples-testing/examples/webgpu_postprocessing_ssr.ts
17559- @@ -11,8 +11,9 @@ import {
17560- sample,
17634+ @@ -13,8 +13,9 @@ import {
1756117635 directionToColor,
1756217636 colorToDirection,
17637+ vec2,
1756317638+ ShaderNodeObject,
1756417639 } from 'three/tsl';
1756517640-import { ssr } from 'three/addons/tsl/display/SSRNode.js';
1756617641+import SSRNode, { ssr } from 'three/addons/tsl/display/SSRNode.js';
1756717642 import { smaa } from 'three/addons/tsl/display/SMAANode.js';
1756817643
1756917644 import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js';
17570- @@ -29 ,8 +30 ,12 @@ const params = {
17645+ @@ -31 ,8 +32 ,12 @@ const params = {
1757117646 enabled: true,
1757217647 };
1757317648
@@ -17582,12 +17657,18 @@ index 1579a8d8..e5a06ef1 100644
1758217657
1758317658 init();
1758417659
17585- @@ -49,9 +54,9 @@ async function init() {
17660+ @@ -51,13 +56,12 @@ async function init() {
1758617661 loader.setDRACOLoader(dracoLoader);
1758717662 loader.load('models/gltf/steampunk_camera.glb', function (gltf) {
1758817663 gltf.scene.traverse(function (object) {
1758917664- if (object.material) {
17590- + if ((object as THREE.Mesh).material) {
17665+ - if (object.material.name === 'Lense_Casing') {
17666+ - object.material.transparent = true;
17667+ + if ((object as THREE.Mesh<THREE.BufferGeometry, THREE.Material>).material) {
17668+ + if ((object as THREE.Mesh<THREE.BufferGeometry, THREE.Material>).material.name === 'Lense_Casing') {
17669+ + (object as THREE.Mesh<THREE.BufferGeometry, THREE.Material>).material.transparent = true;
17670+ }
17671+ -
1759117672 // Avoid overdrawing
1759217673- object.material.side = THREE.FrontSide;
1759317674+ (object as THREE.Mesh<THREE.BufferGeometry, THREE.Material>).material.side = THREE.FrontSide;
@@ -17748,7 +17829,7 @@ index d4b197b3..ae7a2ade 100644
1774817829
1774917830 const fxSceneA = new FXScene(new THREE.BoxGeometry(2, 2, 2), new THREE.Vector3(0, -0.4, 0), 0xffffff);
1775017831diff --git a/examples-testing/examples/webgpu_procedural_texture.ts b/examples-testing/examples/webgpu_procedural_texture.ts
17751- index 98516c6c..d0de6c2c 100644
17832+ index 04630e74..01152c09 100644
1775217833--- a/examples-testing/examples/webgpu_procedural_texture.ts
1775317834+++ b/examples-testing/examples/webgpu_procedural_texture.ts
1775417835@@ -4,7 +4,7 @@ import { gaussianBlur } from 'three/addons/tsl/display/GaussianBlurNode.js';
0 commit comments