Tiling Shader Causing Pixelation In Large Images?

I’m not sure where to ask this, but I’m not terribly confident in the people on WPF-specific sites to be able to debug shader code, as I’m not sure how many WPF developers .

I’m using an incredibly simplistic tiling pixel shader to do a 360 zooming and panning control. I’m new to shaders in general, so I’m not sure if my approach is the right one, or even in the right ballpark. But what I’m doing is applying this shader to a control with an entire image, then using the shader with TopLeft and BottomRight parameters to draw only the chosen section of the image. It’s all well and good, but as the resolution of the image goes up, I start losing quality on the render itself.

Here is my shader code - like I said, it’s very simplistic:

sampler2D input : register(S0);
float2 tl : register(C0);
float2 br : register(C1);

float4 main(float2 uv : TEXCOORD) : COLOR 
	float2 diff = br - tl;
	float2 nuv = uv * diff + tl;
	nuv = nuv - floor(nuv);
	return tex2D(input, nuv);

Here is a snippet of an image as seen in the Windows Photo Viewer:


And here’s a snippet from the same part of the image after going through the shader:


(Both images were the same size on capture, so the artifacts aren’t due to scaling.)

My suspicion is that the issue might be in the 32-bit floats that the shader uses to store texture coordinates, and that as the image gets steadily bigger, the limit on precision starts getting more and more clear. But I don’t really know of any way to test that suspicion, and if its true to find a way around it, or if its not to find out what is actually the problem.

So yeah, I have no idea who or where to ask this, so if this isn’t the right place or even the right site, I’d like to know just who I can talk to to get this figured out.