-
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
WALL-E graphical issue for Work Day cutscene #14168
Comments
This definitely seems depth clamp related. Draw 73/134 uses especially wild depth values, and causes this glitch. This isn't the only prim that causes problems, but it's the main one. Which is how Vulkan looks if I force the depth clamp flag off. Min Z/max Z are full range, so this isn't a clamp skew issue, it must be a case where it shouldn't actually clamp. -[Unknown] |
I tried to implement the logic from #12058 (comment) in the software renderer, and test in a few scenarios... but this one is not rendering correctly there. So I suspect there's more to it in some way. It might be that w is still involved, after all (although I'd tried a test that should've validated that, there's more cases to try...) This particular draw is 966 verts, which makes it harder to intuit which triangle is being incorrectly drawn... I've been creating tests with specific triangles from dumps manually. Maybe I need to make some tool to slice and dice frame dumps... -[Unknown] |
Yeah, I have a feeling that this is one of those issues where we'll come up with a bunch of complicated rules to figure out what shouldn't be drawn, and there's really a smaller number of much simpler rules that could explain it all, but that are very hard to intuit from the data... |
Perhaps, but it does seem to have pretty specific rules. Maybe there's indeed something simpler about it all.. The reason for this was that I'd removed the Z clipping when changing it (I actually did that intentionally so I'd notice if it should be kept), and it indeed should be kept for the negative side: Still hoping to get some time to compare back with guardband culling. For example, when a vertex's depth is clamped, that vertex also becomes immune to guardband culling. But is this behavior actually driven off the pre-viewport Z? This might explain some cases where guardband culling is overzealous (when viewport Z scale is 32768 or similar.) -[Unknown] |
That indeed seems likely from your findings! And the immunity is not likely to be actual 100% immunity, but those long thin triangles that usually are in danger of the guardband are produced by large perspective distortion of triangles crossing the view plane beyond the edges of the viewport, and clipping will cause the new triangle corners to get back inside the guardband. But for practical purposes I think we can emulate that with immunity. |
Well, that's what I meant by immunity, but indeed maybe there are actual cases where a triangle might get clipped (depending on how the clipper works...) with it still outside the guardband. Hopefully we don't need to worry about that... -[Unknown] |
Yes I think there are some theoretical edge cases since the clipper is still against the (pre-viewport) Z plane, and not against any side planes, but we can indeed probably just ignore that, at least for the hardware renderers. |
DisableAccurateDepth can workaround this issue. OFF 0Screenrecorder-2021-10-22-16-26-15-985.mp4ON 1Screenrecorder-2021-10-22-16-27-18-675.mp4 |
I don't need to turn on DisableAccurateDepth for this game for my phone using vulkan. Screenrecorder-2021-10-22-19-03-04-601.mp4 |
Panderner how about Direct3d9 and, 11? |
@Gamemulatorer unfortunately my PC is broken. I Go hiatus for PC testing. |
Fixed in Direct3D 11 but not Direct3D 9. |
Direct3D 9 should look better if you turn off hardware transform, since it'll apply cull distance for you. It won't apply clip distance, though, so not all of the artifacts will be fixed. In theory, we could clip triangles in software transform, but it's not implemented. It also won't work on any device without clip distance and working geometry shaders, which is mostly older Mali devices and some other devices. Modern GPUs that support clip and cull distance (including Adreno) should be fine and no longer have this issue for some time now. -[Unknown] |
This fixes negative Z issues on D3D9 in many cases, such as hrydgard#14168 and hrydgard#16574, but only when clip planes are supported.
In Work Day the 4th level for WALL-E there's a graphical artifact during a cutscene
OpenGL:
Vulkan:
GE dump:
ULUS10350_0001.ppdmp.zip
The text was updated successfully, but these errors were encountered: