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

Camera stuck in wall in some cutscenes in GTA Vice City Stories #12060

Open
kermittheforg opened this issue May 23, 2019 · 13 comments
Open

Camera stuck in wall in some cutscenes in GTA Vice City Stories #12060

kermittheforg opened this issue May 23, 2019 · 13 comments
Labels
D3D9 Direct3D 9 D3D11 Direct3D 11 Depth / Z Issue involves depth drawing parameters. Vulkan
Milestone

Comments

@kermittheforg
Copy link

What happens?

Some cutscenes in GTA Vice City Stories have the camera seemingly stuck in the wall at certain camera angles, causing the entire screen to be covered by one color. This also covers the subtitles.

Video evidence.

What should happen?

The cutscene should be shown as normal and the subtitles should be visible.

Video evidence.

What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.

GTX 1070
i5-7600k @ 3.80GHz
16 GB DDR4 RAM
Windows 10 Home 64-bit v. 1709 build 16299.1087

The issue occurs on PPSSPP v 1.8.0
The issue does not occur on PPSSPP v 1.5.4

Tested on both Vulkan and OpenGL and changing backend did not cause/fix the issue.

VCS Dumps.zip

@KrossX
Copy link

KrossX commented May 27, 2019

Same here, using D3D11 renderer. Changing the renderer to OGL seems to render the scene fine (using savestates) but no change with D3D9. I'll switch to the OGL renderer in case it happens with it.

Radeon HD5770, Windows 7, PPSSPP v1.8.0

vcs_dumps.zip
First file looks weird, but second one looks like what happened ingame.

@unknownbrackets unknownbrackets added D3D11 Direct3D 11 D3D9 Direct3D 9 labels Jun 1, 2019
@unknownbrackets
Copy link
Collaborator

Hm, the dump seems to contain multiple frames. This may indicate the game is drawing too fast.

Anyway, by 457/2546 it finishes drawing the outside, the buildings outside, and then the room. The draw at 458/2546 covers the screen in black, and then the people don't draw on top of this. It only happens on backends which have depth clamping, so it's likely related to that.

At 849/2546, it starts drawing the frame from scratch, repeats at 1306, and the scene is redrawn three times in the dump. I wonder if that happens on a real PSP...

The bad draw has:

  • Depth clamp & depth test enabled
  • Has a depth buffer with various values
  • Full transform, float/float/8888
  • Standard minz/maxz, depth viewport is slightly cut (scale = -32755.5)
  • Depth test src >= dst
  • Vert depth is very high, ranging from 127186 to 347414.
  • X/Y verts are not outside the 4k square draw space.

Software renderer doesn't have the problem, and I thought it was handling clamping right now. It does seem like, based on these settings, this should clamp the depth...

Even if this draw is skipped, later draws cause the same problem.

The dump does render properly on a real PSP:

ULES00502_#12060_gta_camera

-[Unknown]

@unknownbrackets unknownbrackets added the Depth / Z Issue involves depth drawing parameters. label Jun 1, 2019
@ghost
Copy link

ghost commented Jun 24, 2019

Something similar happens on Android, but in principle (I haven't advanced in the game's history yet) it only happens when you enter the garage.

PPSSPP_2019-06-24-12-10-57
PPSSPP_2019-06-24-12-11-05
PPSSPP_2019-06-24-12-11-18

@NABN00B
Copy link
Contributor

NABN00B commented Jul 26, 2019

This happens in a lot of places in GTA LCS, GTA VCS and even The Warriors (but I wouldn't be suprised if other titles were affected as well).

In VCS during a cinematic (motion capture cutscene) the camera even moves inside the head of a character, resulting in a sudden jumpscare effect as seen in the video below. (Beware, it's scary.)

https://clips.twitch.tv/ClearAmusedShingleCorgiDerp

Hoping for a fix in the future.

@TAbdiukov
Copy link

TAbdiukov commented Nov 13, 2019

seems like GTA LCS is also affected, plenty of proof online. Iirc, in earlier versions of the emulator (0.9.x), there was no such issue.

Suggestion: Rename issue to: Camera stuck in wall in some cutscenes in GTA LCS and VCS

Edit: Found evidence! Check this video at 11:06
Edit2: Removed bloaty posts to avoid drama upon misunderstanding

@NABN00B
Copy link
Contributor

NABN00B commented Nov 13, 2019

Iirc, in earlier versions of the emulator (0.9.x), there was no such issue.

v0.9 didn't have any of the graphical backends that suffer from this problem, only OpenGL - which even today doesn't.

@NABN00B
Copy link
Contributor

NABN00B commented Nov 13, 2019

My post on July 27 already stated that this glitch affects multiple games, including LCS. In my last post I stated that OpenGL backend doesn't suffer from this glitch. Given that unknownwbrackets already investigated the issue and uncovered the possible cause it is safe to say that developers are well aware. Either play with OpenGL or wait until it's fixed. I'm going to stop responding to you, unless I have anything new to add to this discussion.

@Abhimanyu485
Copy link

Change your setting from vulcan to open gl
It worked for mw

@unknownbrackets
Copy link
Collaborator

This is caused by negative pre-viewport Z, and would be fixed by the rules noted in #12058.

-[Unknown]

unknownbrackets added a commit to unknownbrackets/ppsspp that referenced this issue Sep 10, 2021
This is important for several issues, like hrydgard#12058 or hrydgard#12060, where
something is drawn entirely outside valid Z, and should be culled.
@unknownbrackets
Copy link
Collaborator

It was noted that this is technically a regression for v1.12.0 because depth clamp is enabled in OpenGL now, but it previously worked in the backend only under v1.11.x due to not allowing depth clamp.

-[Unknown]

@hrydgard
Copy link
Owner

I'm hoping to get 1.13 out a lot faster than 1.12, which will include your clipping fix, so maybe we can live with it for just a little while. It's not game breaking.

@ghost
Copy link

ghost commented Sep 23, 2022

Something is wrong on GTA Vice City using the latest build c02ce03
NVM it was fixed by bb6919e

Tested in OpenGL only
Screenshot_2022-09-23-17-39-25-75
Screenshot_2022-09-23-17-39-32-12

@NABN00B
Copy link
Contributor

NABN00B commented Nov 26, 2022

The depth clamping changes of v1.13 fixed this (apart from Direct3D 9).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D3D9 Direct3D 9 D3D11 Direct3D 11 Depth / Z Issue involves depth drawing parameters. Vulkan
Projects
None yet
Development

No branches or pull requests

7 participants