Original Post
I want to support a large number of textures on my terrain using splatting. I decided that a texture atlas with splatting would be the best option. Each texture I am using is 512x512 pixels in size, and I store 4 of them on a 2048x2048 surface. I use this method to help reduce or remove UV seams cause of filtering: http://www.ogre3d.or...php?f=4&t=61602
It works great and I have no problems with it and filtering, however I still get UV seams not related to the filtering so I think my coords are a little off.
Here's my look up code:
GetTex(UV, float2(0, 0)) // I would use 1,0 or 1,1 to get the different textures. 0, 0 being the first texture.
GetTex function code:
UVOffset *= .5f;
float2 Coords = ((0.125f + UVOffset) + frac(UV) * (.25f));
return tex2D(Samp, Coords);
.125 is where the texture starts if my UV's are right, and then .375 would be where it ends. and the stuff around that is tiled texture in order to fix the seams when you mip map and filter the texture.
This should return the first texture in the atlas and it works good, I see the first texture it tiles good, the only problem is I still have seams where the texture isn't right. I've turned off all filtering and the problem still exists. I have a feeling its something to do with my UV coords, but I am not entirely sure. The seams are hardly noticeable, but its still annoying when you get close to the landscape, and on some textures the seams are very visible.
Any help will be greatly appreciated!
-Toaster
It works great and I have no problems with it and filtering, however I still get UV seams not related to the filtering so I think my coords are a little off.
Here's my look up code:
GetTex(UV, float2(0, 0)) // I would use 1,0 or 1,1 to get the different textures. 0, 0 being the first texture.
GetTex function code:
UVOffset *= .5f;
float2 Coords = ((0.125f + UVOffset) + frac(UV) * (.25f));
return tex2D(Samp, Coords);
.125 is where the texture starts if my UV's are right, and then .375 would be where it ends. and the stuff around that is tiled texture in order to fix the seams when you mip map and filter the texture.
This should return the first texture in the atlas and it works good, I see the first texture it tiles good, the only problem is I still have seams where the texture isn't right. I've turned off all filtering and the problem still exists. I have a feeling its something to do with my UV coords, but I am not entirely sure. The seams are hardly noticeable, but its still annoying when you get close to the landscape, and on some textures the seams are very visible.
Any help will be greatly appreciated!
-Toaster