Celestia
Celestia copied to clipboard
Orbits have gaps when lines are triangulated
Describe the bug
First I found this bug with #1402 and I realized that I forgot to add NextPos for the last 2 vertices. But it persisted then I checked master
and found it there.
To Reproduce Steps to reproduce the behavior:
- Update
Renderer::shouldDrawLineAsTriangles()
to always returntrue
or use a device with max line thickness equal to1px
. - Enable planet orbits
- Disable fading orbits
- Scroll to see all planets of the Solar system.
- See error
Expected behavior No gaps.
Screenshots
Desktop (please complete the following information):
- OS: any
- Frontend: any
- Version: 1.7.0
Additional context The same orbits with lines drawn as lines doesn't have gaps.
it seems vec2 transform = normalize(nextPos.xy - thisPos.xy);
resulted in nan, as thisPos and nextPos are the same.
one way to mitigate this issue might be passing in previous point as well, if we see nextPos == thisPos, calculate with prevPos == thisPos.