-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overlapping framebuffer issue #2308
Comments
Yeah, this is an issue indeed. I believe it would also help the occasional black screen issues in the GTA games. A related question is if we estimate the size of the FBOs correctly, there are a whole bunch of factors that affect the actual rectangle of RAM that is rendered to, and games can be sloppy not setting all of them (for example, not setting viewport right if having set scissor to cut to a smaller rectangle, or whatever). |
that change fixes star ocean 1 worldmap too |
Well, I think we definitely estimate the size of the FBOs wrong in some cases, but it's almost a separate issue. I'm just wondering if there's ever a good reason to have two FBOs at the same address. At best if the game reuses that memory for rendering things at different sides a lot I guess? -[Unknown] |
Yeah. In theory it's also possible to use arbitrary subrectangles of FBOs as textures (by setting a small texture size and texture bufw the same as the fbo bufw) and annoying things like that, but I don't know if games do that. |
I cant belive Star Ocean is finally fixed, why did nobody post in the issue :) |
Well, it's not fixed just yet, but at least we know the cause for sure now. -[Unknown] |
@rpglord Hm? We haven't commited a fix yet. Or do you mean to say that the change Unknown proposes above fixes it? |
Well I am going to belive Nezarn he just said it fixes star ocean world map :) But I don't think there is any need, we can belive Nazarn, and I think Unknown also has Star Ocean so he can test too :) |
Just seen the youtube , looks like Star Ocean 1 renders all graphics now . |
Well, outside the stencil problem. -[Unknown] |
…black screens in GTA when pausing for example.
That might do the trick, can you guys please test on all the games mentioned in this and the related issues? |
@hrydgard Star Ocean 1 worldmap\battle doesnt work with your fix (blackscreen) |
please remove this fix,because cause ocacionally black screens in dragon ball z tenkiachi |
This does not fix the overlapping framebuffer issue in Valkyrie Profile:Lenneth (one of the games mentioned in the issue page) Tested with 0.7.6-1481-gf2b7096 |
…! Fixes black screens in GTA when pausing for example." This reverts commit f2b7096.
Reverted. I see why it doesn't work and think I might have an idea of how to fix it. |
thanks you |
I just got time to test it this commit .However , i tested with Dragon Ball Z Tenkiachi , i didn't see any ocacionally black screens throughout the game . Meanwhile , i tested other games and seems to be no broken as well . |
Made a new attempt that should not cause "embiggening loops". However I'm pretty sure it doesn't solve all problems. Fixes GTA though. |
@hrydgard your current fix fixes star ocean 1 worldmap (but battle is still bugged, these are with buffered rendering off) and characters are not invisible anymore with buffered rendering on but screen looks funny (and strangly battle works too with buffered rendering, but screen is smaller like in this screenshot) |
The problem is, Star Ocean creates an FBO that is 512x512, but it (of course) only renders to the top left 480x272 of it. But the FBO itself is huge, so it's currently scaled to fit the screen. I did some testing on a PSP. AFAICT, no matter how or what stride or mode/width/height I set or etc., it always draws 480 pixels per line. Then it advances by the stride (which might cause it to overlap), and does that 272 times. It doesn't ever seem to draw to the screen anything other than the top left 480x272 of the buffer. But I remember someone saying some game rendered at > 480x272 for improved graphics or something... -[Unknown] |
It appears that Tales of Destiny 2 would work fine except for this one issue.
Like most games, it uses framebuffers at 0x04000000 and 0x04088000. During the intro, they are displayed great and everything works fine.
However, once it goes in game, everything is black. It turns out the reason for this is simple... sometimes it renders to a 512x512 FBO, and sometimes it renders to a 480x272 FBO, both at the same address.
Both have the same stride, so it really doesn't even matter. If it were VRAM, either way would write and read the same pixels anyhow.
Changing it to this:
Makes the game work great, at least into the first scene of the game. Unfortunately, this would probably break render to texture affects I think, and might break other stuff.
It seems like what might help is to:
But then, some games may play tricks, so I'm not sure if that would be enough?
I think the above would definitely improve Tales of Destiny 2, Shadow of Destiny, and Valkyrie Profile, which all have this issue.
-[Unknown]
The text was updated successfully, but these errors were encountered: