react-postprocessing
react-postprocessing copied to clipboard
EffectComposer doesn't work properly inside of drei View component.
EffectComposer.tsx sets the size of the renderer based on the value of size
from useThree()
. When using the View component from react-three-fiber
, that size
value doesn't necessarily track the size of the underlying canvas which results in the view being improperly offset.
It's not entirely clear that the fix should be in this library, but it seemed like the cleanest to me.
I'm using this fix: https://github.com/pmndrs/react-postprocessing/compare/master...closedcontour:react-postprocessing:effect-composer-sizing. I'm happy to open a PR if you'd like. Thanks.