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
Counter Terrorist Special Forces: loading animation corrupts title screen #665
Comments
The vertex shader seems to be interesting, it appears to "misuse" the input registers ( It also sets the z coordinate with |
It looks like it gets set to |
Looking into the actual vertex data, the program sets z to 0 for all vertices (so the (Drawn as a triangle strip)
This appears to trigger the break, if I change the shader code to blindly force oPos.w to 1.0 it renders something that looks more correct, though there's no loading text and the game appears to crash before reaching the point where the loading text would be hidden and the 3d scene would be rendered. |
Setting up a trivial test case, it's not the |
(It was not, 174 is due to lack of special casing of stride=0 vertex attributes) |
At the moment I can't seem to get that far, for me the game never gets past the loading indicator (it never even shows the "Loading in progress" text). I can hack around the graphical corruption (in a way that breaks other games) but never see anything more than the green spinner. If you can re-test with the latest xemu and get past the loading screen it might indicate that the dump I made is bad and needs to be re-dumped (though it seems to work fine running off the HDD on hardware) . |
This only seems to affect vertices rendered as triangle strips; if I send the same vertices as discrete triangles they render as expected. |
And digging some more, it looks like the hardware actually does render the vertices, it just discards them in the pixel shader. |
So far I can only replicate this in cases where the negative w vertex is stacked top of the previous vertex (e.g., intentionally degenerate triangles). If I perturb it slightly in any direction other than the camera view axis, both xemu and the xbox will fill the resultant clipped surface (that runs up to the camera position). If I perturb it in the camera view axis, xemu will fill a sliver of the triangle, xbox does not seem to. |
At this point I suspect some precision/rounding issue. I've checked with RenderDoc and implemented the (relevant part of the) vertex shader in Python and the output vertices look correct. In particular, the last non-negative vertex is projected to Interestingly, in RenderDoc's mesh view, the output matches the xbox hardware until the camera is slightly tweaked, at which point the broken red triangle is displayed. |
Maybe not, setting the test vertex's w to -1.0 still results in incorrect behavior. |
FYI: This issue properly related as it cause exploding geometry in menus. #537 |
@abaire I retested and got this disc is dirty or damage so it's probably a regression. |
Test it before the render scale was implemented that probably what broke the game |
@abaire this game now goes in-game |
@Triticum0 confirmed that I can get in game with the latest release as well. The vertex explosion on the loading screen still happens and the pgraph tests I wrote while diagnosing this still fail in the same way. |
Title
https://xemu.app/titles/48500002/#Counter-Terrorist-Special-Forces-Fire-for-Effect
Bug Description
Just after the initial splash screen, a green rotating indicator is displayed in the lower left corner. In xemu, this explodes to cover the entire screen:
Expected Behavior
The animation should not cover the screen:
and should fade into the entry screen:
xemu Version
Latest master:
Version: 0.6.2-52-gb3f56db428
Branch: master
Commit: b3f56db
Date: Wed Jan 19 09:52:45 PM UTC 2022
System Information
OS: Kubuntu 21.04 - 5.11.0-38-generic
CPU: Core i7-6700K @ 4GHz
GPU: NVIDIA GeForce GTX 1070
GPU Driver: 4.6.0 NVIDIA 470.74
Additional Context
No response
The text was updated successfully, but these errors were encountered: