Browse Source

Examples: Cleanup volumetric lighting (#30660)

sunag 10 months ago
parent
commit
4edb768f26

+ 3 - 8
examples/webgpu_volume_lighting.html

@@ -8,16 +8,12 @@
 	</head>
 
 	<body>
+
 		<div id="info">
 			<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> webgpu - volumetric lighting
 			<br>Improve the quality/performance adjusting the parameters in the Controls
 		</div>
 
-		<video id="video" loop muted crossOrigin="anonymous" playsinline style="display:none">
-			<source src="textures/sintel.ogv" type='video/ogg; codecs="theora, vorbis"'>
-			<source src="textures/sintel.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
-		</video>
-
 		<script type="importmap">
 			{
 				"imports": {
@@ -211,11 +207,11 @@
 				// Scene Pass
 
 				const scenePass = pass( scene, camera );
-				const sceneLinearDepth = scenePass.getTextureNode( 'depth' );
+				const sceneDepth = scenePass.getTextureNode( 'depth' );
 
 				// Material - Apply occlusion depth of volumetric lighting based on the scene depth
 
-				volumetricMaterial.depthNode = sceneLinearDepth.sample( screenUV );
+				volumetricMaterial.depthNode = sceneDepth.sample( screenUV );
 
 				// Volumetric Lighting Pass
 
@@ -236,7 +232,6 @@
 				// GUI
 
 				const params = {
-					quality: 1,
 					resolution: volumetricPass.getResolution(),
 					denoise: true
 				};

+ 3 - 8
examples/webgpu_volume_lighting_rectarea.html

@@ -8,16 +8,12 @@
 	</head>
 
 	<body>
+
 		<div id="info">
 			<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> webgpu - volumetric lighting rect area
 			<br>Improve the quality/performance adjusting the parameters in the Controls
 		</div>
 
-		<video id="video" loop muted crossOrigin="anonymous" playsinline style="display:none">
-			<source src="textures/sintel.ogv" type='video/ogg; codecs="theora, vorbis"'>
-			<source src="textures/sintel.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
-		</video>
-
 		<script type="importmap">
 			{
 				"imports": {
@@ -232,11 +228,11 @@
 				// Scene Pass
 
 				const scenePass = pass( scene, camera );
-				const sceneLinearDepth = scenePass.getTextureNode( 'depth' );
+				const sceneDepth = scenePass.getTextureNode( 'depth' );
 
 				// Material - Apply occlusion depth of volumetric lighting based on the scene depth
 
-				volumetricMaterial.depthNode = sceneLinearDepth.sample( screenUV );
+				volumetricMaterial.depthNode = sceneDepth.sample( screenUV );
 
 				// Volumetric Lighting Pass
 
@@ -257,7 +253,6 @@
 				// GUI
 
 				const params = {
-					quality: 1,
 					resolution: volumetricPass.getResolution(),
 					denoise: true
 				};

粤ICP备19079148号