Skip to main content
Edited tags.
Link
Vaillancourt
  • 16.4k
  • 17
  • 56
  • 61
deleted 44 characters in body; edited tags
Source Link
Kromster
  • 10.7k
  • 4
  • 55
  • 67

I am working with an OpenGL ES 2.0 shader and need to find the point of intersection between two line segments in 2D space. I receive them in terms of both coordinates of both lines. Because they are line segments I would also need to know if they actually intersect in the first place.

I can find many ways to do this but I would like to know what method would have the best performance in GLSL.

I am working with an OpenGL ES 2.0 shader and need to find the point of intersection between two line segments in 2D space. I receive them in terms of both coordinates of both lines. Because they are line segments I would also need to know if they actually intersect in the first place.

I can find many ways to do this but I would like to know what method would have the best performance in GLSL.

I need to find the point of intersection between two line segments in 2D space. I receive them in terms of both coordinates of both lines. Because they are line segments I would also need to know if they actually intersect in the first place.

I can find many ways to do this but I would like to know what method would have the best performance in GLSL.

Source Link
Gerharddc
  • 392
  • 4
  • 13

Best way to find line segment intersection

I am working with an OpenGL ES 2.0 shader and need to find the point of intersection between two line segments in 2D space. I receive them in terms of both coordinates of both lines. Because they are line segments I would also need to know if they actually intersect in the first place.

I can find many ways to do this but I would like to know what method would have the best performance in GLSL.