0

Is there any specific relations between the workload/ overhead of different types of Texture filtering modes? i.e. comparing for "no filtering mode", bilinear filtering and trilinear filtering? and are they specific to 3D, or we have them also in 2D?

Thanks :) --Mohammad H.

1 Answers1

1

There is a definite correlation between filter mode and workload. The work performed by each mode is as follows:

  • Nearest(aka unfiltered): Find the closest mip level, then select the texel whose coordinates are closest to the requested coordinate.

  • Bilinear: Find the nearest mip level, then linearly interpolate the requested texel value from the four texels that surround it (assuming a 2D texture).

  • Trilinear: Find the two mip levels which sandwich the depth value, then perform bilinear interpolation on each level. Finally, interpolate between those two values.

As you can see, the amount of work (and just as importantly, the number of memory accesses) goes up considerably as the filter complexity goes up.

Finally, to answer your other question, this applies to any texture dimension, but you pay for it more at higher dimensions.

Drew Hall
  • 28,429
  • 12
  • 61
  • 81
  • So can you state it as a ratio for comparison? for instance if the workload for Nearest is 1, then what is for the others? –  Jun 29 '12 at 04:11
  • @user1196937 Definitely not, as this is highly dependent on hardware and other things like cache misses and the like. What the answer says is the only thing you can really be quite sure of (and even then rather unpredictable things like cache misses may break the above order). You cannot find a reasonable ratio on which you could base any performance considerations. – Christian Rau Jun 29 '12 at 07:22