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

BufferGeometry.setFromPoints() incompatible with WebGPURenderer #29452

Closed
aardgoose opened this issue Sep 20, 2024 · 2 comments
Closed

BufferGeometry.setFromPoints() incompatible with WebGPURenderer #29452

aardgoose opened this issue Sep 20, 2024 · 2 comments
Labels
Milestone

Comments

@aardgoose
Copy link
Contributor

aardgoose commented Sep 20, 2024

Description

With the ported webgpu_modifier_curve example, moving the line curve with the control ports is not correctly detected by the renderer, where this geometry's existing position attribute is replaced. (the renderer tracks the original attribute and does not detect the new attribute).

Reproduction steps

  1. Use geometry.setFromPoints() to change the vertices of an object.
  2. No changes in resulting render.

exposed by webgpu_modifier_curve if available

Code

n/a

Live example

Screenshots

Screenshot 2024-09-20 102450

Version

168dev

Device

No response

Browser

Chrome

OS

Windows

@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 22, 2024

I'm not sure I would consider this issue as a bug anymore. Before #29696, buffer attributes were replaced which we do not recommend since we can't support dispose() methods on buffer attribute level. Overwritten attributes could eventually produce a memory leak.

Buffer attributes should be created with sufficient space so they can hold up upcoming data. Updating data means updating the existing buffer, not overwriting it. If a buffer attribute gets obsolete, dispose() must be called on the entire geometry and then created a new one.

WebGPURenderer does not have to support this use case even if WebGLRenderer does. The more strict behavior of WebGPURenderer might lead to better workflows on app level.

@aardgoose
Copy link
Contributor Author

Agree with all points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants