Skip to content
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 work properly inside of drei View component. #285

Open
closedcontour opened this issue Jun 7, 2024 · 1 comment

Comments

@closedcontour
Copy link

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: master...closedcontour:react-postprocessing:effect-composer-sizing. I'm happy to open a PR if you'd like. Thanks.

ynamite added a commit to ynamite/react-postprocessing that referenced this issue Oct 4, 2024
get current canvas output size and set composer size to this. Required to work with Drei's View.tsx, see pmndrs#285
@ynamite
Copy link

ynamite commented Oct 4, 2024

@closedcontour I took the liberty of creating a PR with your code. Works great on my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants