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

Implement AfterImageEffect #665

Open
Tracked by #600
TamagawaJousui opened this issue Oct 26, 2024 · 1 comment
Open
Tracked by #600

Implement AfterImageEffect #665

TamagawaJousui opened this issue Oct 26, 2024 · 1 comment
Labels
feature request New feature request
Milestone

Comments

@TamagawaJousui
Copy link

Is your feature request related to a problem?

I'm try to use afterimagepass in this library, so I adopted it from three.js and glued it anyway since I'm in very hurry.
I planed to formally rewrite it in a suitable style and make PR later.

you can check my dirty work here.

https://github.com/III-Exhibition/visual-demo/blob/df1e0c8174a3a4d077ec66070aa76ad74e8921af/AfterimagePass.js

Describe the solution you'd like

Is it nice to have? Is anyone else doing same work?

Describe alternatives you've considered

Additional context

Any advice would be kindly appreciated.

@TamagawaJousui TamagawaJousui added the feature request New feature request label Oct 26, 2024
@vanruesc
Copy link
Member

There haven't been any plans to add AfterImageEffect yet, but I think it's fine to add it.

Feel free to prepare a PR if you'd like to work on it, but please note that this should be implemented as an Effect instead of a Pass. It should also be implemented for v7 because v6 is in maintenance mode at this point.

I'd recommend implementing it as a simple Effect that uses an internal pass to generate the after-image texture. The effect can just use the existing texture.frag shader as its main fragmentShader to auto blend the map with the input image. You can check TextureEffect for reference (only need to set the map uniform).

The internal pass should probably be called FeedbackPass because it might be useful for other effects in the future. Likewise, the feedback copy shader used by that pass should be called FeedbackMaterial.

For the demo, you can copy tone-mapping and add a simple rotating mesh.

@vanruesc vanruesc changed the title Is afterimagepass nice to have? Implement AfterImageEffect Nov 2, 2024
@vanruesc vanruesc added this to the v7 milestone Nov 2, 2024
@vanruesc vanruesc mentioned this issue Nov 2, 2024
33 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants