Gizmos line strip for non solid line style has noticable gaps
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
> It looks like the animation has noticeable breaks between line segments, is that fixable using line_fraction in the fragment shader to make the segments agree on dot/dash positions?
I've also noticed this already back in the day when I was still working on the last two attempts at this PR. This has nothing to do with the animation. It is a fundamental issue with the shader used to render the gizmos and the more complex gizmo shape methods.
Currently most of the gizmo render methods are based on the line method as a fundamental building block. So line strings are basically just a bunch of lines unaware of each other. This is also reflected in the shader code which always just draws a single line and makes no connection between them.
I will spin an issue out of this comment so we have a better place to discuss this.
_Originally posted by @JasmineLowen in https://github.com/bevyengine/bevy/issues/25655#issuecomment-5587700149_
Here's a screenshot:
It is especially visible with the animated gizmos from the linked issue
Contributor guide
Research direction
Start by tracing the gizmo line method, the line-strip render methods, and the shader code that draws each line segment. Reproduce the visible gaps with non-solid and animated gizmos, then determine how connected segments should share dot/dash positions. Done means line strips render without noticeable breaks while preserving the intended non-solid line style.
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
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100