Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #10796 from iwubcode/graphics_mod_overeager_projec…
…tion_change

VideoCommon: fix projection graphics mod affecting more than intended
  • Loading branch information
JMC47 committed Jun 30, 2022
2 parents 5d04e1e + 4788a05 commit a12b9ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Core/VideoCommon/VertexShaderManager.cpp
Expand Up @@ -38,6 +38,7 @@ static bool bProjectionChanged;
static bool bViewportChanged;
static bool bTexMtxInfoChanged;
static bool bLightingConfigChanged;
static bool bProjectionGraphicsModChange;
static BitSet32 nMaterialsChanged;
static std::array<int, 2> nTransformMatricesChanged; // min,max
static std::array<int, 2> nNormalMatricesChanged; // min,max
Expand All @@ -63,6 +64,7 @@ void VertexShaderManager::Init()
bViewportChanged = false;
bTexMtxInfoChanged = false;
bLightingConfigChanged = false;
bProjectionGraphicsModChange = false;

std::memset(static_cast<void*>(&xfmem), 0, sizeof(xfmem));
constants = {};
Expand Down Expand Up @@ -322,9 +324,10 @@ void VertexShaderManager::SetConstants(const std::vector<std::string>& textures)
}

if (bProjectionChanged || g_freelook_camera.GetController()->IsDirty() ||
!projection_actions.empty())
!projection_actions.empty() || bProjectionGraphicsModChange)
{
bProjectionChanged = false;
bProjectionGraphicsModChange = !projection_actions.empty();

const auto& rawProjection = xfmem.projection.rawProjection;

Expand Down

0 comments on commit a12b9ba

Please sign in to comment.