From 0b76da7c003bc5f15a3beba3e4ea9262b27a82c1 Mon Sep 17 00:00:00 2001 From: medievil1 <38597905+medievil1@users.noreply.github.com> Date: Sun, 17 Jul 2022 23:38:41 -0400 Subject: [PATCH] per review remarls moved the case to the else statement and added a log entry --- src/core/hle/D3D8/XbPixelShader.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/core/hle/D3D8/XbPixelShader.cpp b/src/core/hle/D3D8/XbPixelShader.cpp index 8803186e2..38dc2cf36 100644 --- a/src/core/hle/D3D8/XbPixelShader.cpp +++ b/src/core/hle/D3D8/XbPixelShader.cpp @@ -489,10 +489,6 @@ typedef struct s_CxbxPSDef { void AdjustTextureModes(DecodedRegisterCombiner &RC) { - if (RC.PSTextureModes[3] == PS_TEXTUREMODES_DOT_STR_3D) { - RC.TexModeAdjust = true; - } - // if this flag is set, the texture mode for each texture stage is adjusted as follows: if (RC.TexModeAdjust) { for (int i = 0; i < xbox::X_D3DTS_STAGECOUNT; i++) { @@ -560,6 +556,14 @@ typedef struct s_CxbxPSDef { EmuLog(LOG_LEVEL::WARNING, "PROJECT2D sampling is used with a cubemap texture - using CUBEMAP sampling instead"); RC.PSTextureModes[i] = PS_TEXTUREMODES_CUBEMAP; } + // Test-case: MS-033 Crimson Skies (Plane texturing in-game and selection menu) + // HACK: use the TexModeAdjust path to downgrade PS_TEXTUREMODES_DOT_STR_3D to PS_TEXTUREMODES_DOT_STR_CUBE for cube textures. + if (ActiveTextureTypes[i] == xbox::X_D3DRTYPE_CUBETEXTURE && RC.PSTextureModes[i] == PS_TEXTUREMODES_DOT_STR_3D) { + EmuLog(LOG_LEVEL::WARNING, "DOT_STR_3D sampling is used with a cubemap texture - using DOT_STR_CUBE sampling instead"); + RC.PSTextureModes[i] = PS_TEXTUREMODES_DOT_STR_CUBE; + } + + } } }