diff --git a/src/core/hle/D3D8/XbPixelShader.cpp b/src/core/hle/D3D8/XbPixelShader.cpp index 87c1aeeb7..aaa414651 100644 --- a/src/core/hle/D3D8/XbPixelShader.cpp +++ b/src/core/hle/D3D8/XbPixelShader.cpp @@ -768,7 +768,12 @@ IDirect3DPixelShader9* GetFixedFunctionShader() bool previousStageDisabled = false; for (int i = 0; i < 4; i++) { - // Determine the COLOROP + // Determine COLOROP + // This controls both the texture operation for the colour of the stage + // and when to stop processing + // Under certain circumstances we force it to be DISABLE + auto colorOp = XboxTextureStates.Get(i, xbox::X_D3DTSS_COLOROP); + // Usually we execute stages up to the first disabled stage // However, if point sprites are enabled, we just execute stage 3 bool forceDisable = @@ -784,12 +789,12 @@ IDirect3DPixelShader9* GetFixedFunctionShader() // Test case: Crash Nitro Kart (engine speed UI) if (!g_pXbox_SetTexture[i] && XboxTextureStates.Get(i, xbox::X_D3DTSS_COLORARG1) == X_D3DTA_TEXTURE - && XboxTextureStates.Get(i, xbox::X_D3DTSS_COLOROP) != xbox::X_D3DTOP_SELECTARG2) + && colorOp != xbox::X_D3DTOP_SELECTARG2) { forceDisable = true; } - auto colorOp = XboxTextureStates.Get(i, xbox::X_D3DTSS_COLOROP); + // Set the final COLOROP value states[i].COLOROP = forceDisable ? X_D3DTOP_DISABLE : colorOp; // If the stage is disabled we don't want its configuration to affect the key