diff --git a/bin/resources/shaders/dx11/tfx.fx b/bin/resources/shaders/dx11/tfx.fx index e80ccfb669..8d54b4aab7 100644 --- a/bin/resources/shaders/dx11/tfx.fx +++ b/bin/resources/shaders/dx11/tfx.fx @@ -1729,6 +1729,11 @@ VS_OUTPUT vs_main_expand(uint vid : SV_VertexID) } vtx.interior = 0; + + #if !VS_IIP + // Get the provoking vertex color (first vertex in DX) + vtx.c = i0 == 0 ? vtx.c : (i1 == 0 ? other.c : opposite.c); + #endif } return vtx; diff --git a/bin/resources/shaders/opengl/tfx_vgs.glsl b/bin/resources/shaders/opengl/tfx_vgs.glsl index 1ad26c653d..657f380451 100644 --- a/bin/resources/shaders/opengl/tfx_vgs.glsl +++ b/bin/resources/shaders/opengl/tfx_vgs.glsl @@ -308,6 +308,11 @@ void main() } VSout.interior = 0; + + #if !VS_IIP + // Get the provoking vertex color (last vertex in GL) + vtx.c = i0 == 2 ? vtx.c : (i1 == 2 ? other.c : opposite.c); + #endif } #endif diff --git a/bin/resources/shaders/vulkan/tfx.glsl b/bin/resources/shaders/vulkan/tfx.glsl index 428aa1dd58..5c47aa5b4c 100644 --- a/bin/resources/shaders/vulkan/tfx.glsl +++ b/bin/resources/shaders/vulkan/tfx.glsl @@ -316,6 +316,11 @@ void main() } vsOut.interior = 0; + + #if !VS_IIP + // Get the provoking vertex color (last vertex in VK) + vtx.c = i0 == 2 ? vtx.c : (i1 == 2 ? other.c : opposite.c); + #endif } #endif diff --git a/pcsx2/GS/Renderers/Metal/tfx.metal b/pcsx2/GS/Renderers/Metal/tfx.metal index 2fe5a44639..cec12ffaf4 100644 --- a/pcsx2/GS/Renderers/Metal/tfx.metal +++ b/pcsx2/GS/Renderers/Metal/tfx.metal @@ -396,6 +396,12 @@ vertex MainVSOut vs_main_expand( } out.interior = 0; + + if (NOT_IIP) + { + // Get the provoking vertex color (first vertex in Metal) + out.fc = i0 == 0 ? out.fc : (i1 == 0 ? other.fc : opposite.fc); + } } return out; diff --git a/pcsx2/ShaderCacheVersion.h b/pcsx2/ShaderCacheVersion.h index 32765f3af3..50cb34663b 100644 --- a/pcsx2/ShaderCacheVersion.h +++ b/pcsx2/ShaderCacheVersion.h @@ -3,4 +3,4 @@ /// Version number for GS and other shaders. Increment whenever any of the contents of the /// shaders change, to invalidate the cache. -static constexpr u32 SHADER_CACHE_VERSION = 92; // Last changed in PR 14399 +static constexpr u32 SHADER_CACHE_VERSION = 93; // Last changed in PR 14435