mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Added video settings filter options via config file - second try :-)
Set one or more of these in the config to turn the related option on: mip_map = 1 anisotropic_filter = 1 bilinear_filter = 1 trilinear_filter = 1
This commit is contained in:
committed by
Perttu Ahola
parent
0709918bd8
commit
0dd9c14ff8
@@ -413,6 +413,10 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
m_last_drawn_sectors.clear();
|
||||
}
|
||||
|
||||
bool use_trilinear_filter = g_settings->getBool("trilinear_filter");
|
||||
bool use_bilinear_filter = g_settings->getBool("bilinear_filter");
|
||||
bool use_anisotropic_filter = g_settings->getBool("anisotropic_filter");
|
||||
|
||||
/*
|
||||
Get time for measuring timeout.
|
||||
|
||||
@@ -544,6 +548,11 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
for(u32 i=0; i<c; i++)
|
||||
{
|
||||
scene::IMeshBuffer *buf = mesh->getMeshBuffer(i);
|
||||
|
||||
buf->getMaterial().setFlag(video::EMF_TRILINEAR_FILTER, use_trilinear_filter);
|
||||
buf->getMaterial().setFlag(video::EMF_BILINEAR_FILTER, use_bilinear_filter);
|
||||
buf->getMaterial().setFlag(video::EMF_ANISOTROPIC_FILTER, use_anisotropic_filter);
|
||||
|
||||
const video::SMaterial& material = buf->getMaterial();
|
||||
video::IMaterialRenderer* rnd =
|
||||
driver->getMaterialRenderer(material.MaterialType);
|
||||
|
Reference in New Issue
Block a user