|
|
|
@ -375,14 +375,14 @@ void main() { |
|
|
|
|
|
|
|
|
|
|
|
/* Decide about the line direction vector `d` and edge direction vector `e` |
|
|
|
/* Decide about the line direction vector `d` and edge direction vector `e` |
|
|
|
from the `pointMarkerComponent` input. Quad corners 0 and 1 come from |
|
|
|
from the `pointMarkerComponent` input. Quad corners 0 and 1 come from |
|
|
|
segment endpoint A, are marked with the POINT_MARKER_BEGIN_MASK bit and |
|
|
|
segment endpoint A, are marked with the ANNOTATION_BEGIN_MASK bit and so |
|
|
|
so their line direction is taken from `nextPosition`, quad corners 2 and |
|
|
|
their line direction is taken from `nextPosition`, quad corners 2 and 3 |
|
|
|
3 come from B and are *not* marked with POINT_MARKER_BEGIN_MASK and so |
|
|
|
come from B and are *not* marked with ANNOTATION_BEGIN_MASK and so their |
|
|
|
their line direction is taken from `previousPosition`, with the |
|
|
|
line direction is taken from `previousPosition`, with the direction |
|
|
|
direction being always from point A to point B. The edge direction is |
|
|
|
being always from point A to point B. The edge direction is then |
|
|
|
then perpendicular to the line direction, with points 0 and 2 marked |
|
|
|
perpendicular to the line direction, with points 0 and 2 marked with |
|
|
|
with POINT_MARKER_UP_MASK using it directly, while points 1 and 3 |
|
|
|
ANNOTATION_UP_MASK using it directly, while points 1 and 3 don't have |
|
|
|
don't have POINT_MARKER_UP_MASK and have to negate it: |
|
|
|
ANNOTATION_UP_MASK and have to negate it: |
|
|
|
|
|
|
|
|
|
|
|
^ ^ |
|
|
|
^ ^ |
|
|
|
e e |
|
|
|
e e |
|
|
|
@ -396,7 +396,7 @@ void main() { |
|
|
|
e e |
|
|
|
e e |
|
|
|
v v |
|
|
|
v v |
|
|
|
|
|
|
|
|
|
|
|
The POINT_MARKER_CAP_MASK is then used below. */ |
|
|
|
The ANNOTATION_CAP_MASK is then used below. */ |
|
|
|
highp const vec2 lineDirection = bool(annotation & ANNOTATION_BEGIN_MASK) ? |
|
|
|
highp const vec2 lineDirection = bool(annotation & ANNOTATION_BEGIN_MASK) ? |
|
|
|
transformedNextPosition - transformedPosition : |
|
|
|
transformedNextPosition - transformedPosition : |
|
|
|
transformedPosition - transformedPreviousPosition; |
|
|
|
transformedPosition - transformedPreviousPosition; |
|
|
|
|