Upscale rendered-to textures
Increase the size of RTT textures by a given integer factor. Defaults to 1. This gives much better quality textures, particularly visible when used fullscreen for transition or pause screens.
This commit is contained in:
parent
bb2d860902
commit
0284d635d2
|
@ -313,6 +313,7 @@ void LoadSettings()
|
|||
settings.rend.WideScreen = cfgLoadInt("config","rend.WideScreen",0);
|
||||
settings.rend.ShowFPS = cfgLoadInt("config", "rend.ShowFPS", 0);
|
||||
settings.rend.RenderToTextureBuffer = cfgLoadInt("config", "rend.RenderToTextureBuffer", 0);
|
||||
settings.rend.RenderToTextureUpscale = cfgLoadInt("config", "rend.RenderToTextureUpscale", 1);
|
||||
settings.rend.TranslucentPolygonDepthMask = cfgLoadInt("config", "rend.TranslucentPolygonDepthMask", 0);
|
||||
settings.rend.ModifierVolumes = cfgLoadInt("config","rend.ModifierVolumes",1);
|
||||
settings.rend.Clipping = cfgLoadInt("config","rend.Clipping",1);
|
||||
|
|
|
@ -1754,6 +1754,13 @@ bool RenderFrame()
|
|||
width *= dc2s_scale_h;
|
||||
height *= dc2s_scale_h;
|
||||
}
|
||||
else if (settings.rend.RenderToTextureUpscale > 1 && !settings.rend.RenderToTextureBuffer)
|
||||
{
|
||||
min_x *= settings.rend.RenderToTextureUpscale;
|
||||
min_y *= settings.rend.RenderToTextureUpscale;
|
||||
width *= settings.rend.RenderToTextureUpscale;
|
||||
height *= settings.rend.RenderToTextureUpscale;
|
||||
}
|
||||
|
||||
glScissor(min_x, min_y, width, height);
|
||||
glcache.Enable(GL_SCISSOR_TEST);
|
||||
|
|
|
@ -434,6 +434,13 @@ void BindRTT(u32 addy, u32 fbw, u32 fbh, u32 channels, u32 fmt)
|
|||
while (fbw2 < fbw)
|
||||
fbw2 *= 2;
|
||||
|
||||
if (settings.rend.RenderToTextureUpscale > 1 && !settings.rend.RenderToTextureBuffer)
|
||||
{
|
||||
fbw *= settings.rend.RenderToTextureUpscale;
|
||||
fbh *= settings.rend.RenderToTextureUpscale;
|
||||
fbw2 *= settings.rend.RenderToTextureUpscale;
|
||||
fbh2 *= settings.rend.RenderToTextureUpscale;
|
||||
}
|
||||
// Get the currently bound frame buffer object. On most platforms this just gives 0.
|
||||
//glGetIntegerv(GL_FRAMEBUFFER_BINDING, &m_i32OriginalFbo);
|
||||
|
||||
|
|
|
@ -617,6 +617,7 @@ struct settings_t
|
|||
bool WideScreen;
|
||||
bool ShowFPS;
|
||||
bool RenderToTextureBuffer;
|
||||
int RenderToTextureUpscale;
|
||||
bool TranslucentPolygonDepthMask;
|
||||
bool ModifierVolumes;
|
||||
bool Clipping;
|
||||
|
|
Loading…
Reference in New Issue