bevyengine / bevyengine/bevy

Mesh2d `world_normal` and `world_tangent` computation is incorrect

Open
#24,614 0 comments 0 reactions 0 assignees View on GitHub
A-Rendering C-Bug S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version and features

main

## What you did

Run `cargo r --example mesh2d` with tangents
```rust
Rectangle::default()
.mesh()
.build()
.with_generated_tangents()
.unwrap(),
```

## What went wrong

The `world_normal` and `world_tangent` in vertex output are incorrect, I expect they are the same as mesh normal and tangent:

Image

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with `cargo r --example mesh2d` using `Rectangle::default().mesh().build().with_generated_tangents()`. Start by tracing how the mesh2d example produces vertex `world_normal` and `world_tangent` values. Done means those outputs match the mesh normal and tangent shown in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.