File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
19
19
DepthDownsamplingPass ,
20
20
Effect ,
21
21
Pass ,
22
+ EffectAttribute ,
22
23
} from 'postprocessing'
23
24
import { isWebGL2Available } from 'three-stdlib'
24
25
@@ -136,7 +137,13 @@ export const EffectComposer = React.memo(
136
137
137
138
if ( child instanceof Effect ) {
138
139
const effects : Effect [ ] = [ ]
139
- while ( children [ i ] instanceof Effect ) effects . push ( children [ i ++ ] as Effect )
140
+ while (
141
+ // Filter to effects
142
+ children [ i ] instanceof Effect &&
143
+ // Don't merge convolution effects
144
+ ( ( children [ i ] as Effect ) . getAttributes ( ) & EffectAttribute . CONVOLUTION ) !== 0
145
+ )
146
+ effects . push ( children [ i ++ ] as Effect )
140
147
i --
141
148
142
149
const pass = new EffectPass ( camera , ...effects )
You can’t perform that action at this time.
0 commit comments