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

Webgpu_clipping is getting worse #30566

Open
WREQI opened this issue Feb 20, 2025 · 2 comments
Open

Webgpu_clipping is getting worse #30566

WREQI opened this issue Feb 20, 2025 · 2 comments

Comments

@WREQI
Copy link

WREQI commented Feb 20, 2025

Description

Web GPU clipping requires creating a new group and adding objects to it, which introduces new objects and changes the tree like data structure of objects in the scene, making it no longer compatible with the clipping of old projects and reducing usability
Image

Image

Solution

Expectation: No need to create a new group, it will not damage the scene tree structure

Alternatives

use Material prop clippingPlanes?

Additional context

No response

@mrdoob
Copy link
Owner

mrdoob commented Feb 20, 2025

making it no longer compatible with the clipping of old projects and reducing usability

Do you mind sharing more details about this?

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 20, 2025

Some context: The API has been changed on purpose since the previous approach in WebGLRenderer made it hard to implement hierarchical clipping which is actually often want in apps. By having ClippingGroup, it's easy to "encode" the clipping into the scene graph.

Defining global clipping on the renderer level was always problematic when doing multi-pass rendering since you have to toggle clipping properties depending on the renderer state which tends to be error prone.

With ClippingGroup, you should not loose any type of functionality. Instead you get more flexibility and an easier setup when using hierarchical clipping.

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

3 participants