Hirdetés

2024. április 26., péntek

Gyorskeresés

Útvonal

Fórumok  »  Videokártyák  »  Nvidia brilinear (téma lezárva)

Hozzászólások

(#14) FreeM


FreeM
aktív tag

Aki ebből sem érti meg, hogy miről van szó, az reménytelen eset.

''I have seen a lot of talk and complaints about how the various video card companies apply texture filtering and most of it is erroneous, in terms of understanding what specifically is required and when it is required by the DirectX specification.
You can talk about it from the user point of view all you like, but much of this talk seems to make either ATI or NVidia in the wrong, and quite frankly, I am not sure that is the case. At least from the DirectX specification perspective.

So, I am making this post, as more of tutorial about texture filtering in DirectX than about who is right or worng.

First, let's start with the actual texture stage filters that are available in DirectX.
-------------
D3DTEXF_NONE
Mipmapping disabled. The rasterizer should use the magnification filter instead.

D3DTEXF_POINT
Point filtering used as a texture magnification or minification filter. The texel with coordinates nearest to the desired pixel value is used. The texture filter to be used between mipmap levels is nearest-point mipmap filtering. The rasterizer uses the color from the texel of the nearest mipmap texture.

D3DTEXF_LINEAR
Bilinear interpolation filtering used as a texture magnification or minification filter. A weighted average of a 2x2 area of texels surrounding the desired pixel is used. The texture filter to use between mipmap levels is trilinear mipmap interpolation. The rasterizer linearly interpolates pixel color, using the texels of the two nearest mipmap textures.

D3DTEXF_ANISOTROPIC
Anisotropic texture filtering used as a texture magnification or minification filter. Compensates for distortion caused by the difference in angle between the texture polygon and the plane of the screen.

D3DTEXF_PYRAMIDALQUAD
A 4-sample tent filter used as a texture magnification or minification filter.

D3DTEXF_GAUSSIANQUAD
A 4-sample Gaussian filter used as a texture magnification or minification filter.
-------------

Now, that is all the texture filters that are available to the programmer in DirectX9 and the above apply to all texture levels, if you want. You will notice, there is no trilinear filter explicitly defined in DirectX. There never has been.
The only time trilinear is required, by DirectX, is for mipmap transitions. Any other time, it is an option. You will notice in the defination of the LINEAR filter, this is very clear.
Games that provide and option for trilinear filtering are bogus. The programmer cannot specifically ask for triinear filtering in DirectX. You can play a little game and call every texture stage a mipmap. Would be foolish, but it would force trilinear filtering.

Now, you might gather that using ANISTROPHIC filtering, by defination, precludes the use of LINEAR filtering. It does, for any given texture stage. In other words, you can only specifiy one texture filter per texture stage.
If you force ANISTROPHIC filtering on, then you cannot use any other form of filtering for the texture stage that it is being applied to.
There is only one way to use ANISTROPHIC filtering and LINEAR together, and that is during mipmap transitions. However, no programmer in their right mind (yes, this is my opinion) would ever use that combination as it would kill performance.

Now, for different types of textures, there are different rules, in some cases. For instance, if the texture is a volumn map, then the only filters required to be available are POINT and LINEAR. If the volumn map is being applied during a mipmap transition, then POINT filtering is required, and LINEAR becomes optional. If the programmer attempts to ask for ANISTROPHIC filtering for this type of texture, then it is quite legal for the driver/hardware to ignore this and revert to LINEAR, or even POINT filtering.


You with me so far? Good. So, NVidia disables trilinear. As long as it is used during mipmap transitions for non volumn texture maps, they are within the DirectX9 specification. ATI disables trilinear when anistrophic filtering is enabled. Well,..that's ok too and does not violate the DirectX9 specification, simply because you cannot apply multiple filters to single texture stages.

Now you can yell and scream about this all you want. It does not change a thing. NVidia and ATI are within the DirectX9 specifications, unless they violate one of the above.''

Útvonal

Fórumok  »  Videokártyák  »  Nvidia brilinear (téma lezárva)
Copyright © 2000-2024 PROHARDVER Informatikai Kft.