1- import { Event as Event3 , Material , Texture , WebGLRenderer } from "three" ;
1+ import { Event as Event3 , Material , Texture } from "three" ;
22import { Pass } from "../core/Pass.js" ;
33import { Effect } from "../effects/Effect.js" ;
44import { GBuffer } from "../enums/GBuffer.js" ;
@@ -76,19 +76,6 @@ export class EffectPass extends Pass<EffectMaterial> {
7676
7777 }
7878
79- override get renderer ( ) : WebGLRenderer | null {
80-
81- return super . renderer ;
82-
83- }
84-
85- override set renderer ( value : WebGLRenderer | null ) {
86-
87- super . renderer = value ;
88- this . updateMaterialTransparency ( ) ;
89-
90- }
91-
9279 override get subpasses ( ) : readonly Pass < Material | null > [ ] {
9380
9481 return super . subpasses ;
@@ -202,7 +189,6 @@ export class EffectPass extends Pass<EffectMaterial> {
202189
203190 // Get the material for the current effect combination.
204191 this . fullscreenMaterial = this . effectMaterialManager . getMaterial ( this . effects ) ;
205- this . updateMaterialTransparency ( ) ;
206192
207193 // Pick up new materials.
208194 for ( const material of this . effectMaterialManager . materials ) {
@@ -213,24 +199,6 @@ export class EffectPass extends Pass<EffectMaterial> {
213199
214200 }
215201
216- /**
217- * Updates the fullscreen material to use alpha blending if needed.
218- */
219-
220- private updateMaterialTransparency ( ) : void {
221-
222- if ( this . renderer === null ) {
223-
224- return ;
225-
226- }
227-
228- const alpha = this . renderer . getContext ( ) . getContextAttributes ( ) ?. alpha ?? false ;
229- const outputBuffer = this . output . defaultBuffer ?. value ?? null ;
230- this . fullscreenMaterial . transparent = ( alpha && outputBuffer === null ) ;
231-
232- }
233-
234202 /**
235203 * Updates the G-Buffer struct uniform.
236204 */
@@ -373,12 +341,6 @@ export class EffectPass extends Pass<EffectMaterial> {
373341
374342 }
375343
376- protected override onOutputChange ( ) : void {
377-
378- this . updateMaterialTransparency ( ) ;
379-
380- }
381-
382344 override checkRequirements ( ) : void {
383345
384346 for ( const effect of this . effects ) {
0 commit comments