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
Notable graphical errors in Super Robot Wars MX Portable #1060
Comments
Has this always been the case, or did it get worse recently? Ys 6: The Ark of Napishtim also has these sorts of issues. -[Unknown] |
I think it has been always like this, except for that screen stretching/aligning problem fixed already (well, mostly) as noted in #834 (comment). |
Interesting it only happen on Portable MX but not Portable A |
@raven02: In SRWAP everything except the text is wrongly semi-transparent in battle scenes and I think that issue should be reopened. |
I don't own this game .Can you retest it using latest build ? (i think should be fixed) |
It might be using one of the blend modes that we can't support 100% correctly in OpenGL - when those are encountered we use GL_ONE,GL_ONE instead (additive), which is what it looks like here. See StateMapping.cpp . Some "impossible" modes can definitely be approximated better. |
@raven02: The graphics are still broken with the latest build as they were with the old builds. Graphics with JPCSP are almost all right without enabling any accuracy fix like SW Rendering mode in it. So I think some modes can be approximated in PPSSPP as hrydgard suggested. |
How's the MX right now ? not too sure the double alpha helps |
JPCSP does some OpenGL trickery that's not possible on OpenGL ES 2.0 though (it reads from the framebuffer and simulates the extra blend modes in the shader). |
I see .Thanks @hrydgard |
@hrydgard , just wonder from the screenshot below , what would be the likely cause ... blend modes , lighting or alphaTest issue? |
My first guess would be that the wrong CLUT is being used. Hm. |
Yeah, that does look like wrong clut... it could also be that the wrong mask/offset/etc. is being used, I haven't been able to find many games using those, but I think it should work. If you disable the texture cache (bool match = false;) does it fix it? If not, it could still be the clut, maybe wrong order of clut load or something... But it could also be blend/alpha/colortest even or logicop. -[Unknown] |
I see and thanks . Looks like CLUT concluded to be a big offender . I will disable the texture cache CLUT stuff to see if this text issue can be fixed . (AlphaTest and ColorTest already checked and seems to be not the culprit) |
@unknownbrackets , just wonder what does "Texture with unexpected bufw (full=43926)" means? (CLUT related ?) |
That's interesting. Well, the "bufw" is the stride for the buffer that holds the texture. Each line is that many pixels iirc. So, 43926, even with a 4-bit texture, would mean 21963 bytes. That sounds crazy. It might help to add the w/h to that message to see, I guess it could be a texture that is 65536 pixels wide and umm... 1 pixel tall or something? Anyway, it sounds like a bug, it probably should not get that value in the first place. -[Unknown] |
Humm seems to match the above text issue with the this texture with unexpected bufw message |
Just tried with bool match = false; however seems not helping .... any other thing you can think of that i can try it
|
Well, that should make it regenerate the texture each time and not use the cache (it should be slower.) It is suspicious that it sends such a large bufw. I doubt it'd help but you can try "unlocking" bufw:
At least, does that change anything? -[Unknown] |
Just tried using "return gstate.texbufwidth[level] & 0xFFFF;" however didn't change anything ..... |
Hmm. It might help to determine which type of texture it is. One way is to log all textures and guess. Another is to disable some of the texture decoding by type, and then when it dissapears / becomes garbage, you found it. Maybe it's some DXT texture we don't decode properly... Or, more likely, is it indexed? -[Unknown] |
Let me disable texture decoding by type to see which disappears or become garbage , would be more easier |
Most of the problem text disappears when disable this one (Tested all others like DXT , CLUT are no effect)
|
It hits the else part ( or we miss the case if (clutAlphaLinear_ && mipmapShareClut) { ?
|
Interesting. With a font, CLUTs are usually linear. I wonder why it's not here. That is strange. I'm not sure about the unswizzling, it seems to work but I don't think I've seen it with a 4 bit texture off the top of my head... Maybe it's not working properly for those. Hmm. -[Unknown] |
I did try to put the clause if (clutAlphaLinear_ && mipmapShareClut) similar to those CMODE_16BIT .However still not able to fix the text issue . It is good that at least narrow down to this GE_CMODE_32BIT_ABGR8888 issue. I'm wondering anything i can try to change for this GE_CMODE_32BIT_ABGR8888 and test it out again ............... |
Hmm, I'm not sure. What this means is that it's a texture that uses 4-bits per pixel, and a 32-bit clut. And it's swizzled, which means the pixels aren't in the normal order. I think the next most interesting things are:
-[Unknown] |
Thanks for the tips .Let me try all these out in next few hrs (in office now) |
I think should be gstate.texbufwidth[0] & 0xffff , right? 33:03:791 Z2_FILE_READ I[HLE]: HLE\sceIo.cpp:1476 Decrypting PGD DRM files |
Humm however "1>GLES\TextureCache.cpp(1183): error C3892: 'clut' : you cannot assign to a variable that is const"
|
Oh, right. Just change this:
To:
-[Unknown] |
Well, the letters seem clear this way, so it definitely seems like the clut is incorrect. Hmm, looking at the original, maybe it could sitll be a logic op or blend. It seems like the "Normal" boxes are not intentional... -[Unknown] |
I see. If you have any possible fix want me to try it out , let me know .Thanks. |
Hmm, it seems like it's everywhere it's trying to use a color other than white. Is the black box around the unit/thing to the left of the cursor correct also (the shadow certainly looks smoother)? Can you paste a link to a frame dump? -[Unknown] |
Hmm, it uses z, stencil, color, and alpha tests. I don't see any funny bufw. I don't see any funny clut loads... -[Unknown] |
this bug existed in jpcsp older build like r2168,fixed in r2169 or 2170.I can't find r2169 to test.accroding to the Log message,should be 2169. |
Humm exactly same issue . It try to shift the clutoffset with 4 shaderContext.setClutOffset(context.tex_clut_start << 4); Many thanks @daniel229 to find out this :) |
Thanks @daniel229, nice find. @raven02, try this:
-[Unknown] |
wow~~,fixed,thanks.@unknownbrackets |
Prefect :) thanks @unknownbrackets and @daniel229 |
That looks a lot more like a blend issue (but I'm not really sure.) -[Unknown] |
don't know this log can help or not.I dump next frame to log when I saw the black block |
@daniel229 , do you this game save ? i would like to test it since i tested them but didn't see those black block |
yes,try this savefile,and attack this monster which you see in the picture. savefile download |
It's using blends like "abs subtract a, a", "add src.a, 1.0 - src.a", and "add src.a, fixed". Theoretically these should work properly but they could be buggy. -[Unknown] |
@unknownbrackets @raven02: It might seem improved (thanks to #1977) with the auto-builds: |
That's without any code changes, and with Visual Studio 2010? -[Unknown] |
If so, it smells like an uninitialized variable somewhere. |
@hrydgard @unknownbrackets Yep. EDIT: It turned out to be indeed uninitialized buffer usage. |
How does this look now? -[Unknown] |
I have tested it on PC and it looks all okay (though not too sure on Android) |
Blending seems wrong:
Might be related with the graphical errors in Super Robot Wars A Portable:
#834 (comment)
The text was updated successfully, but these errors were encountered: