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

Effects / passes are not guaranteed to be constructed in the order composed #306

Open
gkjohnson opened this issue Dec 15, 2024 · 0 comments

Comments

@gkjohnson
Copy link

I noticed this when working on another project but when adding, removing, then readding (or basically having to reconstruct a effect) single effect it's not guaranteed to show up in the effect layering in the same order as composed.

Here's a simple example showing the issue based on the CSB from the README. The effects are composed like so:

<EffectComposer ...>
        <ToneMapping mode={ToneMappingMode.AgXToneMapping} />
        <DepthOfField .../>
</EffectComposer>

but when logging the effects in the effect pass they are constructed in the following order:

['DepthOfFieldEffect', 'ToneMappingEffect']

I suspect it may have something to do with these lines and the use of the internal useInstanceHandle to get access to the child effect which may not return the children in a consistent order.

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

1 participant