Skip to content
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

Test Drive Unlimited glitchy map #12786

Open
Panderner opened this issue Apr 2, 2020 · 27 comments
Open

Test Drive Unlimited glitchy map #12786

Panderner opened this issue Apr 2, 2020 · 27 comments
Labels
GE emulation Backend-independent GPU issues Needs hardware testing Testing on a real device needed to determine correct behavior. No Feedback / Outdated? Spline/Bezier tesselation Issues related to the PSP's hardware tesselation support
Milestone

Comments

@Panderner
Copy link
Contributor

Panderner commented Apr 2, 2020

When I zoom out to see a entire map. The map is glitched
Screenshot_2020-04-02-19-14-40-20_2f85358b2198d26f8aca533d68bee793
GE Dump here:
recording.zip

@hrydgard hrydgard added the GE emulation Backend-independent GPU issues label Apr 2, 2020
@hrydgard
Copy link
Owner

hrydgard commented Apr 2, 2020

Just wondering, are you using any cheats to make the game playable (remove that effect that slows everything down?)

@Panderner
Copy link
Contributor Author

Just wondering, are you using any cheats to make the game playable (remove that effect that slows everything down?)

Even I disabled the lag workaround cheat and it happened

@hrydgard hrydgard added this to the v1.11.0 milestone Apr 2, 2020
@hrydgard
Copy link
Owner

hrydgard commented Apr 2, 2020

Ok, thanks for replying!

@unknownbrackets
Copy link
Collaborator

unknownbrackets commented Apr 12, 2020

It's using bezier curves to draw this, plus tex gen. I wonder if something funny is going on there?

It happens in the software emulator too. Interesting.

I don't see why it's NOT rendering (though I didn't look super closely at the verts), but the PSP rendering seems to agree:
ULUS10249_#12786_test_drive_map
(there's something odd happening at the bottom there, though...)

Do we know that the game actually draws this as expected when zoomed out on a real PSP?

-[Unknown]

@Panderner
Copy link
Contributor Author

Panderner commented Apr 29, 2020

I don't have a real PSP but someone reported this issue On real PSP?

@hrydgard hrydgard modified the milestones: v1.11.0, Future Aug 16, 2020
@hrydgard hrydgard added the Spline/Bezier tesselation Issues related to the PSP's hardware tesselation support label Nov 11, 2020
@hrydgard hrydgard modified the milestones: Future, v1.12.0 Nov 11, 2020
@hrydgard hrydgard added the Needs hardware testing Testing on a real device needed to determine correct behavior. label Nov 11, 2020
@ppmeis
Copy link
Contributor

ppmeis commented Jan 11, 2021

Tested in latest Windows build. Same map issue:
image

@Back2Life888
Copy link

I dont experience this.. I only experience somekind of upscaling issue which made the map even more ruined..

@hrydgard
Copy link
Owner

@Back2Life888 can you post a screenshot of that?

@Back2Life888
Copy link

I can't.. The game is too messed up for me to play.. I also experience a glitch where the 1 and GO on a race is way to quick.. And the landscape of grass is very weird..

@hrydgard
Copy link
Owner

okay, could you record a video of that, then?

@Back2Life888
Copy link

2021-03-26.20-48-17.mp4

Here is the 1 and GO bug.. I also notice that if you pause, traffic would move.. The traffic should pause also if you pause the game.. You can also notice the weird grass.. Here is the map bug, I got a blue screen of death by just trying to take a screenshot but I got it working.. I also had some cheats where it enables 60 FPS and removes some kind of "Ugly Effect"..

Map

@hrydgard
Copy link
Owner

If you turn off the cheats, does it work? in that case the problem is with the cheats, not PPSSPP.

@Back2Life888
Copy link

The only thing that is fixed is the 1 and GO bug with all the cheats disabled.. The rest of the bugs still not fixed

@hrydgard hrydgard modified the milestones: v1.12.0, v1.13.0 Jul 10, 2021
@LunaMoo
Copy link
Collaborator

LunaMoo commented Jul 10, 2021

The weird grass & new map issue should probably be reported separately seems to be a regression, it was working fine in the past, don't remember when I last tested this game, but for sure it was looking normally back in 2019 ~ #12010 (comment) the game might simply caught covid.;3

As for cheats, the one to remove ugly effects would be mine, but as far as I understand it's no longer needed(unless the glitches are caused by the the compat hacks I guess or more performance is needed as removing the effect might still be faster than what compat hacks do, probably not much through).
60 fps patch is not mine, but most of them are ruining gameplay, physics, animations or all of the above, bugs when using them should be expected and yeah bug reports should never be made when using any kind of cheats in general as many even seemingly harmless cheats can cause all sorts of weird problems even on real console, my favourite case is "infamous patapon hacker" which was just poorly made cheat that people abused. The only way to clear most cheats is to restart emulation after disabling them and loading the game normally(not using savestate), unfortunately some cheats like that patapon mentioned are glitching savedata forever and only starting from 0 fully restores unglitched state.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jul 11, 2021

Couldn't reproduce any of the "new issues" reported by @Back2Life888 above, at least not with default settings, turns out this game uses curves in some places and ofc hardware tesselation which has slightly worse accuracy is broken in it similar to how it was broken in some other racing games using it causing texture glitches over and around roads(and also on the map).

Maybe that option should be renamed to "hardware curves(less accurate)" to be less appealing to use than "hardware tesselation" which makes people think it's some kind of graphic enhancement(which it really isn't) or works faster(which also only would apply in specific situation of great GPU combined with awful CPU). I'm really not a fan of people turning this ON for no reason whatsoever.

Edit: also just to update, the original issue posted here is still present, here's a dump:
ULUS10249_0001.zip
(the dump displays extra black bars on the visible portion of the map, which is not present in game)

@Back2Life888
Copy link

Back2Life888 commented Jul 12, 2021

Switching to D3D11 fixes both Map and Grass at the cost of performance. This is not an upscaling bug, this is a renderer bug. Upscaling works fine, it's just that Vulkan rendering is bugged for this game.

@hrydgard
Copy link
Owner

Interesting. That is with hardware tessellation on right? that would mean we have vulkan-specific bugs with hw tesselation, given that D3D11 also supports it....

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jul 12, 2021

For me at least hardware tesselation is broken same(Edit: there seems to be a difference in OGL, but also broken) in all backends it's supported with(can't be used in D3D9). I never said anything about upscaling.

Here's how it looks on my system, note that the game fps is crap, but it runs same on PSP.

Vulkan & D3D111 with hardware tesselation:
ULUS10249_00005
ULUS10249_00006

OGL with hardware tesselation:
ULUS10249_00008

Software curves any backend:
ULUS10249_00009

@ppmeis
Copy link
Contributor

ppmeis commented Mar 21, 2023

Tested in latest Windows build under Vulkan backend. Game now renders just fine. Even map looks better than before. Only when you zoom out map is partially missing:

image

It is also simulating "GPS loading map effect" pretty well:
image

During drive world renders fine too:
image

You can see same scenario on a real PSP:
https://youtu.be/YIlIZ5x-w6Y?t=342

@unknownbrackets
Copy link
Collaborator

A fresh frame dump of the map issue might help to reproduce. I really wonder if it actually happens on a real PSP though. Would help if anyone has a real PSP and this game to check.

-[Unknown]

@hrydgard
Copy link
Owner

I do now, and the excessive clipping issue when you zoom out does not happen on the real PSP.

I'll get a framedump.

@unknownbrackets
Copy link
Collaborator

The previous one didn't render on a PSP but there's also some corruption. I'm hoping it's something we've fixed, otherwise maybe I'll try editing the framedump to figure out why it looks corrupt on a PSP.

-[Unknown]

@hrydgard
Copy link
Owner

hrydgard commented Mar 26, 2023

Indeed, the framedump is functional but seems to display the wrong image at the end, similarly to some others we've seen. Here it is:

Test Drive issue 12786 ULES00637_0006.zip

By the way, the ground is drawn with bezier patches. Maybe some clipping rule is different for them..

hrydgard added a commit that referenced this issue Mar 26, 2023
@hrydgard
Copy link
Owner

Turned on increased depth resolution for this game too, as expected it doesn't affect this issue (but does remove quite a bit of undesirable Z fighting flicker)

@Back2Life888
Copy link

Kinda off topic but looks like someone threw a hissy fit and disliked every single message on this thread XD

@hrydgard
Copy link
Owner

Yeah, they did that on several threads. Blocked, but no way to get rid of the dislikes..

@unknownbrackets
Copy link
Collaborator

Okay, had to edit the framedump because for some reason the ATARI logo was drawn over it. Maybe some bloom detected wrong, might explain the previous one. Here's the frame dump with those later commands simply removed:

#12786_ULES00637_testdriveunlimited_map_edit.zip

And indeed, the map should display just fine:
#12786_ULES00637_testdriveunlimited_map_edit

This has a minz test which appears to be failing. If I force minz from 0x0010 to 0x0000, we get this in the software renderer:
Full map visible

Which looks pretty good. Returning to 4/642, we're using s16 positions (only) in a bezier 7x34. The z values are this pattern simply repeated:

a001 / -0.74996948242
9aac / -0.79162597656
9557 / -0.8332824707
9001 / -0.87496948242
8aac / -0.91662597656
8557 / -0.9582824707
8001 / -0.99996948242

So the patches simply go left to right, it seems, and presumably go from that range. For the first values, Y is -0.19784545898.

Matrices look like this:

world_z = model_y * 4303 + model_z * 13370.75 - 62133.0
view_z = world_z
proj_z = view_z * -1.000061 - 4.000122
projected_z = proj_z / -view_z
screen_z = projected_z * -16375.500000 + 16391.500000

Which works out to a range (from the above values) of:

world_z = [-73011.9834671, -76354.6709671]
projected_z = [1.0000062128, 1.0000086113]
screen_z = [15.8982622936, 15.8589856569]

Our minz value is 16. So this turns out to be very similar to #16131 (comment), where a depth value should round up but isn't.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GE emulation Backend-independent GPU issues Needs hardware testing Testing on a real device needed to determine correct behavior. No Feedback / Outdated? Spline/Bezier tesselation Issues related to the PSP's hardware tesselation support
Projects
None yet
Development

No branches or pull requests

6 participants