react-postprocessing icon indicating copy to clipboard operation
react-postprocessing copied to clipboard

EffectComposer doesn't play nicely with drei/View

Open tarabishy2020 opened this issue 2 years ago • 8 comments

Whenever Effects are placed as part of a View, nothing is rendered properly.

https://codesandbox.io/s/view-skissor-forked-g84lwh?file=/src/App.js

tarabishy2020 avatar Dec 05 '22 09:12 tarabishy2020

Did someone find a solution to make this work?

ThimoDEV avatar May 07 '23 09:05 ThimoDEV

Faced the same problem.

denkravchu avatar Aug 21 '23 16:08 denkravchu

Me too.

ghost avatar Aug 24 '23 13:08 ghost

Me too.

Partable solution.

I have not yet figured out how to use the EffectComposer if you overlay two scenes on top of each other, because the alpha channel is lost. However, if an alpha channel is not required, the best solution i found would be to make your own view component and use the THREEJS effectComposer inside it, like in this example https://codesandbox.io/s/r3f-hud-forked-z625d2?file=/src/index.js (just add there threejs scissors and ull get what u need).

Also i tried using EffectComposer from postprocessing library, sometimes it works sometimes it doesn’t, but it’s also quite possible to set it up for a specific situation by playing in the priority for rendering.

I'll post again if Ill find a better solution.

denkravchu avatar Aug 24 '23 13:08 denkravchu