Archived

This topic is now archived and is closed to further replies.

CGameProgrammer

Is it worth it using bilinear filtering for far-away objects?

Recommended Posts

In my engine, I currently have it set so that geometry near the camera is drawn with trilinear filtering and objects far away are drawn with bilinear filtering. Of course this sounds like it defeats the purpose of trilinear filtering, but it actually looks good the way I have it set. But I''m wondering if it''s worth it. For most cards that support trilinear filtering, is it noticeably slower using trilinear filtering than bilinear? So, is the penalty of the render state change worth it? Or should I just make everything trilinear? My engine renders large outdoor areas, so most geometry is far away from the camera. ~CGameProgrammer( );

Share this post


Link to post
Share on other sites
S1CA    1418
Tri-linear versus Bi-linear shouldn''t make much of a difference.

However, tri-linear implies using MipMaps, they *ARE* good when textures get minified - and do help on most 3D hardware.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
a person    118
ussually smaller textures are quicker to render then a larger texture assuming the triangle size if constant. so trilinear should be faster then straight bilinear with a full res texture.

Share this post


Link to post
Share on other sites
Actually I use mipmaps with bilinear filtering. I use them simply because they look better - the full-res textures look bad when viewed from far away. Also, I can''t imagine how mipmaps are rendered more quickly than full-res textures. Are you totally positive mipmaps are faster? Because I''m pretty sure they''re used mainly because there are major artifacts when trying to render a full-res texture in a tiny polygon.

~CGameProgrammer( );

Share this post


Link to post
Share on other sites
S1CA    1418
quote:
Are you totally positive mipmaps are faster?


That''s what all the 3D hardware manufacturers say !!!

The case where it helps the most is in MINIFICATION of textures.

MipMaps help with minification **if all of the chain fits into video memory** because you get far less misses in the on-chip texel cache when texturing the polygon.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
Catalytic    122
Yeah it''s been my experience using mipmaps does help performance, if only slightly, but the bigger advantage is the textures look much better because you don''t have so much aliasing of the texture going on. I attributed this to having less texture resources on the card so it doesn''t have to keep going to software to load the textures into the cache. However, you pay the price at load time, by having to create all the mip maps, which is usually pretty damn slow, at least with the D3DXLoadTexture calls.

Share this post


Link to post
Share on other sites
a person    118
CGameProgrammer, trilinear filtering blends two mipmaps together. basically it does a bilinear filter then blends the two mipmaps that are surrounding the mipmap level you are at. the only difference between trilinear filetring and using bilinear with mipmaps is that you are using the closet mipmap to the current mipmap level.

its like using point filetring (ie none) with your textures instead of linear (ie bilinear) when using bilinear with mipmaps.

i suggest just adding an option and allow either bilinear or trilinear filtering. there is no point in switching the filtering method midway through a render based on distance since you are defeating the purpose of triliniear filter which is to give a smooth transition between mipmap levels as your distance from the camera increases.

Share this post


Link to post
Share on other sites