mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-08-25 07:36:45 +00:00
Added Force FG render size motion vectors quirk for WWM
This commit is contained in:
@@ -1337,6 +1337,9 @@ static void printQuirks(flag_set<GameQuirk>& quirks)
|
||||
if (quirks & GameQuirk::IgnoreValidUntilEvaluateForFG)
|
||||
stringQuirks.push_back("Ignore ValidUntilEvaluate resources for FG");
|
||||
|
||||
if (quirks & GameQuirk::ForceFGRenderSizeMVs)
|
||||
stringQuirks.push_back("Force FG render size motion vectors");
|
||||
|
||||
state->detectedQuirks.append_range(stringQuirks);
|
||||
for (auto& stringQuirk : stringQuirks)
|
||||
spdlog::info("Quirk: {}", stringQuirk);
|
||||
|
||||
@@ -1081,8 +1081,11 @@ void FSRFG_Dx12::CreateContext(ID3D12Device* device, FG_Constants& fgConstants)
|
||||
if (fgConstants.flags & FG_Flags::JitteredMVs)
|
||||
createFg.flags |= FFX_FRAMEGENERATION_ENABLE_MOTION_VECTORS_JITTER_CANCELLATION;
|
||||
|
||||
if (fgConstants.flags & FG_Flags::DisplayResolutionMVs)
|
||||
if ((fgConstants.flags & FG_Flags::DisplayResolutionMVs) &&
|
||||
!(State::Instance().gameQuirks & GameQuirk::ForceFGRenderSizeMVs))
|
||||
{
|
||||
createFg.flags |= FFX_FRAMEGENERATION_ENABLE_DISPLAY_RESOLUTION_MOTION_VECTORS;
|
||||
}
|
||||
|
||||
if (fgConstants.flags & FG_Flags::Async)
|
||||
createFg.flags |= FFX_FRAMEGENERATION_ENABLE_ASYNC_WORKLOAD_SUPPORT;
|
||||
|
||||
@@ -609,7 +609,8 @@ void XeFG_Dx12::Activate()
|
||||
nativeAA = currentFeature->RenderWidth() == currentFeature->DisplayWidth();
|
||||
|
||||
if (_swapChainContext != nullptr && _fgContext != nullptr && !_isActive &&
|
||||
(IsLowResMV() || nativeAA || Config::Instance()->FGXeFGIgnoreInitChecks.value_or_default()))
|
||||
(IsLowResMV() || nativeAA || (State::Instance().gameQuirks & GameQuirk::ForceFGRenderSizeMVs) ||
|
||||
Config::Instance()->FGXeFGIgnoreInitChecks.value_or_default()))
|
||||
{
|
||||
auto result = XeFGProxy::SetEnabled()(_swapChainContext, true);
|
||||
|
||||
|
||||
@@ -4356,7 +4356,9 @@ bool MenuCommon::RenderMenu()
|
||||
nativeAA = currentFeature->RenderWidth() == currentFeature->DisplayWidth();
|
||||
|
||||
auto fgOutput = reinterpret_cast<IFGFeature_Dx12*>(state.currentFG);
|
||||
const bool correctMVs = fgOutput && fgOutput->IsLowResMV() || nativeAA || ignoreChecks;
|
||||
const bool correctMVs = fgOutput && fgOutput->IsLowResMV() || nativeAA ||
|
||||
(State::Instance().gameQuirks & GameQuirk::ForceFGRenderSizeMVs) ||
|
||||
ignoreChecks;
|
||||
|
||||
if (!correctMVs || state.realExclusiveFullscreen)
|
||||
{
|
||||
|
||||
@@ -63,6 +63,7 @@ enum class GameQuirk : uint64_t
|
||||
ForceDepthD32S8,
|
||||
PregmataFixDLSSModes,
|
||||
IgnoreValidUntilEvaluateForFG,
|
||||
ForceFGRenderSizeMVs,
|
||||
// Don't forget to add the new entry to printQuirks
|
||||
_
|
||||
};
|
||||
@@ -121,7 +122,7 @@ static const QuirkEntry quirkTable[] = {
|
||||
|
||||
// Where Winds Meet
|
||||
// Required to avoid forced DLSS dilated MVs
|
||||
QUIRK_ENTRY("wwm.exe", GameQuirk::DisableXeFGChecks),
|
||||
QUIRK_ENTRY("wwm.exe", GameQuirk::ForceFGRenderSizeMVs),
|
||||
|
||||
// Arknights: Endfield
|
||||
// Reflex hooking crashes the game
|
||||
|
||||
Reference in New Issue
Block a user