mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 12:51:42 +00:00
config: replace MSAA with AntiAliasing enum
This commit is contained in:
parent
e14439626d
commit
2deb17d8c0
5 changed files with 31 additions and 6 deletions
|
|
@ -45,7 +45,7 @@ public:
|
||||||
CONFIG_DEFINE_LOCALISED("Video", bool, TripleBuffering, true);
|
CONFIG_DEFINE_LOCALISED("Video", bool, TripleBuffering, true);
|
||||||
CONFIG_DEFINE("Video", int32_t, FPS, 60);
|
CONFIG_DEFINE("Video", int32_t, FPS, 60);
|
||||||
CONFIG_DEFINE_LOCALISED("Video", float, Brightness, 0.5f);
|
CONFIG_DEFINE_LOCALISED("Video", float, Brightness, 0.5f);
|
||||||
CONFIG_DEFINE_LOCALISED("Video", size_t, MSAA, 4);
|
CONFIG_DEFINE_ENUM_LOCALISED("Video", EAntiAliasing, AntiAliasing, EAntiAliasing::MSAA4x);
|
||||||
CONFIG_DEFINE_LOCALISED("Video", size_t, AnisotropicFiltering, 16);
|
CONFIG_DEFINE_LOCALISED("Video", size_t, AnisotropicFiltering, 16);
|
||||||
CONFIG_DEFINE_ENUM_LOCALISED("Video", EShadowResolution, ShadowResolution, EShadowResolution::x4096);
|
CONFIG_DEFINE_ENUM_LOCALISED("Video", EShadowResolution, ShadowResolution, EShadowResolution::x4096);
|
||||||
CONFIG_DEFINE_ENUM_LOCALISED("Video", EGITextureFiltering, GITextureFiltering, EGITextureFiltering::Bicubic);
|
CONFIG_DEFINE_ENUM_LOCALISED("Video", EGITextureFiltering, GITextureFiltering, EGITextureFiltering::Bicubic);
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,22 @@ CONFIG_DEFINE_ENUM_TEMPLATE(EWindowState)
|
||||||
{ "Maximized", EWindowState::Maximised }
|
{ "Maximized", EWindowState::Maximised }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class EAntiAliasing : uint32_t
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
MSAA2x = 2,
|
||||||
|
MSAA4x = 4,
|
||||||
|
MSAA8x = 8
|
||||||
|
};
|
||||||
|
|
||||||
|
CONFIG_DEFINE_ENUM_TEMPLATE(EAntiAliasing)
|
||||||
|
{
|
||||||
|
{ "None", EAntiAliasing::None },
|
||||||
|
{ "2x MSAA", EAntiAliasing::MSAA2x },
|
||||||
|
{ "4x MSAA", EAntiAliasing::MSAA4x },
|
||||||
|
{ "8x MSAA", EAntiAliasing::MSAA8x }
|
||||||
|
};
|
||||||
|
|
||||||
enum class EShadowResolution : int32_t
|
enum class EShadowResolution : int32_t
|
||||||
{
|
{
|
||||||
Original = -1,
|
Original = -1,
|
||||||
|
|
|
||||||
|
|
@ -171,11 +171,21 @@ CONFIG_DEFINE_LOCALE(Brightness)
|
||||||
{ ELanguage::English, "Brightness" }
|
{ ELanguage::English, "Brightness" }
|
||||||
};
|
};
|
||||||
|
|
||||||
CONFIG_DEFINE_LOCALE(MSAA)
|
CONFIG_DEFINE_LOCALE(AntiAliasing)
|
||||||
{
|
{
|
||||||
{ ELanguage::English, "Anti-Aliasing" }
|
{ ELanguage::English, "Anti-Aliasing" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CONFIG_DEFINE_ENUM_LOCALE(EAntiAliasing)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
ELanguage::English,
|
||||||
|
{
|
||||||
|
{ EAntiAliasing::None, "NONE" },
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
CONFIG_DEFINE_LOCALE(AnisotropicFiltering)
|
CONFIG_DEFINE_LOCALE(AnisotropicFiltering)
|
||||||
{
|
{
|
||||||
{ ELanguage::English, "Anisotropic Filtering" }
|
{ ELanguage::English, "Anisotropic Filtering" }
|
||||||
|
|
|
||||||
|
|
@ -1843,7 +1843,7 @@ static GuestSurface* CreateSurface(uint32_t width, uint32_t height, uint32_t for
|
||||||
desc.depth = 1;
|
desc.depth = 1;
|
||||||
desc.mipLevels = 1;
|
desc.mipLevels = 1;
|
||||||
desc.arraySize = 1;
|
desc.arraySize = 1;
|
||||||
desc.multisampling.sampleCount = multiSample != 0 && Config::MSAA > 1 ? Config::MSAA : RenderSampleCount::COUNT_1;
|
desc.multisampling.sampleCount = multiSample != 0 && (int)Config::AntiAliasing.Value > 1 ? (int)Config::AntiAliasing.Value : RenderSampleCount::COUNT_1;
|
||||||
desc.format = ConvertFormat(format);
|
desc.format = ConvertFormat(format);
|
||||||
desc.flags = desc.format == RenderFormat::D32_FLOAT ? RenderTextureFlag::DEPTH_TARGET : RenderTextureFlag::RENDER_TARGET;
|
desc.flags = desc.format == RenderFormat::D32_FLOAT ? RenderTextureFlag::DEPTH_TARGET : RenderTextureFlag::RENDER_TARGET;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -392,15 +392,14 @@ static void DrawConfigOptions()
|
||||||
DrawConfigOption(rowIndex++, Config::WerehogBattleMusic);
|
DrawConfigOption(rowIndex++, Config::WerehogBattleMusic);
|
||||||
break;
|
break;
|
||||||
case 3: // VIDEO
|
case 3: // VIDEO
|
||||||
DrawConfigOption(rowIndex++, Config::WindowWidth);
|
// TODO: expose WindowWidth/WindowHeight as WindowSize.
|
||||||
DrawConfigOption(rowIndex++, Config::WindowHeight);
|
|
||||||
DrawConfigOption(rowIndex++, Config::ResolutionScale);
|
DrawConfigOption(rowIndex++, Config::ResolutionScale);
|
||||||
DrawConfigOption(rowIndex++, Config::Fullscreen);
|
DrawConfigOption(rowIndex++, Config::Fullscreen);
|
||||||
DrawConfigOption(rowIndex++, Config::VSync);
|
DrawConfigOption(rowIndex++, Config::VSync);
|
||||||
DrawConfigOption(rowIndex++, Config::TripleBuffering);
|
DrawConfigOption(rowIndex++, Config::TripleBuffering);
|
||||||
DrawConfigOption(rowIndex++, Config::FPS);
|
DrawConfigOption(rowIndex++, Config::FPS);
|
||||||
DrawConfigOption(rowIndex++, Config::Brightness);
|
DrawConfigOption(rowIndex++, Config::Brightness);
|
||||||
DrawConfigOption(rowIndex++, Config::MSAA);
|
DrawConfigOption(rowIndex++, Config::AntiAliasing);
|
||||||
DrawConfigOption(rowIndex++, Config::ShadowResolution);
|
DrawConfigOption(rowIndex++, Config::ShadowResolution);
|
||||||
DrawConfigOption(rowIndex++, Config::GITextureFiltering);
|
DrawConfigOption(rowIndex++, Config::GITextureFiltering);
|
||||||
DrawConfigOption(rowIndex++, Config::AlphaToCoverage);
|
DrawConfigOption(rowIndex++, Config::AlphaToCoverage);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue