|
@@ -30,7 +30,7 @@ class AfterimagePass extends Pass {
|
|
|
magFilter: NearestFilter,
|
|
|
} );
|
|
|
|
|
|
- this.shaderMaterial = new ShaderMaterial( {
|
|
|
+ this.compFsMaterial = new ShaderMaterial( {
|
|
|
|
|
|
uniforms: this.uniforms,
|
|
|
vertexShader: this.shader.vertexShader,
|
|
@@ -38,10 +38,10 @@ class AfterimagePass extends Pass {
|
|
|
|
|
|
} );
|
|
|
|
|
|
- this.compFsQuad = new FullScreenQuad( this.shaderMaterial );
|
|
|
+ this.compFsQuad = new FullScreenQuad( this.compFsMaterial );
|
|
|
|
|
|
- const material = new MeshBasicMaterial();
|
|
|
- this.copyFsQuad = new FullScreenQuad( material );
|
|
|
+ this.copyFsMaterial = new MeshBasicMaterial();
|
|
|
+ this.copyFsQuad = new FullScreenQuad( this.copyFsMaterial );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -85,6 +85,19 @@ class AfterimagePass extends Pass {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ dispose() {
|
|
|
+
|
|
|
+ this.textureComp.dispose();
|
|
|
+ this.textureOld.dispose();
|
|
|
+
|
|
|
+ this.compFsMaterial.dispose();
|
|
|
+ this.copyFsMaterial.dispose();
|
|
|
+
|
|
|
+ this.compFsQuad.dispose();
|
|
|
+ this.copyFsQuad.dispose();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
export { AfterimagePass };
|