Skip to content
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

Strong blue fog in Parasite Eve 3 (3rd Birthday) #3354

Closed
daniel229 opened this issue Aug 24, 2013 · 31 comments
Closed

Strong blue fog in Parasite Eve 3 (3rd Birthday) #3354

daniel229 opened this issue Aug 24, 2013 · 31 comments

Comments

@daniel229
Copy link
Collaborator

relate to 416f0c5

0.9.1-27
buffered rendering
01

previous build
buffered rendering
02

non buffered rendering
03

psp
201308241132_001

@unknownbrackets
Copy link
Collaborator

I wonder if it just doesn't write alpha for certain funcs?

-[Unknown]

@solarmystic
Copy link
Contributor

Confirmed. Problem can be mitigated temporarily on the newest builds by disabling buffered rendering:-

capture

@daniel229
Copy link
Collaborator Author

@unknownbrackets
how to test that?

@daniel229
Copy link
Collaborator Author

comment out like this
/#if 1
// Fixes some Persona 2 issues, may be correct? (that is, don't change dest alpha at all if blending)
// If this doesn't break anything else, it's likely to be right.
// I guess an alternative solution would be to simply disable alpha writes if alpha blending is enabled.
glstate.blendFuncSeparate.set(glBlendFuncA, glBlendFuncB, GL_ZERO, GL_ONE);
#else
/
glstate.blendFuncSeparate.set(glBlendFuncA, glBlendFuncB, glBlendFuncA, glBlendFuncB);
//#endif

seem to fix.
04

@dbz400
Copy link
Contributor

dbz400 commented Aug 28, 2013

Just wonder did this blue fog still appeared here in latest build ?

@daniel229
Copy link
Collaborator Author

still there
01

@dbz400
Copy link
Contributor

dbz400 commented Aug 28, 2013

Thanks for testing .If comment out that glstate.blendFuncSeparate() , will disappear ?

@daniel229
Copy link
Collaborator Author

comment outglstate.blendFuncSeparate.set(glBlendFuncA, glBlendFuncB, GL_ZERO, GL_ONE);,
it will disappear
01

@dbz400
Copy link
Contributor

dbz400 commented Aug 28, 2013

Thanks .I did came across this blue fog previously however at that time seems to be affected in my case .#3029

@dbz400
Copy link
Contributor

dbz400 commented Sep 2, 2013

Blue fog should be gone now although not very prefect .I did tried if i remove the following GE_TFMT_CLUT32 check , the screen is much more clearer and close to real PSP one.

    // 3rd Birthday (and possibly other games) render to a 16 bit clut texture.
    const bool compatFormat = framebuffer->format == entry->format
        || (framebuffer->format == GE_FORMAT_8888 && entry->format == GE_TFMT_CLUT32)
        || (framebuffer->format != GE_FORMAT_8888 && entry->format == GE_TFMT_CLUT16);

@unknownbrackets
Copy link
Collaborator

If you skip the video in the middle, won't it render garbage again? Also, there clearly (from the screenshot) should be a blue flog, just not as strong, right?

-[Unknown]

@dbz400
Copy link
Contributor

dbz400 commented Sep 2, 2013

No ,it didn't render the garbage at all and very clear .

Yes , a slight blue fog but not a very strong one

@dbz400
Copy link
Contributor

dbz400 commented Sep 2, 2013

With that CLUT32 check removed , here is the screenshot from 3rd birthday

screen00005

@solarmystic
Copy link
Contributor

Just a small note (so that it's easier to track and @raven02's comment #1778 (comment) is in a closed thread and thus less visible), the issue has returned again since v0.9.5-858-g10b9e83 10b9e83

You can disable buffered rendering to get rid of most of the "fog" but in certain stages, and after video cutscenes the scene will be "dirty":

screen00242

Alternatively, enabling Read Framebuffers to Memory will eliminate all of the fog and restore status quo, with the requisite performance penalty:

screen00243

@dbz400
Copy link
Contributor

dbz400 commented Dec 15, 2013

Just for record .This is the correct fog rendering from framebuffer read mode

screen00149

@dbz400
Copy link
Contributor

dbz400 commented Dec 15, 2013

Wondering if the following still needed as it is originally used for Wipeout , i can see without it , wipeout also render correct now .However with it , 3rd brithday break .

    // Let's not write to alpha if stencil isn't enabled.
    if (!gstate.isStencilTestEnabled()) {
        amask = false;
    } 

@unknownbrackets
Copy link
Collaborator

Code is not about what games need but what is correct - unless you have all 1000+ games and are verifying your assumption with each and every one. The alpha channel is simply not altered on the PSP when stencil testing is disabled.

-[Unknown]

@dbz400
Copy link
Contributor

dbz400 commented Dec 15, 2013

I see.

@unknownbrackets
Copy link
Collaborator

If you hold triangle, it goes away. I'm not actually sure why... it seems to flush the alpha channel or something? I'm not really sure.

Software renderer has... interesting problems. Seems like bad lighting maybe? But stepping through, the blueness looks correct per the PSP.

Anyway, the texture (0x04154000) ends up red in the software renderer, and the blurring just makes it darker and darker (it becomes nearly black.) It uses multiple rounds of clut lookups.

-[Unknown]

@dbz400
Copy link
Contributor

dbz400 commented Jan 13, 2014

Yep hold triangle works and clear those artifact :0

I did try to use it in other stages , it causes the following interesting artfact

screen00322

@unknownbrackets
Copy link
Collaborator

Possibly related to #2917.

-[Unknown]

@thedax
Copy link
Collaborator

thedax commented Feb 17, 2014

We can add Ultimate Ghosts n' Goblins to the list of games affected by the CLUT thing, I think:

Screenshot 01

Looks pretty similar to Assassin's Creed and 3rd Birthday's halo issues. It's a bit off-topic for this specific bug, but all of the other issues have been closed, so there's no point creating another duplicate.

@dbz400
Copy link
Contributor

dbz400 commented May 26, 2014

With block transfer enabled , the intro screen and in-game pause screen appears okay and correct.
ules01513_00000
ules01513_00001

@hrydgard
Copy link
Owner

That's great, two less mysteries.

@unknownbrackets
Copy link
Collaborator

Pretty sure this works well now with the framebuffer clut and size estimation changes. I'll close, but if there are still issues we can reopen/create a new more specific issue.

-[Unknown]

@ShanxTadeu
Copy link

Well, the halo issue (#5414) still in ppsspp-v0.9.8-1515-ge505655 as you can see here

parasite eve 01

parasite eve 02

parasite eve 03

Is not like before, but the issue persists.

@unknownbrackets
Copy link
Collaborator

I suppose that's #6192. Does it look better at 1x?

-[Unknown]

@ShanxTadeu
Copy link

Apparently yes

In my previous pic my rendering resolution was set to Auto

In this one

parasite eve 04

the rendering resolution is set to 10x PSP

and in this one the rendering res is 1x PSP and you can see the bloom effect

parasite eve 05

There's any fix for this issue?

@hrydgard
Copy link
Owner

hrydgard commented Jul 2, 2014

It looks like a bloom effect at 1x (as intended) because the resolution is so low that it samples between the pixels, causing extra blur. This does of course not happen at higher resolutions, and you get ugly halos.

There's no real fix possible. A potential hack would be somehow to try to figure out which buffers are used only for bloom effects and keep them at standard resolution, but it won't work if those buffers are also used for other things that need to be high resolution, etc.

@hrydgard
Copy link
Owner

This game needs Skip buffer effects to be off to work correctly. Leave it off.

@hrydgard
Copy link
Owner

hrydgard commented May 25, 2024

The ghosts are meant to be there (they're really a bloom effect or something like that). Unfortunately, they don't look very good at higher resolutions than 1x, the game creators didn't expect us to render at high resoltuions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants