-
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
Black Square Shape Cover the Car - Split Second Velocity USA #7492
Comments
Is this with "Rendering Mode" set to "Buffered Rendering"? |
@hrydgard: Apparently this problem has existed for a while, and Buffered on/off doesn't matter:
http://forums.ppsspp.org/showthread.php?tid=1310&pid=77203#pid77203 Getting more up to date info would be useful though. Edit: We actually have documented this issue somewhat in #4472 (comment) but the main subject of the issue is different, so let's continue the discussion here. |
Buffer Rendering Mode is selected and all settings are default. Thank. http://i58.tinypic.com/23uwwa0.jpg On Windows 8.1 64-bit. |
Renamed for easier searching. |
It seems to be the black box is caused by one of a few possible causes:
It seems like there's a demo so I'm going to try it. -[Unknown] |
Okay, it does the following:
So, seems like a bug in blending, we may be optimizing it wrongly? -[Unknown] |
Okay, so using this in StateMapping.cpp: if (gstate.isAlphaBlendEnabled() && gstate.getBlendFuncA() == GE_SRCBLEND_FIXA && gstate.getBlendFuncB() == GE_DSTBLEND_INVSRCALPHA && gstate.getTextureAddress(0) == 0x041dc000) {
//DebugBreak();
glBlendFuncB = GL_ONE;
} Hacks it into working correctly. That means the problem child is the B func - which is GL_ONE_MINUS_SRC_ALPHA otherwise. Dual source is not being used, so I tried this trickery (along with an extra bit for the texture) in the frag shader: if (gstate.isAlphaBlendEnabled() && gstate.getBlendFuncA() == GE_SRCBLEND_FIXA && gstate.getBlendFuncB() == GE_DSTBLEND_INVSRCALPHA && gstate.getTextureAddress(0) == 0x041dc000) {
WRITE(p, " %s.a = 0.0;\n", fragColor0);
} This also fixes it, which means somehow we're ending up with alpha being 1.0 in the shader. It turns out that this fixes it too: if (gstate.isAlphaBlendEnabled() && gstate.getBlendFuncA() == GE_SRCBLEND_FIXA && gstate.getBlendFuncB() == GE_DSTBLEND_INVSRCALPHA && gstate.getTextureAddress(0) == 0x041dc000) {
doTextureAlpha = true;
} So, For some reason the framebuffer is set as 565, but it's drawn as -[Unknown] |
I suppose the color of the text drawn on the car may be incorrect, I think it's switching to 565 to draw maybe a shadow or something (not really sure.) Instead we are just taking the colors as they are. -[Unknown] |
Yeah, that requires realizing that it's been rendered to using the wrong format, and converting it on change. Unfortunately, it's going to be hard to handle that correctly without potentially making some games VERY slow unnecessarily (like Kingdom Hearts.) Anyway, #7509 at least kills the black box. I think we should probably worry about the other glitches separately, since the game is at least playable without the black box. -[Unknown] |
Will fix be release as upcoming update? |
This issue can be fixed by turning on buffered rendering and running in OpenGL (DX 11 is a bit more stuttery). |
Black Square Shape Cover the Car. Attached Screenshots
http://i57.tinypic.com/b7j341.jpg
http://i62.tinypic.com/27y6v4.jpg
Tested on ppsspp-v1.0-75-g635f43b-windows-amd64.
The text was updated successfully, but these errors were encountered: