Jump to content
  • Advertisement
Sign in to follow this  
worldshaking

DirectX - Custom Interpolation Filters?

This topic is 3031 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-

I'm fairly new here, so I apologize if this is posted in the wrong place. I am currently using DirectX in a MFC app in order to display both 2D and 3D image data. The DirectX portion of the program is mostly used for coordinate transformation of the data from memory to the screen (all in the pixel shader). Currently, I am interpolating the data across scan lines by setting the texture sampler state to D3DTEXF_LINEAR (for both MIN and MAGFILTER). For certain images acquired, this filter is sufficient, but under certain circumstances, I need something a bit better.

So, my question is the following: is it possible to change the kernel size of the interpolating filter? The default filter appears to use a 2x2 kernel for the filter, but due to the nature of the data being displayed, I need a 2x4 (or some other asymmetric size) filter to help smooth the data across more scan lines than just 2. Can this be done easily, or will I have to write the interpolation into my pixel shader?

I hope I've given enough information, and thanks for any input you can give.

Share this post


Link to post
Share on other sites
Advertisement
You could try enabling anisotropic filtering - it'll look at more than 2x2 pixels so it'll work in 2D for textures that are stretched unevenly, but you can't control the exact number of samples it uses.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!