mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Fix the ugly line on Ridge Racer lens flares
Turns out we were not updating one column and row of the lens flare image, which is done in a strange way by the game (CLUT in framebuffer). Some math of the game is a little off and for some reason it's not noticeable on hardware.
This commit is contained in:
1 parent
72fdcb25d9
commit
536c4ace73
1 file changed
+9
@@ -2498,6 +2498,7 @@ void TextureCacheCommon::ApplyTextureFramebuffer(VirtualFramebuffer *framebuffer
|
||||
}
|
||||
|
||||
// Applies depal to a normal (non-framebuffer) texture, pre-decoded to CLUT8 format.
|
||||
// TODO: Merge this function with the above.
|
||||
void TextureCacheCommon::ApplyTextureDepalFramebufferCLUT(TexCacheEntry *entry) {
|
||||
uint32_t clutMode = gstate.clutformat & 0xFFFFFF;
|
||||
|
||||
@@ -2546,6 +2547,14 @@ void TextureCacheCommon::ApplyTextureDepalFramebufferCLUT(TexCacheEntry *entry)
|
||||
gstate_c.Dirty(DIRTY_TEXTURE_PARAMS);
|
||||
}
|
||||
|
||||
// If it nearly covers, just make it cover. This fixes Ridge Racer where the UVs are slightly off and it causes a bright line on the lens flare.
|
||||
if (u1 > 0 && u1 < 3) {
|
||||
u1 = 0;
|
||||
}
|
||||
if (v1 > 0 && v1 < 3) {
|
||||
v1 = 0;
|
||||
}
|
||||
|
||||
Draw::Framebuffer *depalFBO = framebufferManager_->GetTempFBO(TempFBO::DEPAL, texWidth, texHeight);
|
||||
draw_->BindTexture(0, nullptr);
|
||||
draw_->BindTexture(1, nullptr);
|
||||
|
||||
Reference in new issue
Block a user