Very Large Material 2d Mesh diagonal artifact issue
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
v0.13.2
- Clicking the pencil button toggles the Visibility of a very large MaterialMesh2dBundle as seen in the video.
```rs
parent.spawn((
MaterialMesh2dBundle {
mesh: meshes.add(Rectangle::default()).into(),
transform: Transform::default().with_scale(Vec3::splat(9999999999.)),
material: materials.add(Color::Rgba {
red: 0.5,
green: 0.5,
blue: 0.5,
alpha: 0.5,
}),
visibility: Visibility::Hidden,
..default()
},
DrawOverlayMesh,
));
```
- along the right top diagonal I'll get weird things happen if I'm in certain spots.
- Maybe a better way to do what I'm doing, (feel free to let me know), but I figured this is also a bug.
https://github.com/bevyengine/bevy/assets/7761473/9109a223-6289-43ca-940a-3a71b9b06088
Contributor guide
Research direction
Start by reproducing the issue with the provided MaterialMesh2dBundle example on Bevy v0.13.2, toggling Visibility on the very large scaled mesh and observing the diagonal artifact. Trace the 2D mesh rendering path and visibility handling to identify why certain camera positions produce incorrect results. Done means the artifact no longer appears in the reported scenario without breaking normal mesh visibility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100