VideoConfig: Add an option to force RGB8 EFB format.

This commit is contained in:
Jules Blok 2016-09-08 02:43:34 +02:00
parent 31a4ee7bfc
commit 365e88e311
4 changed files with 12 additions and 1 deletions

View File

@ -275,6 +275,10 @@ static wxString validation_layer_desc =
static wxString backend_multithreading_desc = static wxString backend_multithreading_desc =
wxTRANSLATE("Enables multi-threading in the video backend, which may result in performance " wxTRANSLATE("Enables multi-threading in the video backend, which may result in performance "
"gains in some scenarios.\n\nIf unsure, leave this unchecked."); "gains in some scenarios.\n\nIf unsure, leave this unchecked.");
static wxString true_color_desc =
wxTRANSLATE("Forces the game to render the RGB color channels in 24-bit, thereby increasing "
"quality by reducing color banding.\nIt has no impact on performance and causes "
"few graphical issues.\n\n\nIf unsure, leave this unchecked.");
#if !defined(__APPLE__) #if !defined(__APPLE__)
// Search for available resolutions - TODO: Move to Common? // Search for available resolutions - TODO: Move to Common?
@ -618,6 +622,8 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string& title)
vconfig.bWidescreenHack)); vconfig.bWidescreenHack));
cb_szr->Add(CreateCheckBox(page_enh, _("Disable Fog"), wxGetTranslation(disable_fog_desc), cb_szr->Add(CreateCheckBox(page_enh, _("Disable Fog"), wxGetTranslation(disable_fog_desc),
vconfig.bDisableFog)); vconfig.bDisableFog));
cb_szr->Add(CreateCheckBox(page_enh, _("Force True Color"), wxGetTranslation(true_color_desc),
vconfig.bForceTrueColor));
szr_enh->Add(cb_szr, wxGBPosition(row, 0), wxGBSpan(1, 3)); szr_enh->Add(cb_szr, wxGBPosition(row, 0), wxGBSpan(1, 3));
row += 1; row += 1;

View File

@ -169,7 +169,8 @@ PixelShaderUid GetPixelShaderUid(DSTALPHA_MODE dstAlphaMode)
uid_data->per_pixel_lighting = g_ActiveConfig.bEnablePixelLighting; uid_data->per_pixel_lighting = g_ActiveConfig.bEnablePixelLighting;
uid_data->bounding_box = g_ActiveConfig.backend_info.bSupportsBBox && uid_data->bounding_box = g_ActiveConfig.backend_info.bSupportsBBox &&
g_ActiveConfig.bBBoxEnable && BoundingBox::active; g_ActiveConfig.bBBoxEnable && BoundingBox::active;
uid_data->rgba6_format = bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24; uid_data->rgba6_format =
bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24 && !g_ActiveConfig.bForceTrueColor;
uid_data->dither = bpmem.blendmode.dither; uid_data->dither = bpmem.blendmode.dither;
u32 numStages = uid_data->genMode_numtevstages + 1; u32 numStages = uid_data->genMode_numtevstages + 1;

View File

@ -103,6 +103,7 @@ void VideoConfig::Load(const std::string& ini_file)
enhancements->Get("ForceFiltering", &bForceFiltering, 0); enhancements->Get("ForceFiltering", &bForceFiltering, 0);
enhancements->Get("MaxAnisotropy", &iMaxAnisotropy, 0); // NOTE - this is x in (1 << x) enhancements->Get("MaxAnisotropy", &iMaxAnisotropy, 0); // NOTE - this is x in (1 << x)
enhancements->Get("PostProcessingShader", &sPostProcessingShader, ""); enhancements->Get("PostProcessingShader", &sPostProcessingShader, "");
enhancements->Get("ForceTrueColor", &bForceTrueColor, false);
IniFile::Section* stereoscopy = iniFile.GetOrCreateSection("Stereoscopy"); IniFile::Section* stereoscopy = iniFile.GetOrCreateSection("Stereoscopy");
stereoscopy->Get("StereoMode", &iStereoMode, 0); stereoscopy->Get("StereoMode", &iStereoMode, 0);
@ -167,6 +168,7 @@ void VideoConfig::GameIniLoad()
CHECK_SETTING("Video_Settings", "FastDepthCalc", bFastDepthCalc); CHECK_SETTING("Video_Settings", "FastDepthCalc", bFastDepthCalc);
CHECK_SETTING("Video_Settings", "MSAA", iMultisamples); CHECK_SETTING("Video_Settings", "MSAA", iMultisamples);
CHECK_SETTING("Video_Settings", "SSAA", bSSAA); CHECK_SETTING("Video_Settings", "SSAA", bSSAA);
CHECK_SETTING("Video_Settings", "ForceTrueColor", bForceTrueColor);
int tmp = -9000; int tmp = -9000;
CHECK_SETTING("Video_Settings", "EFBScale", tmp); // integral CHECK_SETTING("Video_Settings", "EFBScale", tmp); // integral
@ -317,6 +319,7 @@ void VideoConfig::Save(const std::string& ini_file)
enhancements->Set("ForceFiltering", bForceFiltering); enhancements->Set("ForceFiltering", bForceFiltering);
enhancements->Set("MaxAnisotropy", iMaxAnisotropy); enhancements->Set("MaxAnisotropy", iMaxAnisotropy);
enhancements->Set("PostProcessingShader", sPostProcessingShader); enhancements->Set("PostProcessingShader", sPostProcessingShader);
enhancements->Set("ForceTrueColor", bForceTrueColor);
IniFile::Section* stereoscopy = iniFile.GetOrCreateSection("Stereoscopy"); IniFile::Section* stereoscopy = iniFile.GetOrCreateSection("Stereoscopy");
stereoscopy->Set("StereoMode", iStereoMode); stereoscopy->Set("StereoMode", iStereoMode);

View File

@ -79,6 +79,7 @@ struct VideoConfig final
bool bForceFiltering; bool bForceFiltering;
int iMaxAnisotropy; int iMaxAnisotropy;
std::string sPostProcessingShader; std::string sPostProcessingShader;
bool bForceTrueColor;
// Information // Information
bool bShowFPS; bool bShowFPS;