开发者

IDirect3DDevice9, setting how textures scale?

开发者 https://www.devze.com 2022-12-16 21:58 出处:网络
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.

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!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消