-
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
Texture bug with healthbar in Tekken 5 #2077
Comments
In which version of PPSSPP? I thought I fixed this one recently. |
I've never seen this one fixed. |
Ah, I thought my texture coordinate offset fix took care of this one but never tested it. Wonder what it might be then. |
This is a very, very old confirmed issue. Disabling Hardware Transform is a solution for now, but may be unfeasible for the drastic performance loss incurred for mobile devices. |
These screens are from android v0.7.6 1084 |
Oh that's interesting. And strange... |
Just wonder what is the texture coordinate offset fix ? (is it the // Step 3: UV generation ? ) may be we can revisit to test it and fix the issue here. As HW T&L indeed has a bug affect at least this game and Midnight Club 3 . |
Can someone with this game do the following (on Windows)? I'm told it may not work properly on ATI cards.
Specifically I'm wondering if it's using stencil testing or something. -[Unknown] |
@unknownbrackets Here you go :) Hope you figure it out |
@xsacha is that at 1x scale though? As far as I've seen the red primitive markers don't work correctly unless it's at 1x scale. |
Yeah the marker wasn't working. I was at 2x scale. Everything else is correct though. By the way, I have an ATI card. I also get NO healthbar when Hardware Transform is enabled. |
So not using alpha testing (flag is on, but set to ALWAYS.) Just blending. Lighting isn't even enabled. What if, from there, you change "Material update" to 0 (double click it), does it show in hardware transform? -[Unknown] |
Let me try this out . |
Material Update is already 0. |
That's really strange. What if you change it to 1, does it work? And the lights are enabled. Are you sure this is at the same place? -[Unknown] |
Hardware Transform On (shows health bar and time icon): http://imgur.com/UN1cDT1,2euZneI,Bya2sDS,tTj2Tdo,k7dZz64 Both 1x scale now. They match up. |
Was this improved at all by the recent change to the UV coordinate problem (seems unlikely, but possible...) or anything? Also, just to confirm, vertex cache doesn't affect this? I probably asked this before but I don't see it here... -[Unknown] |
Nope, the issue is still present in the latest build (v0.9.6-584-ga0a9ad4), and vertex cache does not affect it at all. |
Apparently, altering the z coordinate in the vertex shader affects this, so this is another depth issue of some kind. Interesting that it's different between hardware and software transform. It seems that this change makes the health bars visible: // Final view and projection transforms.
WRITE(p, " gl_Position = u_proj * viewPos;\n"); To: // Final view and projection transforms.
WRITE(p, " gl_Position = u_proj * viewPos;\n");
WRITE(p, " gl_Position.z = clamp(gl_Position.z, -1.0, 1.0);\n"); Sounds like it causes other glitches, but at least it tells us z is somehow involved / affects it. -[Unknown] |
Let me link it to #4836 which is same depth issue here (Taiko DX (JP) Missing Text) |
Seems likely to be a case where in software transform, through mode and non-through manages to produce exactly the same depth value so that a depth test passes, while in hardware transform, something is very slightly different to the bar ends up behind the "empty bar holder". Tricky. |
Well, the depth test is not enabled here. See @xsacha's screenshots of the GE debugger. I'm guessing it's clipping? -[Unknown] |
Oh if the depth test isn't enabled, then yeah, it's clipping. Maybe we need to very slightly tweak the projection matrix, if it's just at the close plane. We did that in Dolphin at some point I think although I think that's gone now somehow... |
I notice this is using s8 positions. Could possibly be related to #4617, if Z has a different scale as well. http://imgur.com/wVPp3YK,PunWdZw,Cm5m6E7,2eWbsir,GOTT0oJ#4 I also notice min/max z are set. Still have no idea what they do... -[Unknown] |
Tested this issue, God of War ghost of sparta has the same, when Thera's bane is used, the fire on blades is flickering, but if hardware transform is off it works properly, of course it cuts performance mercelessly |
Could be fixed/improved by the position scaling: https://github.com/unknownbrackets/ppsspp/compare/pos-scale -[Unknown] |
@unknownbrackets |
There is a problem with viewing the health bar with hardware decoding. Example:
NO HW
WITH HW
The text was updated successfully, but these errors were encountered: