From fb7a0e4298356a2d339c5ebf23152b441dc06a8f Mon Sep 17 00:00:00 2001 From: Gregor Parzefall Date: Sun, 25 Jun 2023 12:53:04 +0200 Subject: [PATCH] 2D rendering: Enable bilinear filter for downscaling textures This looks much better and doesn't have any downsides (e.g. regarding pixel art). --- source/Irrlicht/CNullDriver.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Irrlicht/CNullDriver.cpp b/source/Irrlicht/CNullDriver.cpp index 66e0dbd..04e3864 100644 --- a/source/Irrlicht/CNullDriver.cpp +++ b/source/Irrlicht/CNullDriver.cpp @@ -103,7 +103,9 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d& scre InitMaterial2D.ZBuffer = video::ECFN_DISABLED; InitMaterial2D.UseMipMaps = false; InitMaterial2D.forEachTexture([] (auto &tex) { - tex.MinFilter = video::ETMINF_NEAREST_MIPMAP_NEAREST; + // Using ETMINF_LINEAR_MIPMAP_NEAREST (bilinear) for 2D graphics looks + // much better and doesn't have any downsides (e.g. regarding pixel art). + tex.MinFilter = video::ETMINF_LINEAR_MIPMAP_NEAREST; tex.MagFilter = video::ETMAGF_NEAREST; tex.TextureWrapU = video::ETC_REPEAT; tex.TextureWrapV = video::ETC_REPEAT;