File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,12 +56,20 @@ class DenoiseNode extends TempNode {
5656 */
5757 this . normalNode = normalNode ;
5858
59+ /**
60+ * The internal noise texture.
61+ *
62+ * @private
63+ * @type {DataTexture }
64+ */
65+ this . _noiseTexture = generateDefaultNoise ( ) ;
66+
5967 /**
6068 * The node represents the internal noise texture.
6169 *
6270 * @type {TextureNode }
6371 */
64- this . noiseNode = texture ( generateDefaultNoise ( ) ) ;
72+ this . noiseNode = texture ( this . _noiseTexture ) ;
6573
6674 /**
6775 * The luma Phi value.
@@ -252,6 +260,18 @@ class DenoiseNode extends TempNode {
252260
253261 }
254262
263+ /**
264+ * Frees internal resources. This method should be called
265+ * when the effect is no longer required.
266+ */
267+ dispose ( ) {
268+
269+ this . _noiseTexture . dispose ( ) ;
270+
271+ super . dispose ( ) ;
272+
273+ }
274+
255275}
256276
257277export default DenoiseNode ;
You can’t perform that action at this time.
0 commit comments