Joined: 12 Sep 2009
|Posted: Sun Mar 13, 2011 3:00 am Post subject: [SOLVED] Framebuffer tearing with vsync enabled?
|Just wondering if anyone has had a problem like this before, and if and how you were able to fix it. When I'm applying a series of color filters to the screen, some things near the top of the screen aren't filtered correctly, even using vsync. For example, here is what it looks like normally:
Then I applied "night vision" (mix RGB into green channel) and "posterize" (scale channels down, then back up - 2 filters) effects, which looks like this:
Notice near the top, part of the globe is posterized, but not "night visioned," even though I apply the posterize filter last, and there's an unsightly tear in the middle of it. I've tried various combinations of flushing the cache (with sceKernelDcacheWritebackAll), and uncached pointers (helped a little, but the top 8-10 lines are still posterized-not-night-visioned, and it slows things WAY down).
Is there anything I can do about this?
P.S. A little background info: this is a test/demo for a library I'm working on, so I'm deliberately pushing its limits to search for bugs. If there really is no solution, it's not a big deal, but it would be nice to fix this if I can.
EDIT: It seems to be specifically related to when the globe is rendered; if I move it earlier in the display list, it's fine (but shows up underneath other objects). Don't know if that helps any in fixing this, but it does mean I don't have to worry about it too much.
EDIT: Okay, so six months later I'm back to tinkering with this project, and I solved the issue in about an hour. It was a stupid mistake, too -- I realized I need to let the GE finish (sceGuSync) before manipulating the draw buffer. So that's fixed, and I found a way to make the "posterize" effect about 10% faster. :D
PSP-2001 // CFW 6.60 ME-1.2 and GCLite // Genesis Competition Entry
"So, we meet again: for the first time, for the last time." —Spaceballs