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

normalized BufferAttribute and BufferGeometryUtils.mergeVertices get wrong result #24575

Closed
danborutori opened this issue Sep 1, 2022 · 2 comments · Fixed by #24577
Closed
Assignees

Comments

@danborutori
Copy link

Using BufferGeometryUtils.mergeVertices on geometry with normalized attribute cause values in result buffer normalized twice.

line 604: newarray.push( attribute getterFunc );
Using normalized values returned from getterFunc to construct newarray.

line: 637: const attribute = new THREE.BufferAttribute( buffer, oldAttribute.itemSize, oldAttribute.normalized );
Values are not denormalized when constructing a new BufferAttribute.

Platform:

  • Device: [Desktop, Mobile]
  • OS: [Windows, MacOS, Linux, Android, iOS]
  • Browser: [Chrome, Firefox, Safari, Edge]
  • Three.js version: [r144]
@donmccurdy donmccurdy self-assigned this Sep 1, 2022
@donmccurdy
Copy link
Collaborator

Thanks @danborutori! I'll look into this.

Though aside, I think it's a good use case for @gkjohnson's proposal in #24515.

@donmccurdy
Copy link
Collaborator

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

Successfully merging a pull request may close this issue.

3 participants