File tree 2 files changed +6
-16
lines changed
2 files changed +6
-16
lines changed Original file line number Diff line number Diff line change 8
8
</ head >
9
9
10
10
< body >
11
+
11
12
< div id ="info ">
12
13
< a href ="https://threejs.org " target ="_blank " rel ="noopener "> three.js</ a > webgpu - volumetric lighting
13
14
< br > Improve the quality/performance adjusting the parameters in the Controls
14
15
</ div >
15
16
16
- < video id ="video " loop muted crossOrigin ="anonymous " playsinline style ="display:none ">
17
- < source src ="textures/sintel.ogv " type ='video/ogg; codecs="theora, vorbis" '>
18
- < source src ="textures/sintel.mp4 " type ='video/mp4; codecs="avc1.42E01E, mp4a.40.2" '>
19
- </ video >
20
-
21
17
< script type ="importmap ">
22
18
{
23
19
"imports" : {
211
207
// Scene Pass
212
208
213
209
const scenePass = pass ( scene , camera ) ;
214
- const sceneLinearDepth = scenePass . getTextureNode ( 'depth' ) ;
210
+ const sceneDepth = scenePass . getTextureNode ( 'depth' ) ;
215
211
216
212
// Material - Apply occlusion depth of volumetric lighting based on the scene depth
217
213
218
- volumetricMaterial . depthNode = sceneLinearDepth . sample ( screenUV ) ;
214
+ volumetricMaterial . depthNode = sceneDepth . sample ( screenUV ) ;
219
215
220
216
// Volumetric Lighting Pass
221
217
236
232
// GUI
237
233
238
234
const params = {
239
- quality : 1 ,
240
235
resolution : volumetricPass . getResolution ( ) ,
241
236
denoise : true
242
237
} ;
Original file line number Diff line number Diff line change 8
8
</ head >
9
9
10
10
< body >
11
+
11
12
< div id ="info ">
12
13
< a href ="https://threejs.org " target ="_blank " rel ="noopener "> three.js</ a > webgpu - volumetric lighting rect area
13
14
< br > Improve the quality/performance adjusting the parameters in the Controls
14
15
</ div >
15
16
16
- < video id ="video " loop muted crossOrigin ="anonymous " playsinline style ="display:none ">
17
- < source src ="textures/sintel.ogv " type ='video/ogg; codecs="theora, vorbis" '>
18
- < source src ="textures/sintel.mp4 " type ='video/mp4; codecs="avc1.42E01E, mp4a.40.2" '>
19
- </ video >
20
-
21
17
< script type ="importmap ">
22
18
{
23
19
"imports" : {
232
228
// Scene Pass
233
229
234
230
const scenePass = pass ( scene , camera ) ;
235
- const sceneLinearDepth = scenePass . getTextureNode ( 'depth' ) ;
231
+ const sceneDepth = scenePass . getTextureNode ( 'depth' ) ;
236
232
237
233
// Material - Apply occlusion depth of volumetric lighting based on the scene depth
238
234
239
- volumetricMaterial . depthNode = sceneLinearDepth . sample ( screenUV ) ;
235
+ volumetricMaterial . depthNode = sceneDepth . sample ( screenUV ) ;
240
236
241
237
// Volumetric Lighting Pass
242
238
257
253
// GUI
258
254
259
255
const params = {
260
- quality : 1 ,
261
256
resolution : volumetricPass . getResolution ( ) ,
262
257
denoise : true
263
258
} ;
You can’t perform that action at this time.
0 commit comments