Jump to content
  • Advertisement
Sign in to follow this  
JoeLaBanane

Disable texture filtering..

This topic is 4819 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all! I'm making a pixel editing software using Direct 3D. When I magnify the bitmap (in our case, a texture), additionnal pixels get interpolat/blur. How can I disable this? I tried this without the result I want: m_pd3dDevice->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_NONE); m_pd3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_NONE); supose I have a texture color: 1,4 1,4 I want a 200% stretch with a result like this: 1, 1, 4, 4 1, 1, 4, 4 1, 1, 4, 4 1, 1, 4, 4 But instead, I have some kind of filtering stretch 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 1, 2, 3, 4 thanks you beaucoup :) Joe.

Share this post


Link to post
Share on other sites
Advertisement
D3DSAMP_MAGFILTER, D3DSAMP_MINFILTER, D3DSAMP_MIPFILTER
For use with SetSamplerState does it... and set all to D3DTEXF_NONE.

(However, MIPFILTER doesn't really need to be set as you shouldn't have mipmaps at all)

However, if you are drawing your own quads you might want to check that you are setting the correct texture coordinates too as pixels could otherwise leak when sized.

Share this post


Link to post
Share on other sites
Finaly, it's seems that my video driver was not doing good filtering. I just updated my ASUS ATI video driver and now, all goes well :)

I thanks you for your answers :)
Joe.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!