Skip to main content
GameDev.net gamedev.net
🔒 Locked

Disable texture filtering..

Started by JoeLaBanane Sep 9, 2005 at 2:49 PM 2 replies 750+ views
Original Post
JoeLaBanane
JoeLaBanane
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.
Syranide
Syranide
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.



JoeLaBanane
JoeLaBanane
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.