Here's something I noticed in reQuiem which apparently goes all the way back to JoeQuake. (I've checked the JoeQuake code but haven't actually run JoeQuake to compare.)
JoeQuake has some built-in 8x8 crosshair graphics. For some reason it doesn't draw them dead-center in the screen; instead the quad for the crosshair graphic is shifted down and to the right by a half pixel from center.
I don't know if this is trying to accomodate the standard "not quite centered" Quake aimpoint, or a misunderstanding of how OpenGL places quad vertices, or something else.
A half pixel doesn't sound like a big deal, but the crosshair graphic is super-low-rez and using nearest-pixel mapping, so at certain crosshair scales and screen resolutions it looks misshapen.
==========
The crosshair graphic also wasn't clamped to the quad, so you could get the texture bleeding from one edge to the other like this:
==========
I've tried just placing the quad dead-center and clamping the texture, and it looks perfectly OK now as far as I can tell.
Obviously you may have to adjust cl_crossx and maybe cl_crossy to try to put the crosshair on your aimpoint, but that's business as usual for Quake (and was still the case even with the half-pixel shift).
So that makes me wonder why the code was the way it was.
==========
The other thing that's confusing me is the placement of custom (user-provided) crosshair images, which can be arbitrarily sized. JoeQuake positions a custom crosshair using "ofs1" (distance from center to the top or left edge of the quad) and "ofs2" (distance from center to right or bottom edge) like this:
Code: Select all
ofs1 = 4 - 4.0 / crosshairpic.width;
ofs2 = 4 + 4.0 / crosshairpic.width;
Whhaaaaat is up with this?