Ok, I think I know what's happening. Here's quick question by question reply...
As i said earlyer, i pretty much asume the crosshairs (the entire picture including the black surrounding it) consumes exactly 64 x 64 pixels from your screen regardless the resolution. Above a certain resolution (on error?) the crosshair all of a sudden consumes 128 x 128 pixels of the screen(its being enlarged).
The way things seem to work with the standard code is that UT assumes you are using a 64x64 texture.
However, the crosshair itself is scaled up according to the screen resolution (see code below). So the crosshair should appear bigger but is proportionately the same size unless the resolution is below 512 pixels wide.
Code:
if (Crosshair>=CrosshairCount) Return;
if ( Canvas.ClipX < 512 )
XScale = 0.5;
else
XScale = FMax(1, int(0.1 + Canvas.ClipX/640.0));
In english this means that XScale is 0.5 below 512 width. At a width of 640 pixels, the XScale is 1.0 and it is increased according to the ratio defined by the resolution width divided by 640.
The scaling is uneven because it's rounded off to a whole number (that's what int() does).
This is the code that decides how big the crosshair is actually going to be.
If XScale is 1.0, XLength will be 64 (Epic seems to have decided the crosshair texture should be one-tenth of the screen resolution). If it higher than that, XLength will be 64 * XScale.
For example :
Screen resolution is 1024x768.
XScale = FMax(1, int(0.1 + Canvas.ClipX/640.0))
- Canvas.ClipX is 1024.
- Canvas.ClipX/640.0 = 1.6.
- 1.6 + 0.1 = 1.7. (+0.1 forces a whole number to have a decimal fraction)
- int( 1.7 ) = 1.
- FMax (Maximum decimal number) between 1 and 1 is of course 1.
- XLength = 64.
Screen resolution is 1600x1200.
XScale = FMax(1, int(0.1 + Canvas.ClipX/640.0))
- Canvas.ClipX is 1600.
- Canvas.ClipX/640.0 = 2.5.
- 2.5 + 0.1 = 2.6.
- int( 2.6 ) = 2.
- FMax (Maximum decimal number) between 1 and 2 is 2.
- XLength = 128.
So to get a jump in crosshair size, you need a screen resolution that is higher or equal to 1280xY.
Code:
Canvas.DrawTile(T, XLength, XLength, 0, 0, 64, 64);
This is where the crosshair is actually drawn. XLength is the size it will appear on the screen and "64, 64" is the "window" inside the texture that should be drawn.
This explains why the high resolution crosshairs aren't visible with the standard code. It is only showing the top left 64x64 area of the textures.
If the mutator would allow it to set it to 64 x 64 pixels for the lower screen settings, and a 32 x 32 setting for the higher screen settings, in the last option, the screen will due to the error project it again as 64 x 64. This would ensure that the picture is always 64 x 64 ingame independent from what resolution is used.
I can hardcode this if necessary but I need to know what size there should be according to the screen resolution as the rules above don't seem to suit anyone.
The blurrynes is simply caused by the fact that a 64 x 64 pixel picture is enlarged to 128 x 128 pixel. The larger pictures(256x 256) in the mod will get rid of the blurrynes, because regardless the ingame size, they are reduced and not enlarged(at least as long as the setting does not exceed 256 x 256 pixels).
To reformulate, the bluriness should happen when the crosshair is bigger than 64x64 since the game engine is trying to enlarge something that is made of pixels. There's no magical way of doing this, so what's done is to try to keep the general shape of a picture while blurring it's edges.
When that first becomes noticeable is another question because that depends entirely on the player. At 1440x900, the bluriness is quite noticeable. Note that 1440 / 640 gives a ratio of 2.25 which rounds off to 2, so that explains the 2x size.
The larger texture size helps to keep a sharper crosshair because the engine is downscaling a texture. That means it only has to lose information instead of trying to recreate information that isn't there.
So, in short, this is why I need to know scale of crosshair people want according to the resolution. Or what I could do is change the formula to get rid of the size jump and make it so the crosshair keeps the same proportions it has at 640x480.