Good morning!
I'm back after doing a bit more sleuthing.
Every single rendering control in this application is based off a SFML 'mother class' which handles management of the window, view, drawing cycle etc. You basically just build more specific functionality whilst inheriting this class and add an override which the mother class will pull from to render -- simple stuff.
First of all, here's the code for initialising the texture and sprite. (Ignore the lazy resource manager reference, it was just a basic class to avoid duplicate loading. I'm planning on writing a real one at some point.)
_checkedTexture = ResourceManager.Instance.LoadTexture(Application.StartupPath + @"\content\textures\transparency.png");
_checkedTexture.Repeated = true;
_checkedSprite = new Sprite(_checkedTexture);
_checkedSprite.TextureRect = new IntRect(0, 0, 0, 0);
Later on I set the TextureRect like this:
_checkedSprite.TextureRect = new IntRect(0, 0, ObjectWidth, ObjectHeight);
ObjectWidth and ObjectHeight are both integers which store the size of the sprite. As such I don't think they'll be causing a problem with floating point rounding.
The view is created (and re-created on resize) like this:
View = new View(new FloatRect((XOffset * -1), (YOffset * -1), ClientSize.Width, ClientSize.Height));
View.Center = new Vector2f(XOffset + ((int)View.Size.X / 2), YOffset + ((int)View.Size.Y / 2));
RenderWindow.SetView(View);
Now the fact that I'm forced to pass a FloatRect through to create that view is slightly more interesting. From all the examples I looked at when picking SFML up this was the standard way of doing things.
Could this be creating the rounding errors you talked about?
ClientSize.Width and ClientSize.Height come from the System.Drawing.Size class and are both integers.
I did some more screwing around with a more isolated environment to re-create the artefact problems I was having. This is done using a simple ScrollTexture view, which is just the SFML mother class with the ability to have a texture passed through to it.
This first image shows a 1024x1024 texture with a grid pattern of 32x32 squares which alternate between 100% red and 100% transparent, thus showing off the checked pattern which is the .Repeated=true sprite with a 16x16 texture assigned to it.
Zero problems.
However, if I add an extra 32pixels to both dimensions to take it to a 1056x1056...
Chaos! This was actually the first time I saw such aggressive artefacts showing up, so it was slightly shocking.
From what I could tell before my eyes started giving up on me, the 1056x1056 texture is actually rendering properly... it's the repeated background which is screwing up.
However, this is not consistent across all sizes.
This is a 960x384 texture.
The raw image is insanely smooth -- the artefacts are 100% from the rendering code. If you zoom in you can see the repeated background screwing up once again, something which never happens with a standard POT sprite size.
Here are a couple more images showing the artefacts in other situations. I ended up loading a screenshot in to Photoshop to see exactly what kind of skewing was occurring.
I hope this gives a bit more context for my problem. Again, any help would be greatly appreciated!