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

Examples: Add transition effect. #28174

Merged
merged 4 commits into from
Apr 23, 2024
Merged

Conversation

linbingquan
Copy link
Contributor

Related issue: #XXXX

Description

refactor Transition to RenderTransitionPass.js.

If this PR has any problem, please tell me.

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 22, 2024

For testing: https://rawcdn.githack.com/linbingquan/three.js/dev-transition/examples/webgl_postprocessing_crossfade.html

With this refactoring the FPS falls into the 40-50 FPS range during the transition. With the existing version on dev, I get straight 60 FPS. Do you mind having a look?

@linbingquan
Copy link
Contributor Author

For testing: https://rawcdn.githack.com/linbingquan/three.js/dev-transition/examples/webgl_postprocessing_crossfade.html

With this refactoring the FPS falls into the 40-50 FPS range during the transition. With the existing version on dev, I get straight 60 FPS. Do you mind having a look?

Thank you for your test. I repeated the same situation on my laptop.

TBH, my laptop is not high performance, only has 30FPS. The difference in values is not significant.

I checked the code, I found unnecessary animate() and removed it, call renderer.setAnimationLoop( animate ) at the end.

I tested them locally and the FPS values were close, but I am not sure it will solve the problem.

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 22, 2024

I tested them locally and the FPS values were close, but I am not sure it will solve the problem.

The latest version seems to be fixed 👍 .

@Mugen87 Mugen87 added this to the r164 milestone Apr 22, 2024
@Mugen87 Mugen87 merged commit b7b70a8 into mrdoob:dev Apr 23, 2024
11 checks passed
@Methuselah96 Methuselah96 mentioned this pull request Apr 23, 2024
27 tasks
@mrdoob
Copy link
Owner

mrdoob commented Apr 23, 2024

Should we rename webgl_postprocessing_crossfade.html to webgl_postprocessing_transition.html?

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 24, 2024

Sounds good to me!

@linbingquan
Copy link
Contributor Author

Should we rename webgl_postprocessing_crossfade.html to webgl_postprocessing_transition.html?

Let me to do it.

@Mugen87
Copy link
Collaborator

Mugen87 commented Jun 4, 2024

@linbingquan It seems the effect is broken after the first transition, see https://threejs.org/examples/webgl_postprocessing_transition.

Do you mind having a look?

@Mugen87
Copy link
Collaborator

Mugen87 commented Jun 4, 2024

This is actually a regression of #28391 since tween.js now animates the transition parameter differently.

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

Successfully merging this pull request may close these issues.

3 participants