Skip to content

Commit

Permalink
Depal from dynamic CLUT: When detecting bounds, be more conservative.
Browse files Browse the repository at this point in the history
Followup to hrydgard#16188 .

Further fixes the lens flare.

It confused me before that there are two sections of the track on
Sunset Drive where the sun is visible, but only on the second is the
lens flare sprite actually shown, which is rather weird.

Verified that exactly the same thing happens on hardware, so it's not a
an emulation problem! Rather seems like a glitch in the game itself.
  • Loading branch information
hrydgard authored and Nemoumbra committed Oct 10, 2022
1 parent d009c4b commit a8b956b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GPU/Common/TextureCacheCommon.cpp
Expand Up @@ -2245,8 +2245,8 @@ void TextureCacheCommon::ApplyTextureDepal(TexCacheEntry *entry) {
// These are already in pixel coords! Doesn't seem like we should multiply by texwidth/height.
u1 = bounds.minU + gstate_c.curTextureXOffset;
v1 = bounds.minV + gstate_c.curTextureYOffset;
u2 = bounds.maxU + gstate_c.curTextureXOffset;
v2 = bounds.maxV + gstate_c.curTextureYOffset;
u2 = bounds.maxU + gstate_c.curTextureXOffset + 1.0f;
v2 = bounds.maxV + gstate_c.curTextureYOffset + 1.0f;
// We need to reapply the texture next time since we cropped UV.
gstate_c.Dirty(DIRTY_TEXTURE_PARAMS);
}
Expand Down

0 comments on commit a8b956b

Please sign in to comment.