Gizmos::line() with a transparent color display weird
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
0.13.2
## Content
I called `Gizmos#line()` with a transparent white color.
```rust
#[derive(Resource, Clone, Reflect)]
pub struct EditModeConfig {
pub weak_lines_color: Color,
pub lines_color: Color,
pub hlt_lines_color: Color,
pub hlt_rect_move_speed: f32,
}
impl Default for EditModeConfig {
fn default() -> Self {
Self {
weak_lines_color: Color::rgba_linear(1., 1., 1., 0.06),
// I tried both rgba() and rgba_linear(), neither works
lines_color: Color::rgba_linear(1., 1., 1., 0.3),
hlt_lines_color: Color::rgba_linear(1., 1., 1., 0.5),
hlt_rect_move_speed: 15.0,
}
}
}
```
It displayed like this. These lines were not transparent.
---
But after I clicked this button in bevy-inspector-egui's color panel, lines displayed correctly.
Contributor guide
Research direction
Start by reproducing the reported Gizmos#line() behavior on Bevy 0.13.2 using the transparent Color::rgba_linear values shown in the issue, then compare it with the result after the bevy-inspector-egui color-panel interaction. Done means transparent line colors render with the expected opacity, with a regression test covering the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100