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 {
1919 DepthDownsamplingPass ,
2020 Effect ,
2121 Pass ,
22+ EffectAttribute ,
2223} from 'postprocessing'
2324import { isWebGL2Available } from 'three-stdlib'
2425
@@ -136,7 +137,13 @@ export const EffectComposer = React.memo(
136137
137138 if ( child instanceof Effect ) {
138139 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 )
140147 i --
141148
142149 const pass = new EffectPass ( camera , ...effects )
You can’t perform that action at this time.
0 commit comments