|
|
|
@ -345,11 +345,11 @@ void main() { |
|
|
|
dot(normalize(direction), normalize(neighborDirection)) < -0.99 || |
|
|
|
dot(normalize(direction), normalize(neighborDirection)) < -0.99 || |
|
|
|
/* Neighbor segment too short */ |
|
|
|
/* Neighbor segment too short */ |
|
|
|
// TODO why the 2*?? why the square?? |
|
|
|
// TODO why the 2*?? why the square?? |
|
|
|
(abs(dot(perpendicular(normalize(direction))*viewportSize/2.0, (neighborEndPoint - firstPoint)*viewportSize/2.0)) < 2.0*edgeDistance*edgeDistance && |
|
|
|
((abs(dot(perpendicular(normalize(direction))*viewportSize/2.0, (neighborEndPoint - firstPoint)*viewportSize/2.0)) < 2.0*edgeDistance*edgeDistance) && |
|
|
|
// TODO this is a wrong attempt to handle colinear, needs to |
|
|
|
// TODO this is a wrong attempt to handle colinear, needs to |
|
|
|
// calculate proper distance from a line segment instead or do |
|
|
|
// calculate proper distance from a line segment instead or do |
|
|
|
// something else entirely ffs |
|
|
|
// something else entirely ffs |
|
|
|
dot(direction, neighborDirection) <= 0.0) |
|
|
|
(dot(direction, neighborDirection) <= 0.0)) |
|
|
|
) { |
|
|
|
) { |
|
|
|
edgeDirection = |
|
|
|
edgeDirection = |
|
|
|
(directionNormalized*capSign + |
|
|
|
(directionNormalized*capSign + |
|
|
|
|