Original Post
So, if you read around a bit people obviously recommend against this, but it still seems to me that it should be possible. Unfortunately, I'm getting seams every time the texture wraps back around. If I disable bilinear and mipmap filtering it seems to work fine (no seam), so my guess is my math is maybe off by a pixel or two. Basically, I compute a tiled UV in the pixel shader (based off of some world-space geometry), and then I use frac to get the actual uv. I can see where this would go terribly wrong if I were doing this calculation in the vertex shader (i.e., interpolating from 0.99 to 0.01 would be very wrong), but in the pixel shader I have control over this (i.e., no interpolation, I can compute the actual sample point for the given rendered pixel). I've tried extending my sub-rectangle by one row/column on either end, and I've tried shrinking my uv-wrap-window slightly by various amounts (so it starts slightly inside of the rectangle and wraps slightly before the end), but to no avail... So, my question: has anyone gotten this to work successfully? If it is impossible, what am I not understanding? Naturally on a platform/API with texture arrays I could avoid this issue, but I'm trying to get this to work on PC D3D9. Thanks in advance for any insights.