Hey I just want to share a bug fix that fixes a texture seam problem I've had for a while.
See this post:
http://www.gamedev.net/topic/602143-tex ... eam-issue/screens:
First image shows the fix. The visible seam in that is part of the texture. Second image shows the problem.
http://imgur.com/JRXAm&qQBPEThe problem:
Basically because I'm generating my uv in shader based on world position, it's confusing the mip map selection process resulting in seam on every cubic block. My solution (this is but one possible solution) is to use ddx,ddy on the world position themselves and pass it to the function tex2Dgrad(). The trick is to select the correct component based on which face you are facing. If you use texture atlas and the cubic extractor you are doing this already. Anyway, here is the code:
http://pastebin.com/kupaj0XhTo use:
[code]
float4 Tex2DAtlas(sampler2D tex, float2 uv, float4 dxdy)
{
return tex2Dgrad(tex, uv, dxdy.xy, dxdy.zw);
}
[/code[