@@ -15,10 +15,9 @@ import { BloomPass } from "bloom-pass";
15
15
16
16
// Custom shaders
17
17
import { OutlinePass } from '../src/OutlinePass.js' ;
18
- import { DepthMaskPass } from "../src/DepthMaskPass.js" ;
19
18
import { IntensityBasedCircleGridShader } from "../src/IntensityBasedCircleGridShader.js" ;
20
19
21
- let scene , camera , renderer , composer , outline , bloom , depthMask , shockwaveTime , intensityBasedCircleGrid , objects , clock , time , mouse , picker , appearRate , speed , maximumDisplacement , targetYawVelocity , defaultAngularSpeed , preview , forceToApply , torqueToApply , targetPosition , targetRotation , velocity , angularVelocity ;
20
+ let scene , camera , renderer , composer , outline , bloom , shockwaveTime , intensityBasedCircleGrid , objects , clock , time , mouse , picker , appearRate , speed , maximumDisplacement , targetYawVelocity , defaultAngularSpeed , preview , forceToApply , torqueToApply , targetPosition , targetRotation , velocity , angularVelocity ;
22
21
23
22
function SetObjectVisibility ( object , visible ) {
24
23
object . visible = visible ;
@@ -88,7 +87,6 @@ function onWindowResize() {
88
87
composer . setSize ( dimensions1 . width , dimensions1 . height ) ;
89
88
intensityBasedCircleGrid . setSize ( dimensions1 . width , dimensions1 . height ) ;
90
89
outline . setSize ( dimensions1 . width , dimensions1 . height ) ;
91
- depthMask . setSize ( dimensions1 . width , dimensions1 . height ) ;
92
90
93
91
intensityBasedCircleGrid . uniforms . iResolution . value . set (
94
92
dimensions1 . width ,
@@ -182,9 +180,6 @@ export class ModelPreviewer{
182
180
dimensions ( ) . width ,
183
181
dimensions ( ) . height
184
182
) ;
185
- renderTarget . depthBuffer = true ;
186
- renderTarget . depthTexture = new THREE . DepthTexture ( ) ;
187
- renderTarget . depthTexture . type = THREE . UnsignedShortType ;
188
183
composer = new EffectComposer ( renderer , renderTarget ) ;
189
184
190
185
// Render pass
@@ -205,20 +200,12 @@ export class ModelPreviewer{
205
200
outlineUniforms . isDarkMode . value = true ; // TODO: Uhhr, why is this set always true?
206
201
// Multiple scalar values packed into one uniform: Depth bias, depth multiplier
207
202
outlineUniforms . multiplierParameters . value . x = 0.5 ;
208
- outlineUniforms . multiplierParameters . value . y = 100 ;
203
+ outlineUniforms . multiplierParameters . value . y = 75 ;
209
204
210
205
// Bloom
211
206
bloom = new BloomPass ( 1 , 25 , 4 ) ; // Strength, Kernel Size, Sigma
212
207
composer . addPass ( bloom ) ;
213
208
214
- // Depth Mask
215
- depthMask = new DepthMaskPass (
216
- new THREE . Vector2 ( dimensions ( ) . width , dimensions ( ) . height ) ,
217
- scene ,
218
- camera
219
- ) ;
220
- composer . addPass ( depthMask ) ;
221
-
222
209
// Intensity Based Circle Grid
223
210
intensityBasedCircleGrid = new ShaderPass ( IntensityBasedCircleGridShader ) ;
224
211
intensityBasedCircleGrid . uniforms . IS_DARK_MODE . value = isDarkMode ;
0 commit comments