-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
When using the WebGPU renderer, the second call to LineSegmentsGeometry.setPositions does not take effect #31056
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
Comments
Currently, every time I update the position, I first dispose the geometry and then create a new one, which works. But could this be related to some buffer management issue in WebGPU? Because it runs fine under WebGL. |
This is likely a duplicate of #30518 although we must update |
@Mugen87
So this approach doesn't work either? Is rebuilding mandatory? |
Ideally the implementation would not use |
So in this case, can LineSegmentsGeometry only call setPositions once per instance? Is there no way to make new geometry data take effect by setting some kind of flag? In the current implementation, LineSegmentsGeometry recreates a new InstancedInterleavedBuffer every time setPositions is called. |
My application is performance-sensitive. In WebGL, I would pre-allocate a large buffer and use drawRange to dynamically adjust the rendering range, thereby minimizing VRAM allocation/deallocation. But with WebGPU, this optimization approach seems no longer viable. |
When I introduced "fat" lines, I did not intend for users to call Perhaps the implementation needs to be revisited... |
there's a point I'm not entirely sure about. setAttribute will create a new GPUBuffer. This buffer shouldn't conflict with the previous one. Even when updating the buffer, shouldn't it be updating the buffer in memory? Before drawing, there should be a check, and then invoke WebGPU's writeBuffer. Why wouldn't this logic work? Naively, we’d typically use triple buffering as a solution. But from what I understand, Three.js’s architecture shouldn’t need to be this complex. Are there factors I’m unaware of here? |
Description
When using the WebGPU renderer, the second call to LineSegmentsGeometry.setPoints does not take effect
Reproduction steps
Add a line segment to the scene.
Code
Live example
Screenshots
No response
Version
r175
Device
Desktop
Browser
Chrome
OS
MacOS
The text was updated successfully, but these errors were encountered: