1

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

EDIT:

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

Martin Perry
  • 1,106
  • 1
  • 12
  • 29
  • @Byte56 There seems to be no universal solution, only Android based – Martin Perry Aug 31 '13 at 17:18
  • 1
    @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.

    – PeterT Aug 31 '13 at 18:13
  • Ok...I have tried to init my window according to "duplicite" question. Hovewer, jagged edges are still preserved. – Martin Perry Sep 01 '13 at 09:36
  • Do you have alpha blending enabled? – Mario Sep 01 '13 at 10:16
  • I must have it enabled for whole scene ? – Martin Perry Sep 01 '13 at 11:54
  • I'm quite sure you'll have to have it enabled when you tryt o draw smooth lines/polygons, otherwise you'll end up with jagged edges again. How about giving it a try? – Mario Sep 02 '13 at 11:49

0 Answers0