Hi folks,
I’m noticing some drawn elements in my viewport are not drawn on the same pixels as what something behind it is drawn on, despite them using the same position values. Scaling or moving the viewport results in a difference of a pixel off between the two in some cases (and a bit of flickering while you’re doing it). It’s not much I know, but it’s a presentation thing and it’s going to become an issue for me soon.
As an example, I drew some lines at the edge of a polygon to demonstrate the issue, see attached image below. The left side of the image is what ogl gives me, and the right side is what I would like to achieve (in terms of accuracy). I’ve scaled the image up so that it is easier to see.
[ATTACH=CONFIG]1244[/ATTACH]
I’m using two shaders, one for the polygons, one for the lines/points. Each use the same matrix, and each are using floating point “3d world” position values.
Is this a shader thing? Or a fragment thing? Is there a way to get better precision with things like this?
Cheers,
WP.