fix: preserve vertex attributes with smooth normals - #9233
Srinidhi444 wants to merge 8 commits into
Conversation
Continuous ReleaseCDN linkPublished PackagesCommit hash: 4bae8cb Previous deploymentsThis is an automated message. |
davepagurek
left a comment
There was a problem hiding this comment.
Logic looks good! To confirm that the normals themselves haven't changed since before, would you be up for adding a visual test with maybe normalMaterial() on a shape with computeNormals(SMOOTH) applied so that we can more easily visually inspect it? If you need some example geometry, there's an example sketch in the "smooth shading" section of https://p5js.org/tutorials/custom-geometry/ that we could borrow.
| uniqueVertices.push(vertex); | ||
| } | ||
|
|
||
| originalToUnique[i] = vertexIndices[key]; |
sure |
hey @davepagurek added the requested visual test for computeNormals(SMOOTH) using normalMaterial() on the warped tube geometry from the smooth shading example. |
|
Hi @Srinidhi444! When you add visual tests, you have to run them locally and commit the image files that get added to the project. The idea is that those images remain checked into source control so that when future changes happen, the tests are rerun and compared to those images to make sure that nothing breaks. |
hey @davepagurek my bad didn't knew that i have committed the necessary changes let me know if they are correct. |

Resolves #9205
Changes:
computeNormals(SMOOTH)so it no longer permanently deduplicates geometry vertices based only on position.Screenshots of the change:

PR Checklist
npm run lintpasses