![]() # Objective Closes #18383 ## Solution Given the 2 votes (me and @komadori ) for making angle-weighted normals the default, I went ahead and did so, moving the face-weighted implementation to the new `Mesh::compute_face_weighted_normals` method. I factored out the common code between both into `Mesh::compute_custom_smooth_normals`, which I went ahead and made public to make it easier for users to add any other weighting methods they might come up with. If any of these decisions are undesirable for any reason, please let me know and I will gladly make modifications. ## Testing & Showcase I made a demo that exaggerates the difference at [Waridley/bevy_smooth_normals_comparison](https://github.com/Waridley/bevy_smooth_normals_comparison). Screenshots included in the readme. Another way it could be demonstrated is via scaling a mesh along its normals, like for generating outline meshes with inverted faces. I'd be willing to make a demo for that as well. I also edited and renamed the `compute_smooth_normals` tests to use face-weighted normals, and added a new test for angle-weighted ones which validates that all normals of a unit cube have each component equal to `(±1 / √3) ± f32::EPSILON`. ## Migration Guide #16050 already did not mention a migration guide, and it is not even in a stable release yet. If this lands in a 0.16 RC, updating from RC1 would probably not require any changes in the vast majority of cases, anyway. If someone really needs face-weighted normals, they can switch to `.compute_face_weighted_normals()` or `.with_computed_face_weighted_normals()`. And if for some reason they really liked the old count-weighted implementation from 0.15, there is an example in the docs for `compute_custom_smooth_normals`. |
||
---|---|---|
.. | ||
migration-guides | ||
release-notes | ||
migration_guides_template.md | ||
migration_guides.md | ||
README.md | ||
release_notes_template.md | ||
release_notes.md |
Release Content
This directory contains drafts of documentation for the current development cycle, which will be published to the website during the next release. You can find more information in the release notes and migration guides files.