Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualShenjoku

Posted 29 April 2013 - 02:14 PM

Linear filtering means that, for the border pixels, it's probably taking a sample from just outside the edge of the texture. I think when you create your texture, you need to "continue" the border into the "empty" areas of the texture. Or else, when you're drawing your texture, push your texture coordinates just inside the valid part of the texture (of course, then when you draw at smaller sizes, the artifact may creep in again).

Interesting. I didn't know that. I'll give that a shot and see what happens.

 

(why are you using a 311x100 solid white texture? A 1x1 white texture would serve just as well).

I know. It's just a test texture that copies the size of another image that the bug was reported with.
 

Are you sure AddressU and AddressV in D3D11_SAMPLER_DESC for your sampler are set to D3D11_TEXTURE_ADDRESS_CLAMP? I had a border issue with a skybox but when I set it to clamp the border went away.

I'm using DirectX 9. I guess I should have put that in the original post. I'll update it now. Thanks for the tip though. The default for texture addressing mode is wrap so we were wrapping. Changing it to clamp fixed part of the problem.


#7Shenjoku

Posted 29 April 2013 - 01:40 PM

Linear filtering means that, for the border pixels, it's probably taking a sample from just outside the edge of the texture. I think when you create your texture, you need to "continue" the border into the "empty" areas of the texture. Or else, when you're drawing your texture, push your texture coordinates just inside the valid part of the texture (of course, then when you draw at smaller sizes, the artifact may creep in again).

Interesting. I didn't know that. I'll give that a shot and see what happens.

 

(why are you using a 311x100 solid white texture? A 1x1 white texture would serve just as well).

I know. It's just a test texture that copies the size of another image that the bug was reported with.
 

Are you sure AddressU and AddressV in D3D11_SAMPLER_DESC for your sampler are set to D3D11_TEXTURE_ADDRESS_CLAMP? I had a border issue with a skybox but when I set it to clamp the border went away.

I'm using DirectX 9. I guess I should have put that in the original post. I'll update it now. Thanks for the tip though. The default for texture addressing mode is wrap so we were wrapping. Changing it to clamp fixed part of the problem.

 

EDIT: You were both correct. I had to change the texture addressing mode to clamp to fix the top and left sides and copy the last row/column of pixels on the bottom and right to fix the issue. Huge thanks to the both of you. I spent a long time trying to figure this thing out.


#6Shenjoku

Posted 29 April 2013 - 01:38 PM

Linear filtering means that, for the border pixels, it's probably taking a sample from just outside the edge of the texture. I think when you create your texture, you need to "continue" the border into the "empty" areas of the texture. Or else, when you're drawing your texture, push your texture coordinates just inside the valid part of the texture (of course, then when you draw at smaller sizes, the artifact may creep in again).

Interesting. I didn't know that. I'll give that a shot and see what happens.

 

(why are you using a 311x100 solid white texture? A 1x1 white texture would serve just as well).

I know. It's just a test texture that copies the size of another image that the bug was reported with.
 

Are you sure AddressU and AddressV in D3D11_SAMPLER_DESC for your sampler are set to D3D11_TEXTURE_ADDRESS_CLAMP? I had a border issue with a skybox but when I set it to clamp the border went away.

I'm using DirectX 9. I guess I should have put that in the original post. I'll update it now. Thanks for the tip though. The default for texture addressing mode is wrap so we were wrapping. Changing it to clamp fixed part of the problem.


#5Shenjoku

Posted 29 April 2013 - 01:38 PM

Linear filtering means that, for the border pixels, it's probably taking a sample from just outside the edge of the texture. I think when you create your texture, you need to "continue" the border into the "empty" areas of the texture. Or else, when you're drawing your texture, push your texture coordinates just inside the valid part of the texture (of course, then when you draw at smaller sizes, the artifact may creep in again).


Interesting. I didn't know that. I'll give that a shot and see what happens.

(why are you using a 311x100 solid white texture? A 1x1 white texture would serve just as well).

I know. It's just a test texture that copies the size of another image that the bug was reported with.

Are you sure AddressU and AddressV in D3D11_SAMPLER_DESC for your sampler are set to D3D11_TEXTURE_ADDRESS_CLAMP? I had a border issue with a skybox but when I set it to clamp the border went away.

I'm using DirectX 9. I guess I should have put that in the original post. I'll update it now. Thanks for the tip though. The default for texture addressing mode is wrap so we were wrapping. Changing it to clamp fixed part of the problem.

#4Shenjoku

Posted 29 April 2013 - 01:38 PM

Linear filtering means that, for the border pixels, it's probably taking a sample from just outside the edge of the texture. I think when you create your texture, you need to "continue" the border into the "empty" areas of the texture. Or else, when you're drawing your texture, push your texture coordinates just inside the valid part of the texture (of course, then when you draw at smaller sizes, the artifact may creep in again).


Interesting. I didn't know that. I'll give that a shot and see what happens.

(why are you using a 311x100 solid white texture? A 1x1 white texture would serve just as well).

I know. It's just a test texture that copies the size of another image that the bug was reported with.

Are you sure AddressU and AddressV in D3D11_SAMPLER_DESC for your sampler are set to D3D11_TEXTURE_ADDRESS_CLAMP? I had a border issue with a skybox but when I set it to clamp the border went away.

I'm using DirectX 9. I guess I should have put that in the original post. I'll update it now. Thanks for the tip though. The default for texture addressing mode is wrap so we were wrapping. Changing it to clamp fixed part of the problem.

#3Shenjoku

Posted 29 April 2013 - 01:13 PM

Linear filtering means that, for the border pixels, it's probably taking a sample from just outside the edge of the texture. I think when you create your texture, you need to "continue" the border into the "empty" areas of the texture. Or else, when you're drawing your texture, push your texture coordinates just inside the valid part of the texture (of course, then when you draw at smaller sizes, the artifact may creep in again).

 

Interesting. I didn't know that. I'll give that a shot and see what happens. How does this work for textures that are powers of 2? Will it sample outside of the area or something?

 

(why are you using a 311x100 solid white texture? A 1x1 white texture would serve just as well).

I know. It's just a test texture that copies the size of another image that the bug was reported with.

 

 

Are you sure AddressU and AddressV in D3D11_SAMPLER_DESC for your sampler are set to D3D11_TEXTURE_ADDRESS_CLAMP? I had a border issue with a skybox but when I set it to clamp the border went away.

I'm using DirectX 9. I guess I should have put that in the original post. I'll update it now.


PARTNERS