Skip to content

fix: preserve vertex attributes with smooth normals - #9233

Open
Srinidhi444 wants to merge 1 commit into
processing:mainfrom
Srinidhi444:fix/smooth-normals-preserve-attributes
Open

Srinidhi444 wants to merge 1 commit into
processing:mainfrom
Srinidhi444:fix/smooth-normals-preserve-attributes

Conversation

@Srinidhi444

Copy link
Copy Markdown

Resolves #9205

Changes:

  • Fixed computeNormals(SMOOTH) so it no longer permanently deduplicates geometry vertices based only on position.
  • Smooth normals are calculated using temporary position-based vertex groups and then mapped back to the original vertices.
  • This preserves per-vertex attributes such as UVs while still allowing vertices at the same position to share smooth normals.
  • Added a unit test covering vertices with the same position but different UV coordinates.

Screenshots of the change:
image

PR Checklist

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.

[p5.js 2.0+ Bug Report]: computeNormals(SMOOTH) destroys uv attribute

1 participant