rend: LoD0 of VQ YUV textures is invalid. Use LoD1 instead.

Fixes background magenta textures in WSB2K2. Issue #1038
This commit is contained in:
Flyinghead 2025-02-02 17:11:22 +01:00
parent 914fa29d31
commit 6a15e7a3aa
1 changed files with 4 additions and 1 deletions

View File

@ -555,7 +555,10 @@ bool BaseTextureCacheData::Update()
{
PixelBuffer<u32> pb0;
pb0.init(2, 2 ,false);
texconv32(&pb0, (u8*)&vram[vram_addr], 2, 2);
if (tcw.PixelFmt == PixelYUV)
// Use higher LoD mipmap
vram_addr = startAddress + VQMipPoint[1];
texconv32(&pb0, &vram[vram_addr], 2, 2);
*pb32.data() = *pb0.data(1, 1);
continue;
}