Dashed Arc draws additional 1 pixel wide line

Avatar
  • updated
  • Under Review

Heya!

First off thanks for this amazing tool, I had a lot of fun playing around with it so far!

I found that when using the Dashed variant of a Ring Sector when using Fixed Count there appears to be an additional 1 pixel wide line.

Image 103


Image 98

It persists independent of the amount of dashes.

Image 99

The Round Caps also seem to originate from this line, if that helps narrowing it down:

Image 101

The round caps also only appear on one side. I am not sure if this is intended or not or if round caps should work with the Dashes at all.

Kind regards,

ScriptMage

Reporting a bug? please specify Unity version:
2020.1.4f1
Reporting a bug? please specify Shapes version:
2.3.0
Reporting a bug? please specify Render Pipeline:
Avatar
Freya Holmér creator
  • Under Review

this one is a little tricky to solve, because it involves special-casing the behavior for dashes specifically for arcs, in ways that it doesn't do otherwise

the behavior is technically correct but practically annoying. In the first picture, the small line is there because it's technically supposed to start a dash at that location. In the second picture, there is a round cap on both ends, it just so happens that the dash starts at one cap (the one on the right), but on the left side, it was just done with a dash, and now it's adding a space.

if you tweak dash offset you'll see how it works. I might be able to add a fix for this, but, special casing has a performance overhead that's not always worth it, especially when you can usually work around it in these cases with dash offsetting

Avatar
Script Mage

Ah I see, thank you! In that case I must have just misunderstood what is going on.
It is as you mention not a big problem. I just thought it was unintended behavior, because it was unintiutive to my layman's mind. 

Avatar
Freya Holmér creator

it's annoying and unintuitive to me too, don't worry~ it's very much an edge case, in every sense of the word, with no obvious solution that makes it work well without some very hardcoded cases like "if a dash is very close to not being visible on the ends of an arc that does not have round caps, then fade it out completely" directly in the shader, but also at the same time have dash offsets animate smoothly into being visible at that border, like, it gets kinda icky :c