mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Improve undersampling settings
The setting now accepts values between 1 and 8 in the Advanced Settings menu. Values 0 and 1 now behave the same way (setting it to 1 won't disable MSAA anymore), so there's no need to expose 0 as a value. This closes #8939.
This commit is contained in:
parent
e0a85fae01
commit
05a7da6279
2 changed files with 8 additions and 7 deletions
|
@ -35,7 +35,7 @@ RenderingCorePlain::RenderingCorePlain(
|
|||
|
||||
void RenderingCorePlain::initTextures()
|
||||
{
|
||||
if (!scale)
|
||||
if (scale <= 1)
|
||||
return;
|
||||
v2u32 size{scaledown(scale, screensize.X), scaledown(scale, screensize.Y)};
|
||||
lowres = driver->addRenderTargetTexture(
|
||||
|
@ -44,21 +44,21 @@ void RenderingCorePlain::initTextures()
|
|||
|
||||
void RenderingCorePlain::clearTextures()
|
||||
{
|
||||
if (!scale)
|
||||
if (scale <= 1)
|
||||
return;
|
||||
driver->removeTexture(lowres);
|
||||
}
|
||||
|
||||
void RenderingCorePlain::beforeDraw()
|
||||
{
|
||||
if (!scale)
|
||||
if (scale <= 1)
|
||||
return;
|
||||
driver->setRenderTarget(lowres, true, true, skycolor);
|
||||
}
|
||||
|
||||
void RenderingCorePlain::upscale()
|
||||
{
|
||||
if (!scale)
|
||||
if (scale <= 1)
|
||||
return;
|
||||
driver->setRenderTarget(0, true, true);
|
||||
v2u32 size{scaledown(scale, screensize.X), scaledown(scale, screensize.Y)};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue