Jump to content
  • Advertisement
Sign in to follow this  
AteneoUW

Point Sampling and Linear Interpolation

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

Here i go again with a question:

 

This is the situation, im using textured quads to render 2d image in Direct3d 9. I used http://www.gamedev.net/page/resources/_/technical/directx-and-xna/2d-in-direct3d-using-textured-quads-r1972 as a starting point. I have just 1 backbuffer fixed to 256x240. So i have a texture of that size wich i fill with data, then it gets drawed and finally go to the backbuffer and then to the front.

I need Point Sampling and Linear Interpolation for the image.

I tried this:

d3ddev->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_POINT);
3ddev->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_POINT);
d3ddev->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_POINT);

d3ddev->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
d3ddev->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
d3ddev->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR );

Where d3ddev is the Direct3d9 Divice as you have noticed.

 

But i can't notice any changes in the output.

Im very new so i ask for help.

Sorry the lame question, but im beggining whith all this d3d stuff.

 

Share this post


Link to post
Share on other sites
Advertisement

Hiya,

  Because your texture has a 1to1 mapping to your backbuffer size, there is no need for filtering so they will both look the same. If you make your texture half the size (as an example) and then render it, you will see the difference.

 

n!

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!