-
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
Glowing graphics in Ultimate Ghosts 'n Goblins #5915
Comments
https://github.com/hrydgard/ppsspp/wiki/How-to-find-a-graphic-issue-with-the-GE-debugger Could be stencil/alpha, likely it's directly accessing framebuffers/blocktransfers/something, though. Might also be clut. -[Unknown] |
Ok, here are a bunch of screenshots, hopefully it's what you're looking for since there were a LOT of parts highlighted in red. And just in case my screens are not what you need, here's a save state at the place where the glowing is the worst: |
This game does some weird stuff (at least it seems weird to me, it might not to you guys). Once it's done drawing all of the polygons and textures, it seems to shrink the scene it's rendered down to almost nothing on a 512x512 texture, and then it passes over it once with a dark blue colour, then it passes over it numerous other times, shrinking and re-enlarging it multiple times, eventually adding what looks like a bilinear filter layer on top of it or something (it goes from a pixellated look to a more smooth look) once it's back to the regular size. After this, it goes over top of the screen one last time to add this bloom layer. Flags: https://gist.githubusercontent.com/thedax/7f89bdf3154ddaf7a68f/raw/f317e257bd18f6c9593be5895ee345a5f5b77162/gistfile1.txt Screen of where I took the info: Once it's done with that thin and tall rectangular prim, going all the way across the screen, it applies the bloom to the entire screen (each tall and thin rectangular prim seems to be the bloom being applied?), but the entire screen didn't appear red like Rey's. The next texture after that is a small flame. I wonder if only the small flames are supposed to have this bloom? My real PSP is still lost at the moment, so I can't double check.. |
Yeah, that's how several other games (Wipeout Pure, Sword Art Online, Gods Eater Burst, etc.) apply bloom too. Since it has a >= 0 alpha test, I'm guessing this is a stencil -> alpha issue... I assume it looks right in the software renderer? -[Unknown] |
I noticed while watching the actual game on a PSP that in the case of the first level, those purple ghouls are the only ones that are supposed to be glowing. |
Could possibly be yet another stencil/alpha issue, where the game is failing to mask away the glow from things that shouldn't, well, glow. Oh right @unknownbrackets already guessed that, heh. |
What is the SoftRenderer? Is that the Non-Buffered Rendering? |
No, it's under Settings -> Graphics -> Software Renderer. Scroll to the bottom of the graphics tab/sheet and you'll see it. You can't enable it while a game is already running, though. |
Ah right, thanks! |
Has this improved in the latest git build, especially with "simulate block transfers" on? Might've been clut related too, many games apply a clut during bloom it seems like. -[Unknown] |
No, there's no difference with GLES as of v0.9.8-1062-gd8e9878. The software renderer is still the same as Rey's post. |
I wonder if the stencil mask change might've helped this? I suspect not since I don't see it in reporting. It's using 5551 so there's just one bit of stencil. Since the stencil hack affects it I'm assuming it must be related to that, so the question is - where should it be updating the stencil? You can try the following:
Otherwise, it could be we're missing some handling for INCR or DECR but I don't think that's it. Not sure what other options there are, CLUT can't write to stencil... maybe a block transfer? But doesn't seem like it's doing one of those. -[Unknown] |
I just had a quick go with the disassembly idea, but it never seems to pause at all, so I don't think it's writing stencil manually. |
If you look at the stencil tab, I assume it's always zero (black) right? Not red anywhere? Or does it draw some red in some areas (not the preview... I guess maybe it should use different colors for stencil/depth and draw preview), but then turn black later? It's possible it's manually drawing the stencil to another buffer like 0x04187000, can try more breakpoints but there will be more false positives... -[Unknown] |
It's mostly black, but it does occasionally draw to the stencil tab/buffer (when rendering some of the geometry, and upon pressing draw prim again, the previous area that was just drawn turns black. It seems to draw to the stencil buffer quite a bit when rendering the ghosts' flames and the HUD (at the appropriate locations of where the flames are, and the HUD is; it doesn't look abnormal to me). |
Your previous export showed the stencil test disabled. Does it ever draw with it enabled? And what are the settings when it does? If there's stencil data on the flames, and forcing the stencil test off makes things work but on everything not just flames, it seems to me we are not correctly applying the stencil test. -[Unknown] |
No, it's never enabled as far as I can tell. I followed it for one frame (with step prim), and "Stencil test enable" is always 0. |
If I use step prim, it looks like the stencil test is never enabled, but with step draw, it becomes enabled when the ghosts are drawn (and then hangs PPSSPP and the GE debugger forever). |
@thedax tested with latest build. Same status: |
Tested with latest build. Same status. GE Debugger dump: |
When the purple ghouls are drawn (tex: 0x0886cc10), it uses INCREMENT for stencil. The framebuffer is 5551, so this should mean to max out stencil. So I think this only happens when dual source blending is not enabled. I suspect that means Intel cards for OpenGL, and all Direct3D 9. -[Unknown] |
I can also reproduce this issue on Nayuta both opengl and vulkan. |
Hack settings lower resolution for effects doesn't help btw. |
From the slow issue for Nayuta, we have these buffers:
Each one is cleared upon first use in the frame, so there's no bleed happening. But it does work correctly in the software renderer... however, that's partially an artifact of the frame dump. Because it uses buffer B as a texture before clearing it (likely for motion blur of the bloom.) The temp buffer for bloom looks right, up through 1434/1454 (sorry this is a dump from #14223.) It's the resize buffers where things get funny. To do the bloom it:
In software, skipping the tex overwrite for those buffers ( It's much brighter in hardware (both look similar): If I force the initial copy from temp buffer B to blend to zero (step 2 above), it initially looks good but the brightness picks back up. I wonder if this is just down to it using 5551 and maybe colors just multiply out slightly higher than they should. This is probably different from the Ghosts 'n Goblins thing. -[Unknown] |
I don't know if this has been reported yet, but throughout the game, the graphics seem to start glowing sometimes. It's like a bloom effect or something like that. It gets really bad toward the last stage.
I can confirm that the glowing effect does not happen on a real PSP. The first image has the glowing effect, then 2nd image does not. On the 3rd image, glowing effect is really bad.
The text was updated successfully, but these errors were encountered: