AdvancedWidget, Bloom Fixes: Allow for downscaled bloom to be blurred.
Update game ini's for bloom.
This commit is contained in:
parent
b6ea92f1f0
commit
fd8a36d4d9
|
@ -27,6 +27,7 @@ ArbitraryMipmapDetection = True
|
|||
[Video_Settings]
|
||||
EFBScaledExclude = 520
|
||||
EFBScaledExcludeEnabled = True
|
||||
EFBScaledExcludeDownscale = True
|
||||
|
||||
[Video_Stereoscopy]
|
||||
StereoConvergence = 732
|
||||
|
|
|
@ -21,3 +21,4 @@ StereoConvergence = 1
|
|||
[Video_Settings]
|
||||
EFBScaledExclude = 140
|
||||
EFBScaledExcludeEnabled = True
|
||||
EFBScaledExcludeDownscale = True
|
|
@ -26,7 +26,7 @@ XFBToTextureEnable = False
|
|||
DeferEFBCopies = False
|
||||
|
||||
[Video_Settings]
|
||||
EFBScaledExclude = 321
|
||||
EFBScaledExclude = 320
|
||||
EFBScaledExcludeEnabled = True
|
||||
EFBScaledExcludeAlt = True
|
||||
EFBScaledExcludeBlur = True
|
||||
|
|
|
@ -19,3 +19,4 @@ EFBEmulateFormatChanges = True
|
|||
[Video_Settings]
|
||||
EFBScaledExclude = 320
|
||||
EFBScaledExcludeEnabled = True
|
||||
EFBScaledExcludeDownscale = True
|
||||
|
|
|
@ -34,3 +34,4 @@ ArbitraryMipmapDetection = True
|
|||
[Video_Settings]
|
||||
EFBScaledExclude = 330
|
||||
EFBScaledExcludeEnabled = True
|
||||
EFBScaledExcludeBlur = True
|
||||
|
|
|
@ -19,3 +19,4 @@ EFBToTextureEnable = False
|
|||
SafeTextureCacheColorSamples = 512
|
||||
EFBScaledExclude = 120
|
||||
EFBScaledExcludeEnabled = True
|
||||
EFBScaledExcludeDownscale = True
|
||||
|
|
|
@ -19,3 +19,4 @@ EFBAccessEnable = False
|
|||
EFBScaledExclude = 170
|
||||
EFBScaledExcludeEnabled = True
|
||||
EFBScaledExcludeAlt = True
|
||||
EFBScaledExcludeBlur = True
|
|
@ -17,3 +17,4 @@ SafeTextureCacheColorSamples = 0
|
|||
[Video_Settings]
|
||||
EFBScaledExclude = 161
|
||||
EFBScaledExcludeEnabled = True
|
||||
EFBScaledExcludeDownscale = True
|
||||
|
|
|
@ -18,3 +18,4 @@ ImmediateXFBEnable = False
|
|||
[Video_Settings]
|
||||
EFBScaledExclude = 80
|
||||
EFBScaledExcludeEnabled = True
|
||||
EFBScaledExcludeDownscale = True
|
||||
|
|
|
@ -116,6 +116,8 @@ const Info<int> GFX_BLOOM_FIX_BLUR_RADIUS{{System::GFX, "Settings", "EFBScaledEx
|
|||
const Info<int> GFX_BLOOM_FIX_WIDTH{{System::GFX, "Settings", "EFBScaledExclude"}, 0};
|
||||
const Info<bool> GFX_BLOOM_FIX_ALT{{System::GFX, "Settings", "EFBScaledExcludeAlt"}, false};
|
||||
const Info<bool> GFX_BLOOM_FIX_BLUR{{System::GFX, "Settings", "EFBScaledExcludeBlur"}, false};
|
||||
const Info<bool> GFX_BLOOM_FIX_DOWNSCALE{{System::GFX, "Settings", "EFBScaledExcludeDownscale"},
|
||||
false};
|
||||
const Info<bool> GFX_BLOOM_FIX_ENABLED{{System::GFX, "Settings", "EFBScaledExcludeEnabled"}, false};
|
||||
|
||||
const Info<TriState> GFX_MTL_MANUALLY_UPLOAD_BUFFERS{
|
||||
|
|
|
@ -180,6 +180,7 @@ extern const Info<int> GFX_BLOOM_FIX_BLUR_RADIUS;
|
|||
extern const Info<int> GFX_BLOOM_FIX_WIDTH;
|
||||
extern const Info<bool> GFX_BLOOM_FIX_ALT;
|
||||
extern const Info<bool> GFX_BLOOM_FIX_BLUR;
|
||||
extern const Info<bool> GFX_BLOOM_FIX_DOWNSCALE;
|
||||
extern const Info<bool> GFX_BLOOM_FIX_ENABLED;
|
||||
|
||||
// Graphics.GameSpecific
|
||||
|
|
|
@ -198,6 +198,7 @@ void AdvancedWidget::CreateWidgets()
|
|||
m_bloom_fix_check = new ConfigBool(tr("Enabled"), Config::GFX_BLOOM_FIX_ENABLED);
|
||||
m_bloom_alt_check = new ConfigBool(tr("Filter Less"), Config::GFX_BLOOM_FIX_ALT);
|
||||
m_bloom_blur_check = new ConfigBool(tr("Use Shader"), Config::GFX_BLOOM_FIX_BLUR);
|
||||
m_bloom_downscale_check = new ConfigBool(tr("Downscale Bloom"), Config::GFX_BLOOM_FIX_DOWNSCALE);
|
||||
m_bloom_width_slider = new ConfigSlider(0, EFB_WIDTH, Config::GFX_BLOOM_FIX_WIDTH, 1);
|
||||
m_bloom_width_integer = new ConfigInteger(0, EFB_WIDTH, Config::GFX_BLOOM_FIX_WIDTH, 1);
|
||||
// Change stepping by a factor of 5. (20 = 100).
|
||||
|
@ -222,6 +223,7 @@ void AdvancedWidget::CreateWidgets()
|
|||
efb_layout_top->addStretch();
|
||||
efb_layout_top->addWidget(m_bloom_alt_check);
|
||||
efb_layout_top->addWidget(m_bloom_blur_check);
|
||||
efb_layout_top->addWidget(m_bloom_downscale_check);
|
||||
efb_layout_width_integer->addWidget(new QLabel(tr("Width < ")));
|
||||
efb_layout_width_integer->addWidget(m_bloom_width_integer);
|
||||
efb_layout_width_integer->addWidget(m_bloom_width_slider);
|
||||
|
@ -327,6 +329,8 @@ void AdvancedWidget::UpdateBloomControls()
|
|||
const bool checked = m_bloom_fix_check->isChecked();
|
||||
const bool blur_checked = m_bloom_blur_check->isChecked();
|
||||
m_bloom_alt_check->setEnabled(checked);
|
||||
m_bloom_blur_check->setEnabled(checked);
|
||||
m_bloom_downscale_check->setEnabled(checked);
|
||||
m_bloom_width_integer->setEnabled(checked);
|
||||
m_bloom_width_slider->setEnabled(checked);
|
||||
m_bloom_blur_radius_slider->setEnabled(checked && blur_checked);
|
||||
|
@ -530,6 +534,7 @@ void AdvancedWidget::AddDescriptions()
|
|||
QT_TR_NOOP("Uses a shader to fix bloom by blurring the texture rather than downscaling it. "
|
||||
"Provides higher quality results in most games. Enables sliders for editing the "
|
||||
"shader's radius and overall bloom strength. Typically not used with Downscale.");
|
||||
|
||||
#ifdef _WIN32
|
||||
static const char TR_BORDERLESS_FULLSCREEN_DESCRIPTION[] = QT_TR_NOOP(
|
||||
"Implements fullscreen mode with a borderless window spanning the whole screen instead of "
|
||||
|
|
|
@ -87,6 +87,7 @@ private:
|
|||
ConfigBool* m_bloom_fix_check;
|
||||
ConfigBool* m_bloom_alt_check;
|
||||
ConfigBool* m_bloom_blur_check;
|
||||
ConfigBool* m_bloom_downscale_check;
|
||||
ConfigInteger* m_bloom_width_integer;
|
||||
ConfigSlider* m_bloom_width_slider;
|
||||
ConfigSlider* m_bloom_strength_slider;
|
||||
|
|
|
@ -2368,21 +2368,17 @@ void TextureCacheBase::CopyRenderTargetToTexture(
|
|||
}
|
||||
|
||||
bool scale_efb = is_xfb_copy || g_ActiveConfig.bCopyEFBScaled;
|
||||
bool EFBBlur = false;
|
||||
bool use_blur_shader = false;
|
||||
|
||||
// Bloom correction detection
|
||||
if (scale_efb && !is_xfb_copy && g_ActiveConfig.bEFBExcludeEnabled &&
|
||||
width <= g_ActiveConfig.iEFBExcludeWidth)
|
||||
// Bloom correction detection.
|
||||
if (!is_xfb_copy && g_ActiveConfig.bEFBExcludeEnabled &&
|
||||
width <= g_ActiveConfig.iEFBExcludeWidth &&
|
||||
(!g_ActiveConfig.bEFBExcludeAlt || m_bloom_dst_check == dst))
|
||||
{
|
||||
if (!g_ActiveConfig.bEFBExcludeAlt || m_bloom_dst_check == dst)
|
||||
scale_efb = false;
|
||||
|
||||
if (g_ActiveConfig.bEFBBlur && scale_efb == false)
|
||||
{
|
||||
// Scale it but blur it to fix.
|
||||
scale_efb = true;
|
||||
EFBBlur = g_ActiveConfig.bEFBBlur;
|
||||
}
|
||||
// Poorly upscaled EFB detected.
|
||||
// Will accept the blur shader being used on unscaled EFBs as well.
|
||||
use_blur_shader = g_ActiveConfig.bEFBBlur;
|
||||
scale_efb = !g_ActiveConfig.bEFBExcludeDownscale && g_ActiveConfig.bCopyEFBScaled;
|
||||
}
|
||||
|
||||
if (!scale_efb)
|
||||
|
@ -2476,7 +2472,7 @@ void TextureCacheBase::CopyRenderTargetToTexture(
|
|||
GetVRAMCopyFilterCoefficients(filter_coefficients));
|
||||
|
||||
// Bloom fix
|
||||
if (EFBBlur == true &&
|
||||
if (use_blur_shader == true &&
|
||||
(baseFormat == TextureFormat::RGB565 || baseFormat == TextureFormat::RGBA8))
|
||||
{
|
||||
BlurCopy(entry);
|
||||
|
|
|
@ -141,6 +141,7 @@ void VideoConfig::Refresh()
|
|||
iEFBExcludeBlurRadius = Config::Get(Config::GFX_BLOOM_FIX_BLUR_RADIUS);
|
||||
bEFBExcludeAlt = Config::Get(Config::GFX_BLOOM_FIX_ALT);
|
||||
bEFBBlur = Config::Get(Config::GFX_BLOOM_FIX_BLUR);
|
||||
bEFBExcludeDownscale = Config::Get(Config::GFX_BLOOM_FIX_DOWNSCALE);
|
||||
bEFBExcludeEnabled = Config::Get(Config::GFX_BLOOM_FIX_ENABLED);
|
||||
bTexFmtOverlayEnable = Config::Get(Config::GFX_TEXFMT_OVERLAY_ENABLE);
|
||||
bTexFmtOverlayCenter = Config::Get(Config::GFX_TEXFMT_OVERLAY_CENTER);
|
||||
|
|
|
@ -243,6 +243,7 @@ struct VideoConfig final
|
|||
u32 iEFBExcludeBlurRadius = 4;
|
||||
bool bEFBExcludeAlt = false;
|
||||
bool bEFBBlur = false;
|
||||
bool bEFBExcludeDownscale = false;
|
||||
bool bEFBExcludeEnabled = false;
|
||||
|
||||
// Stereoscopy
|
||||
|
|
Loading…
Reference in New Issue