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

Nodes: Add anaglyph and parallax barrier pass nodes. #29184

Merged
merged 3 commits into from
Aug 21, 2024
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 20, 2024

Related issue: #29173

Description

Adds pass nodes for anaglyph and parallax barrier effects. Instead of creating an example per node class, the effects are selectable in webgpu_display_stereo.

@Mugen87 Mugen87 changed the title Nodes: Add anaglyph and parallax barrier pass nodes.y Nodes: Add anaglyph and parallax barrier pass nodes. Aug 20, 2024
@Mugen87 Mugen87 added this to the r168 milestone Aug 20, 2024
Copy link

github-actions bot commented Aug 20, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
685.4 kB (169.7 kB) 685.4 kB (169.7 kB) +0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
462 kB (111.4 kB) 462 kB (111.4 kB) +0 B

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 20, 2024

I'm not sure why webgpu_backdrop_water fails with this PR. AFAICS, the PR does not touch related logic...

@cmhhelgeson
Copy link
Contributor

Would it make sense to collapse these classes into a shared StereoPassNode or class? It seems like there's lots of shared functionality between anaglyph and parallax?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 20, 2024

There is already StereoPassNode but it works differently than AnaglyphPassNode and ParallaxBarrierPassNode. So it would also be required to name a shared module differently.

This kind of optimization is something that I would consider in a subsequent PR though.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 21, 2024

I've updated the screenshot for webgpu_backdrop_water and it seems there is some sort of timing issue. In the new screenshot, the spheres are at different positions. Not sure why this happens. If this is somehow related to the latest performance improvements, I wonder why the CI did not fail earlier...

@Mugen87 Mugen87 merged commit 1524acf into mrdoob:dev Aug 21, 2024
12 checks passed
@sunag
Copy link
Collaborator

sunag commented Aug 21, 2024

I've updated the screenshot for webgpu_backdrop_water and it seems there is some sort of timing issue. In the new screenshot, the spheres are at different positions. Not sure why this happens. If this is somehow related to the latest performance improvements, I wonder why the CI did not fail earlier...

Thanks @Mugen87, I also didn't understand exactly what happened, but it's good to see it working again.

@mrdoob
Copy link
Owner

mrdoob commented Aug 28, 2024

Hmm... How come we're adding so many thing to src? Shouldn't these nodes be addons?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 28, 2024

I think it was some sort of "unspoken agreement" to add node classes in the core. We should establish a policy like in #29187 (comment) to address this issue.

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.

4 participants