meds
meds

Reputation: 22956

IDirect3DDevice9, setting how textures scale?

In Photoshop you can control how pictures are scaled up and down as 'image interpolation', it has different options like 'Bicubic', 'Bilinear', 'Nearest Neighbour' and such.

I was wondering if I could do something similar in DirectX? Basically if I slap a texture on a quad and stretch the quad how can I control how the texture on the quad is represented?

Thanks for any help!

Upvotes: 2

Views: 918

Answers (1)

feal87
feal87

Reputation: 947

If you are using fixed function pipeline :

http://msdn.microsoft.com/en-us/library/ee421769(VS.85).aspx

Setting the D3DSAMP_MAGFILTER, D3DSAMP_MINFILTER , D3DSAMP_MIPFILTER values.

Otherwise set the FILTER option of the sampler object if you're using HLSL.

There are 4 type of filtering. NONE, POINT, LINEAR, ANISOTROPIC.

Upvotes: 3

Related Questions