Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

video_core/texture: Fix up sampler lod bias

ReinUsesLisp3288b12a2840
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h
index 8c278c0e23..b8675f7024 100644
--- a/src/video_core/textures/texture.h
+++ b/src/video_core/textures/texture.h
@@ -324,7 +324,7 @@ struct TSCEntry {
float GetLodBias() const {
// Sign extend the 13-bit value.
constexpr u32 mask = 1U << (13 - 1);
- return static_cast<float>((mip_lod_bias ^ mask) - mask) / 256.0f;
+ return static_cast<s32>((mip_lod_bias ^ mask) - mask) / 256.0f;
}
std::array<float, 4> GetBorderColor() const {