From 195e328825d0bbe237355ee0ab433f60af4f29b9 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Thu, 11 Jun 2026 20:57:46 +0900 Subject: [PATCH] Examples: Add inspector to the ball pool example. Co-Authored-By: Claude Fable 5 --- examples/webgpu_postprocessing_ssgi_ballpool.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/webgpu_postprocessing_ssgi_ballpool.html b/examples/webgpu_postprocessing_ssgi_ballpool.html index ef6b368ddfa4af..2c8f7453ebbd4c 100644 --- a/examples/webgpu_postprocessing_ssgi_ballpool.html +++ b/examples/webgpu_postprocessing_ssgi_ballpool.html @@ -48,6 +48,8 @@ import { traa } from 'three/addons/tsl/display/TRAANode.js'; import { World } from '@perplexdotgg/bounce'; + import { Inspector } from 'three/addons/inspector/Inspector.js'; + const BALL_RADIUS = 0.4; const FILL_RATIO = 0.4; const PACKING = 0.6; @@ -92,6 +94,7 @@ renderer.toneMapping = THREE.ACESFilmicToneMapping; renderer.toneMappingExposure = 0.5; renderer.shadowMap.enabled = true; + renderer.inspector = new Inspector(); document.body.appendChild( renderer.domElement ); // @@ -134,8 +137,8 @@ // composite - const gi = giPass.rgb; - const ao = giPass.a; + const gi = giPass.rgb.toInspector( 'SSGI' ); + const ao = giPass.a.toInspector( 'AO' ); const compositePass = vec4( add( scenePassColor.rgb.mul( ao ), scenePassDiffuse.rgb.mul( gi ) ),