diff --git a/bin/resources/shaders/dx11/convert.fx b/bin/resources/shaders/dx11/convert.fx index 9c0ced5913..4266edccba 100644 --- a/bin/resources/shaders/dx11/convert.fx +++ b/bin/resources/shaders/dx11/convert.fx @@ -240,7 +240,7 @@ float rgb5a1_to_depth16(float4 val) float ps_convert_float32_float24(PS_INPUT input) : SV_Depth { // Truncates depth value to 24bits - uint d = uint(sample_c(input.t).r * exp2(32.0f)) & 0xFFFFFF; + uint d = uint(sample_c(input.t).r * exp2(32.0f)) & 0xFFFFFFu; return float(d) * exp2(-32.0f); } diff --git a/bin/resources/shaders/opengl/convert.glsl b/bin/resources/shaders/opengl/convert.glsl index 4b8f551555..d98333462b 100644 --- a/bin/resources/shaders/opengl/convert.glsl +++ b/bin/resources/shaders/opengl/convert.glsl @@ -148,7 +148,7 @@ float rgb5a1_to_depth16(vec4 unorm) void ps_convert_float32_float24() { // Truncates depth value to 24bits - uint d = uint(sample_c().r * exp2(32.0f)) & 0xFFFFFF; + uint d = uint(sample_c().r * exp2(32.0f)) & 0xFFFFFFu; gl_FragDepth = float(d) * exp2(-32.0f); } #endif diff --git a/bin/resources/shaders/vulkan/convert.glsl b/bin/resources/shaders/vulkan/convert.glsl index fb9e6148e6..a009892547 100644 --- a/bin/resources/shaders/vulkan/convert.glsl +++ b/bin/resources/shaders/vulkan/convert.glsl @@ -218,7 +218,7 @@ float rgb5a1_to_depth16(vec4 unorm) void ps_convert_float32_float24() { // Truncates depth value to 24bits - uint d = uint(sample_c(v_tex).r * exp2(32.0f)) & 0xFFFFFF; + uint d = uint(sample_c(v_tex).r * exp2(32.0f)) & 0xFFFFFFu; gl_FragDepth = float(d) * exp2(-32.0f); } #endif diff --git a/pcsx2/ShaderCacheVersion.h b/pcsx2/ShaderCacheVersion.h index 4f712fe342..17c5da4bd8 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 = 51; +static constexpr u32 SHADER_CACHE_VERSION = 52;