Dashed stroked paths are a widely-used feature found in the vast majority of vector drawing software and libraries. They allow, for example, highlighting a given path such as the cur- rent selection in drawing software or distinguishing curves in the case of a scientific plotting package. This paper introduces a shader-based method for rendering arbitrary dash patterns along any continuous polyline (smooth or broken). The proposed method does not tessellate individual dash patterns and allows for fast and nearly accurate rendering of any user-defined dash pattern and caps. Benchmarks indicates a slowdown ratio between 1.1 and 2.1 with an increased memory consumption between 3 and 6. Furthermore, the method can be used for solid thick polylines with correct caps and joins with only a slowdown of factor 1.1.
[1]
Adam Finkelstein,et al.
Self-similar texture for coherent line stylization
,
2010,
NPAR.
[2]
Adam Finkelstein,et al.
Two Fast Methods for High-Quality Line Visibility
,
2010,
IEEE Transactions on Visualization and Computer Graphics.
[3]
Jeff Bolz,et al.
GPU-accelerated path rendering
,
2012,
ACM Trans. Graph..
[4]
Paul Asente.
Folding Avoidance in Skeletal Strokes
,
2010,
SBIM.
[5]
Matt Pharr,et al.
Gpu gems 2: programming techniques for high-performance graphics and general-purpose computation
,
2005
.
[6]
Lee Markosian,et al.
Real-time nonphotorealistic rendering
,
1997,
SIGGRAPH.