Compare commits

...

6 Commits

Author SHA1 Message Date
PCSX2 Bot
4c5253c0f5 Qt: Update Base Translation 2024-08-11 07:46:00 +02:00
Mrlinkwii
325133e54c GameDB: add missing serial 2024-08-11 00:50:33 +02:00
JordanTheToaster
4113ac574d GameDB: ATV Offroad Fury 2 Fixes
Adds bilinear upscale nearest to fix garbage textures.
2024-08-11 00:47:48 +02:00
JordanTheToaster
2d6c687913 GSTextureCache: Extend Bilinear Upscale to dirty depth 2024-08-11 00:47:48 +02:00
lightningterror
f9fbecc783 GS: Match data types in shaders to be the same when doing bitwise operations. 2024-08-11 00:35:42 +02:00
seta-san
c5ceba35b6 Qt: Update Texture Filtering Description
Qt: Update Texture Filtering Description
2024-08-10 18:25:44 -04:00
8 changed files with 387 additions and 363 deletions

View File

@@ -7169,6 +7169,12 @@ SCKA-20087:
nativeScaling: 2 # Fixes post processing smoothness and position.
memcardFilters:
- "SCKA-20086"
SCKA-20088:
name: "모두의 테니스"
name-en: "Everybody's Tennis"
region: "NTSC-K"
roundModes:
vu1RoundMode: 1 # Fixes the display of scores and text ingame.
SCKA-20089:
name: "BioHazard 4"
region: "NTSC-K"
@@ -10406,6 +10412,8 @@ SCUS-97211:
name: "ATV Offroad Fury 2"
region: "NTSC-U"
compat: 5
gsHWFixes:
bilinearUpscale: 2 # Fixes broken textures.
SCUS-97212:
name: "My Street"
region: "NTSC-U"
@@ -10523,6 +10531,8 @@ SCUS-97236:
SCUS-97238:
name: "ATV Offroad Fury 2 [Demo]"
region: "NTSC-U"
gsHWFixes:
bilinearUpscale: 2 # Fixes broken textures.
SCUS-97239:
name: "Jet X2O [Demo]"
region: "NTSC-U"
@@ -10929,6 +10939,8 @@ SCUS-97369:
name: "ATV Offroad Fury 2"
region: "NTSC-U"
compat: 5
gsHWFixes:
bilinearUpscale: 2 # Fixes broken textures.
SCUS-97370:
name: "NCAA Final Four 2004"
region: "NTSC-U"
@@ -11571,6 +11583,8 @@ SCUS-97509:
SCUS-97510:
name: "ATV Offroad Fury 2 [Greatest Hits]"
region: "NTSC-U"
gsHWFixes:
bilinearUpscale: 2 # Fixes broken textures.
SCUS-97511:
name: "SOCOM II - U.S. Navy SEALs [Greatest Hits]"
region: "NTSC-U"
@@ -17359,6 +17373,8 @@ SLES-51813:
SLES-51814:
name: "ATV Offroad Fury 2"
region: "PAL-E"
gsHWFixes:
bilinearUpscale: 2 # Fixes broken textures.
SLES-51815:
name: "Final Fantasy X-2"
region: "PAL-E"
@@ -67117,6 +67133,8 @@ SLUS-21638:
compat: 5
clampModes:
vuClampMode: 3 # Missing geometry with microVU.
memcardFilters:
- "SLUS-21620"
SLUS-21639:
name: "NASCAR 08"
region: "NTSC-U"

View File

@@ -772,17 +772,17 @@ float4 ps_color(PS_INPUT input)
uint4 denorm_c_before = uint4(T);
if (PS_PROCESS_BA & SHUFFLE_READ)
{
T.r = float((denorm_c_before.b << 3) & 0xF8);
T.g = float(((denorm_c_before.b >> 2) & 0x38) | ((denorm_c_before.a << 6) & 0xC0));
T.b = float((denorm_c_before.a << 1) & 0xF8);
T.a = float(denorm_c_before.a & 0x80);
T.r = float((denorm_c_before.b << 3) & 0xF8u);
T.g = float(((denorm_c_before.b >> 2) & 0x38u) | ((denorm_c_before.a << 6) & 0xC0u));
T.b = float((denorm_c_before.a << 1) & 0xF8u);
T.a = float(denorm_c_before.a & 0x80u);
}
else
{
T.r = float((denorm_c_before.r << 3) & 0xF8);
T.g = float(((denorm_c_before.r >> 2) & 0x38) | ((denorm_c_before.g << 6) & 0xC0));
T.b = float((denorm_c_before.g << 1) & 0xF8);
T.a = float(denorm_c_before.g & 0x80);
T.r = float((denorm_c_before.r << 3) & 0xF8u);
T.g = float(((denorm_c_before.r >> 2) & 0x38u) | ((denorm_c_before.g << 6) & 0xC0u));
T.b = float((denorm_c_before.g << 1) & 0xF8u);
T.a = float(denorm_c_before.g & 0x80u);
}
T.a = (T.a >= 127.5f ? TA.y : !PS_AEM || any(int3(T.rgb) & 0xF8) ? TA.x : 0) * 255.0f;
@@ -874,17 +874,17 @@ void ps_blend(inout float4 Color, inout float4 As_rgba, float2 pos_xy)
uint4 denorm_rt = uint4(RT);
if (PS_PROCESS_BA & SHUFFLE_WRITE)
{
RT.r = float((denorm_rt.b << 3) & 0xF8);
RT.g = float(((denorm_rt.b >> 2) & 0x38) | ((denorm_rt.a << 6) & 0xC0));
RT.b = float((denorm_rt.a << 1) & 0xF8);
RT.a = float(denorm_rt.a & 0x80);
RT.r = float((denorm_rt.b << 3) & 0xF8u);
RT.g = float(((denorm_rt.b >> 2) & 0x38u) | ((denorm_rt.a << 6) & 0xC0u));
RT.b = float((denorm_rt.a << 1) & 0xF8u);
RT.a = float(denorm_rt.a & 0x80u);
}
else
{
RT.r = float((denorm_rt.r << 3) & 0xF8);
RT.g = float(((denorm_rt.r >> 2) & 0x38) | ((denorm_rt.g << 6) & 0xC0));
RT.b = float((denorm_rt.g << 1) & 0xF8);
RT.a = float(denorm_rt.g & 0x80);
RT.r = float((denorm_rt.r << 3) & 0xF8u);
RT.g = float(((denorm_rt.r >> 2) & 0x38u) | ((denorm_rt.g << 6) & 0xC0u));
RT.b = float((denorm_rt.g << 1) & 0xF8u);
RT.a = float(denorm_rt.g & 0x80u);
}
}
@@ -1067,13 +1067,13 @@ PS_OUTPUT ps_main(PS_INPUT input)
uint4 denorm_c_after = uint4(C);
if (PS_PROCESS_BA & SHUFFLE_READ)
{
C.b = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
C.a = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
C.b = float(((denorm_c_after.r >> 3) & 0x1Fu) | ((denorm_c_after.g << 2) & 0xE0u));
C.a = float(((denorm_c_after.g >> 6) & 0x3u) | ((denorm_c_after.b >> 1) & 0x7Cu) | (denorm_c_after.a & 0x80u));
}
else
{
C.r = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
C.g = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
C.r = float(((denorm_c_after.r >> 3) & 0x1Fu) | ((denorm_c_after.g << 2) & 0xE0u));
C.g = float(((denorm_c_after.g >> 6) & 0x3u) | ((denorm_c_after.b >> 1) & 0x7Cu) | (denorm_c_after.a & 0x80u));
}
}

View File

@@ -681,15 +681,15 @@ vec4 ps_color()
#if PS_SHUFFLE && !PS_READ16_SRC && !PS_SHUFFLE_SAME
uvec4 denorm_c_before = uvec4(T);
#if (PS_PROCESS_BA & SHUFFLE_READ)
T.r = float((denorm_c_before.b << 3) & 0xF8);
T.g = float(((denorm_c_before.b >> 2) & 0x38) | ((denorm_c_before.a << 6) & 0xC0));
T.b = float((denorm_c_before.a << 1) & 0xF8);
T.a = float(denorm_c_before.a & 0x80);
T.r = float((denorm_c_before.b << 3) & 0xF8u);
T.g = float(((denorm_c_before.b >> 2) & 0x38u) | ((denorm_c_before.a << 6) & 0xC0u));
T.b = float((denorm_c_before.a << 1) & 0xF8u);
T.a = float(denorm_c_before.a & 0x80u);
#else
T.r = float((denorm_c_before.r << 3) & 0xF8);
T.g = float(((denorm_c_before.r >> 2) & 0x38) | ((denorm_c_before.g << 6) & 0xC0));
T.b = float((denorm_c_before.g << 1) & 0xF8);
T.a = float(denorm_c_before.g & 0x80);
T.r = float((denorm_c_before.r << 3) & 0xF8u);
T.g = float(((denorm_c_before.r >> 2) & 0x38u) | ((denorm_c_before.g << 6) & 0xC0u));
T.b = float((denorm_c_before.g << 1) & 0xF8u);
T.a = float(denorm_c_before.g & 0x80u);
#endif
T.a = ((T.a >= 127.5f) ? TA.y : ((PS_AEM == 0 || any(bvec3(ivec3(T.rgb) & ivec3(0xF8)))) ? TA.x : 0.0f)) * 255.0f;
@@ -804,15 +804,15 @@ float As = As_rgba.a;
#if PS_SHUFFLE && SW_BLEND_NEEDS_RT
uvec4 denorm_rt = uvec4(RT);
#if (PS_PROCESS_BA & SHUFFLE_WRITE)
RT.r = float((denorm_rt.b << 3) & 0xF8);
RT.g = float(((denorm_rt.b >> 2) & 0x38) | ((denorm_rt.a << 6) & 0xC0));
RT.b = float((denorm_rt.a << 1) & 0xF8);
RT.a = float(denorm_rt.a & 0x80);
RT.r = float((denorm_rt.b << 3) & 0xF8u);
RT.g = float(((denorm_rt.b >> 2) & 0x38u) | ((denorm_rt.a << 6) & 0xC0u));
RT.b = float((denorm_rt.a << 1) & 0xF8u);
RT.a = float(denorm_rt.a & 0x80u);
#else
RT.r = float((denorm_rt.r << 3) & 0xF8);
RT.g = float(((denorm_rt.r >> 2) & 0x38) | ((denorm_rt.g << 6) & 0xC0));
RT.b = float((denorm_rt.g << 1) & 0xF8);
RT.a = float(denorm_rt.g & 0x80);
RT.r = float((denorm_rt.r << 3) & 0xF8u);
RT.g = float(((denorm_rt.r >> 2) & 0x38u) | ((denorm_rt.g << 6) & 0xC0u));
RT.b = float((denorm_rt.g << 1) & 0xF8u);
RT.a = float(denorm_rt.g & 0x80u);
#endif
#endif
@@ -1046,11 +1046,11 @@ void ps_main()
#if !PS_READ16_SRC && !PS_SHUFFLE_SAME
uvec4 denorm_c_after = uvec4(C);
#if (PS_PROCESS_BA & SHUFFLE_READ)
C.b = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
C.a = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
C.b = float(((denorm_c_after.r >> 3) & 0x1Fu) | ((denorm_c_after.g << 2) & 0xE0u));
C.a = float(((denorm_c_after.g >> 6) & 0x3u) | ((denorm_c_after.b >> 1) & 0x7Cu) | (denorm_c_after.a & 0x80u));
#else
C.r = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
C.g = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
C.r = float(((denorm_c_after.r >> 3) & 0x1Fu) | ((denorm_c_after.g << 2) & 0xE0u));
C.g = float(((denorm_c_after.g >> 6) & 0x3u) | ((denorm_c_after.b >> 1) & 0x7Cu) | (denorm_c_after.a & 0x80u));
#endif
#endif

View File

@@ -948,15 +948,15 @@ vec4 ps_color()
#if PS_SHUFFLE && !PS_READ16_SRC && !PS_SHUFFLE_SAME
uvec4 denorm_c_before = uvec4(T);
#if (PS_PROCESS_BA & SHUFFLE_READ)
T.r = float((denorm_c_before.b << 3) & 0xF8);
T.g = float(((denorm_c_before.b >> 2) & 0x38) | ((denorm_c_before.a << 6) & 0xC0));
T.b = float((denorm_c_before.a << 1) & 0xF8);
T.a = float(denorm_c_before.a & 0x80);
T.r = float((denorm_c_before.b << 3) & 0xF8u);
T.g = float(((denorm_c_before.b >> 2) & 0x38u) | ((denorm_c_before.a << 6) & 0xC0u));
T.b = float((denorm_c_before.a << 1) & 0xF8u);
T.a = float(denorm_c_before.a & 0x80u);
#else
T.r = float((denorm_c_before.r << 3) & 0xF8);
T.g = float(((denorm_c_before.r >> 2) & 0x38) | ((denorm_c_before.g << 6) & 0xC0));
T.b = float((denorm_c_before.g << 1) & 0xF8);
T.a = float(denorm_c_before.g & 0x80);
T.r = float((denorm_c_before.r << 3) & 0xF8u);
T.g = float(((denorm_c_before.r >> 2) & 0x38) | ((denorm_c_before.g << 6) & 0xC0u));
T.b = float((denorm_c_before.g << 1) & 0xF8u);
T.a = float(denorm_c_before.g & 0x80u);
#endif
T.a = ((T.a >= 127.5f) ? TA.y : ((PS_AEM == 0 || any(bvec3(ivec3(T.rgb) & ivec3(0xF8)))) ? TA.x : 0.0f)) * 255.0f;
@@ -1071,15 +1071,15 @@ void ps_blend(inout vec4 Color, inout vec4 As_rgba)
#if PS_SHUFFLE && PS_FEEDBACK_LOOP_IS_NEEDED
uvec4 denorm_rt = uvec4(RT);
#if (PS_PROCESS_BA & SHUFFLE_WRITE)
RT.r = float((denorm_rt.b << 3) & 0xF8);
RT.g = float(((denorm_rt.b >> 2) & 0x38) | ((denorm_rt.a << 6) & 0xC0));
RT.b = float((denorm_rt.a << 1) & 0xF8);
RT.a = float(denorm_rt.a & 0x80);
RT.r = float((denorm_rt.b << 3) & 0xF8u);
RT.g = float(((denorm_rt.b >> 2) & 0x38u) | ((denorm_rt.a << 6) & 0xC0u));
RT.b = float((denorm_rt.a << 1) & 0xF8u);
RT.a = float(denorm_rt.a & 0x80u);
#else
RT.r = float((denorm_rt.r << 3) & 0xF8);
RT.g = float(((denorm_rt.r >> 2) & 0x38) | ((denorm_rt.g << 6) & 0xC0));
RT.b = float((denorm_rt.g << 1) & 0xF8);
RT.a = float(denorm_rt.g & 0x80);
RT.r = float((denorm_rt.r << 3) & 0xF8u);
RT.g = float(((denorm_rt.r >> 2) & 0x38u) | ((denorm_rt.g << 6) & 0xC0u));
RT.b = float((denorm_rt.g << 1) & 0xF8u);
RT.a = float(denorm_rt.g & 0x80u);
#endif
#endif
@@ -1312,11 +1312,11 @@ void main()
#if !PS_READ16_SRC && !PS_SHUFFLE_SAME
uvec4 denorm_c_after = uvec4(C);
#if (PS_PROCESS_BA & SHUFFLE_READ)
C.b = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
C.a = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
C.b = float(((denorm_c_after.r >> 3) & 0x1Fu) | ((denorm_c_after.g << 2) & 0xE0u));
C.a = float(((denorm_c_after.g >> 6) & 0x3u) | ((denorm_c_after.b >> 1) & 0x7Cu) | (denorm_c_after.a & 0x80u));
#else
C.r = float(((denorm_c_after.r >> 3) & 0x1F) | ((denorm_c_after.g << 2) & 0xE0));
C.g = float(((denorm_c_after.g >> 6) & 0x3) | ((denorm_c_after.b >> 1) & 0x7C) | (denorm_c_after.a & 0x80));
C.r = float(((denorm_c_after.r >> 3) & 0x1Fu) | ((denorm_c_after.g << 2) & 0xE0u));
C.g = float(((denorm_c_after.g >> 6) & 0x3u) | ((denorm_c_after.b >> 1) & 0x7Cu) | (denorm_c_after.a & 0x80u));
#endif
#endif

View File

@@ -509,7 +509,12 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
m_ui.mipmapping, tr("Mipmapping"), tr("Checked"), tr("Enables mipmapping, which some games require to render correctly."));
dialog->registerWidgetHelp(
m_ui.textureFiltering, tr("Texture Filtering"), tr("Bilinear (PS2)"), tr("Control the texture filtering of the emulation."));
m_ui.textureFiltering, tr("Texture Filtering"), tr("Bilinear (PS2)"),
tr("Changes what filtering algorithm is used to map textures to surfaces.<br> "
"Nearest: Makes no attempt to blend colors.<br> "
"Bilinear (Forced): Will blend colors together to remove harsh edges between different colored pixels even if the game told the PS2 not to.<br> "
"Bilinear (PS2): Will apply filtering to all surfaces that a game instructs the PS2 to filter.<br> "
"Bilinear (Forced Excluding Sprites): Will apply filtering to all surfaces, even if the game told the PS2 not to, except sprites."));
dialog->registerWidgetHelp(m_ui.trilinearFiltering, tr("Trilinear Filtering"), tr("Automatic (Default)"),
tr("Control the texture's trilinear filtering of the emulation."));

File diff suppressed because it is too large Load Diff

View File

@@ -6305,16 +6305,17 @@ void GSTextureCache::Target::Update(bool cannot_scale)
m_rt_alpha_scale = true;
}
ShaderConvert depth_shader = upscaled ? ShaderConvert::RGBA8_TO_FLOAT32_BILN : ShaderConvert::RGBA8_TO_FLOAT32;
const bool linear = upscaled && GSConfig.UserHacks_BilinearHack != GSBilinearDirtyMode::ForceNearest;
ShaderConvert depth_shader = linear ? ShaderConvert::RGBA8_TO_FLOAT32_BILN : ShaderConvert::RGBA8_TO_FLOAT32;
if (m_type == DepthStencil && GSLocalMemory::m_psm[m_TEX0.PSM].trbpp != 32)
{
switch (GSLocalMemory::m_psm[m_TEX0.PSM].trbpp)
{
case 24:
depth_shader = upscaled ? ShaderConvert::RGBA8_TO_FLOAT24_BILN : ShaderConvert::RGBA8_TO_FLOAT24;
depth_shader = linear ? ShaderConvert::RGBA8_TO_FLOAT24_BILN : ShaderConvert::RGBA8_TO_FLOAT24;
break;
case 16:
depth_shader = upscaled ? ShaderConvert::RGB5A1_TO_FLOAT16_BILN : ShaderConvert::RGB5A1_TO_FLOAT16;
depth_shader = linear ? ShaderConvert::RGB5A1_TO_FLOAT16_BILN : ShaderConvert::RGB5A1_TO_FLOAT16;
break;
default:
break;

View File

@@ -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 = 54;
static constexpr u32 SHADER_CACHE_VERSION = 55;