From c16bcc1f7a06e38140e659125e25e06487c5d21c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 3 Nov 2022 12:27:13 +0100 Subject: [PATCH] [wip] fix shader error on ES --- src/Magnum/Shaders/Line.vert | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/Shaders/Line.vert b/src/Magnum/Shaders/Line.vert index 556c34559..29e0dc321 100644 --- a/src/Magnum/Shaders/Line.vert +++ b/src/Magnum/Shaders/Line.vert @@ -345,7 +345,7 @@ void main() { dot(normalize(direction), normalize(neighborDirection)) < -0.99 || /* Neighbor segment too short */ // TODO why the 2*?? why the square?? - (abs(dot(perpendicular(normalize(direction))*viewportSize/2.0, (neighborEndPoint - firstPoint)*viewportSize/2.0)) < 2*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 // calculate proper distance from a line segment instead or do // something else entirely ffs