mirror of
https://github.com/minetest/irrlicht.git
synced 2024-12-24 15:12:24 +01:00
2D rendering: Enable bilinear filter for downscaling textures
This looks much better and doesn't have any downsides (e.g. regarding pixel art).
This commit is contained in:
parent
a994c31ccf
commit
fb7a0e4298
@ -103,7 +103,9 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& 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;
|
||||
|
Loading…
Reference in New Issue
Block a user