-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add test for mesh transformations #18194
base: main
Are you sure you want to change the base?
Conversation
CI failure appears unrelated to the PR. https://github.com/bevyengine/bevy/actions/runs/13727867039/job/38398331235?pr=18194#logs
|
rather than using anisotropy, didn't we use to have a debug view to show tangents/normals? |
The I also considered drawing a per-vertex gizmo. But that doesn't cover the third test case which validates transforms in the shader. So my guess is that anisotropy is the least worst choice right now. |
name = "transform_mesh" | ||
path = "tests/3d/transform_mesh.rs" | ||
doc-scrape-examples = true | ||
required-features = ["pbr_anisotropy_texture"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that requiring feature pbr_anisotropy_texture
is either a bug in the shader or the documentation. The example doesn't actually use anisotropy textures, but if I disable them then anisotropy doesn't work at all.
I'll file that as a bug if this PR goes through.
Objective
Add a test that will repro issues with mesh transformations, like #17992.
Solution
The test transforms a mesh in three different ways. Each transformation should have the same visual result.
The screenshot shows the test reproducing #17992. Mesh 1 should have matched mesh 2 and 3.
Problems
Right now the test is not suitable for screenshot comparison - the light is animated.
Testing
Tested on Win10/Vulkan/Nvidia.
cargo run --example transform_mesh --features "pbr_anisotropy_texture"