mirror of https://github.com/PCSX2/pcsx2.git
gsdx hw: extra trick for the mipmap
Ratchet & Clank (the third) uses an address of 0 for invalid mipmap. It would be very awkward to put the middle layer of texture in start of memory. So let's use this information to correct the lod. It make the game more robust on the lod rounding
This commit is contained in:
parent
78b2848622
commit
ef9a144437
|
@ -514,6 +514,14 @@ void GSRendererHW::Draw()
|
|||
|
||||
TEX0 = GetTex0Layer(lod);
|
||||
|
||||
// Ratchet & Clank set an address of 0 on invalid layer. Address 0 will be really awkward
|
||||
// for a mipmap layer. So use it to avoid invalid data
|
||||
if (TEX0.TBP0 == 0) {
|
||||
GL_INS("Warning invalid lod %d", lod);
|
||||
lod++;
|
||||
TEX0 = GetTex0Layer(lod);
|
||||
}
|
||||
|
||||
MIP_CLAMP.MINU >>= lod;
|
||||
MIP_CLAMP.MINV >>= lod;
|
||||
MIP_CLAMP.MAXU >>= lod;
|
||||
|
|
Loading…
Reference in New Issue