File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,13 @@ class EffectComposer<TRenderTarget extends WebGLRenderTarget = WebGLRenderTarget
195195
196196 this . setSize ( this . _width , this . _height )
197197 }
198+
199+ public dispose ( ) {
200+ this . renderTarget1 . dispose ( )
201+ this . renderTarget2 . dispose ( )
202+
203+ this . copyPass . dispose ( )
204+ }
198205}
199206
200207export { EffectComposer }
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ class Pass {
2424 ) : void {
2525 console . error ( 'THREE.Pass: .render() must be implemented in derived pass.' )
2626 }
27+
28+ public dispose ( ) { }
2729}
2830
2931// Helper for passes that need to fill the viewport with a single quad.
Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ class ShaderPass extends Pass {
5252 this . fsQuad . render ( renderer )
5353 }
5454 }
55+
56+ public dispose ( ) {
57+ this . fsQuad . dispose ( )
58+ this . material . dispose ( )
59+ }
5560}
5661
5762export { ShaderPass }
You can’t perform that action at this time.
0 commit comments