I need to render roads and some direction marks on top of them. I render roads as triangled geometry, same goes for marks (see picture - road is purple, mark is red, ignore z-fighting).

Problem goes for edge of road. Is too much "jagged" and not straight. Is it result of perspective projection (thats what I believe). And how can it be improved? There is no texture, colors are filled directly in fragment shader.

enter image description here


I have tried solution from duplicite answer, but jagged edges are still there. Even if multisampled EGLConfig is selected.

  • \$\begingroup\$ @Byte56 There seems to be no universal solution, only Android based \$\endgroup\$ Aug 31, 2013 at 17:18
  • 1
    \$\begingroup\$ @MartinPerry EGL is the most universal solution that you're going to get for OpenGL ES and integrated multisampling context creation. It's just that the linked question gave an answer with the Android abstraction of EGL in mind (it's available on most OpenGL ES devices in some form). But there's other solutions just look for "opengl ES" anti-aliasing. You're probably not going to get anything that works faster and better than native multisampling. \$\endgroup\$
    – PeterT
    Aug 31, 2013 at 18:13
  • \$\begingroup\$ Ok...I have tried to init my window according to "duplicite" question. Hovewer, jagged edges are still preserved. \$\endgroup\$ Sep 1, 2013 at 9:36
  • \$\begingroup\$ Do you have alpha blending enabled? \$\endgroup\$
    – Mario
    Sep 1, 2013 at 10:16
  • \$\begingroup\$ I must have it enabled for whole scene ? \$\endgroup\$ Sep 1, 2013 at 11:54


Browse other questions tagged .