Which texture filtering is better: bilinear or trilinear?

Sooner or later every video game developer will start thinking: "Which texture filtering is better: bilinear or trilinear? What are the differences between them, what are the advantages? And so the disadvantages?" In today's article we are going to discuss what type of filtering is better to use when developing a video game and why. Let's get started!
If we dive into theory, we should say that all three-dimensional graphics objects have a base - that is, a three-dimensional model, on top of which the texture is applied.
A texture is a two-dimensional detailed picture.
Textures have particles that are called texels. The size of these particles depends entirely on the resolution of the object. However, a 3D picture is displayed on a two-dimensional monitor, where the basic unit of resolution is the pixel. Their number is limited by the resolution of the matrix. At the same time, there can be many more texels to work in conjunction with pixels.
The point is that texels are needed to display pixels. And the filtering mechanism is the transformation of texels into pixels. And it is really necessary, especially in today's games, because if it is not, the image will be torn and will have a poor quality. Now let's pay attention to the difference between bilinear and trilinear filtering
Bilinear Filtering
Bilinear filtering is when several pixels are extracted from a texture, then they are averaged and the result is printed on the monitor pixel. The technique is only applicable to 2D textures.
How does it work? Well, for example, the filter system takes four texels to work. Once it starts to do the machinations, it turns out that at a great distance or at a great angle the image is very blurry, and textures with a complex pattern clearly show the lines of junctions. Bilinear filtering is usually avoided in modern games, but it is still important for mobile games.
Trilinear Filtering
Trilinear filtering is more advanced. Pixel color is calculated as the arithmetic average of eight texels that fall within the viewport. To prevent sharp corners, a texture with a resolution higher than the object itself is usually superimposed. And it would seem that the trilinear filtering is better in everything, but no. Its operation requires a fairly large amount of RAM increases, and at the same time distant objects will be displayed plus or minus as if they were with bilinear filtering. At close range, the boundaries of objects are not so clearly distinguishable, and textures have smoother transitions.
Wondering what textures you could use in your game project? Take a look at this section of our catalog (PBR 3D Textures or Background 2D Textures), where you'll find a lot of items that will definitely suit your taste.
See also other interesting articles in our blog:
Ctrl
Enter
Noticed a misTake
Highlight text and press Ctrl+EnterRelated news:
Comments (0)