The first thing to discuss is pixel alignment. We allow fractional half-pixel coordinates to be passed to the drawing functions because most of them accept the coordinates as floating point numbers. This part of the issue is a fundamental difference in Direct3D9 because its viewport structure only accepts whole integer coordinates and internally offsets the viewport by half a pixel. This causes all of the shape drawing functions to be off from the OpenGL render.
The second thing to discuss is texel alignment. This is another fundamental Direct3D9 difference where it samples texels at corners and pixels in the center. This is what causes textured shapes, like font glyphs, to have rendering differences between GM, ENIGMA, and OpenGL.
Google's ANGLE project deals with one of these issues, the texel alignment, in its vertex shader by offsetting all vertices by a half a pixel. I attempted this in ENIGMA but still could not get all of our backends outputting half pixel lines exactly the same.
This oddity has been corrected in Direct3D 10, but for ANGLE on Direct3D 9, a half-pixel offset is required to adjust the fragment coordinates for this difference.Please sign in to post comments, or you can view this issue on GitHub.