Fix tearing in hidden BG FMV playback#2668
Open
ZironZ wants to merge 1 commit into
Open
Conversation
Contributor
|
I can confirm that this fixes the tearing in Ghost Trick, Inazuma Eleven and Kingdom Hearts |
Member
|
thanks, I'll review this when I find some time things been busy for me lately |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes FMV tearing in games that stream video data into an inactive BG layer, then later switch that BG on-screen.
The OpenGL renderer could prerender a hidden BG layer while the game was still updating it, leaving the cached BG texture with a mix of old and new frame data. This change still uploads VRAM changes normally, but defers rebuilding the BG texture until the layer is actually visible. That avoids building an FMV's BG texture from a half-updated video frame.
This partially addresses #2555. It affects several games that use Mobiclip FMVs. I tested it with Kingdom Hearts 358/2 Days and Ni no Kuni.
I also looked into Pokémon Black, but that seems to be a different case where it updates BG layers that are already visible. Fixing that safely would need a larger change, since games can also update visible BGs mid-frame for other effects.