-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EffectComposer doesn't play nicely with drei/View #165
Comments
Did someone find a solution to make this work? |
Faced the same problem. |
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. |
Any updates on this? The codesandbox from @denkravchu is gone, sadly |
Have solved this similarly to @denkravchu, by forking View and using a EffectComposer in there (in the Container component) in stead of the regular renderer (on this line https://github.com/pmndrs/drei/blob/71864076c35c3b4f201cd9518da873eff7dc90a1/src/web/View.tsx#L138) |
@timmevandermeer thanks a lot! |
Now EffectComposer is working with the original View.tsx from Drei. It requires a wrapper that basically takes over EffectComposer rendering and renders a contents view to a texture to handle transparency: Some more info here: pmndrs/drei#1413 |
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
The text was updated successfully, but these errors were encountered: