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

[BUG]: Ace Combat 04/Zero - Disappearing terrain under specific circumstances #10271

Closed
PositronCannon opened this issue Nov 12, 2023 · 5 comments

Comments

@PositronCannon
Copy link

Describe the Bug

In Ace Combat 04, specifically in mission 11 "Escort" (may also happen elsewhere, but I've only noticed it there), large parts of the terrain disappear depending on plane and camera position.

imagen

In Ace Combat Zero, the issue only happens when the HUD is disabled, whether in gameplay or during a replay.

imagen
imagen

Both issues are reproduced on a fresh download of version 1.7.5201, with all settings at their defaults, using the Vulkan renderer. The issue is not reproduced in software mode.

I first noticed this problem last week, but it's probably been there for a while as I hadn't played AC04 for some time or watched replays in ACZ. All I know for sure is that 1.7.4492 does not have this issue.

I've also attached a GS dump for both games.

Reproduction Steps

For AC04: Start mission 11, get closer to the ground and look around.

For ACZ: Start mission 2, get close to the ground and start a replay from the pause menu, then toggle the replay interface off.

Expected Behavior

No response

PCSX2 Revision

v1.7.5201

Operating System

Windows 11

If Linux - Specify Distro

No response

CPU

i7-12700H

GPU

RTX 3060

GS Settings

No response

Emulation Settings

No response

GS Window Screenshots

No response

Logs & Dumps

Ace Combat 04 - Shattered Skies_SLUS-20152_20231113001732.zip
Ace Combat Zero - The Belkan War_SLUS-21346_20231113002231.zip

@ghost
Copy link

ghost commented Nov 13, 2023

Can you try changing the blending level to maximum?

@refractionpcsx2
Copy link
Member

It won't fix it, it needs CPU Sprite Render Size 2.

@PositronCannon
Copy link
Author

It won't fix it, it needs CPU Sprite Render Size 2.

Yep, I can confirm CPU Sprite Render Size 2 and set to Blended Sprites/Triangles fixes it in both games. Good to know!

@stenzek
Copy link
Contributor

stenzek commented Nov 15, 2023

For future reference:

Game draws clouds to 128x128 target at FBP 0x2400 (we end up with 130x130, probably because texture min/max shenanigans and bilinear). Game puts a bunch of texture data after 0x2400, as seen below:

image

PCSX2 ends up hitting the 0x2400 for the terrain draw, when it's expecting the texture data lower down, but this doesn't exist in the target, hence black. Target doesn't expand, because it's reading P8 from a C32 target, and clearly not a channel shuffle. So, loading P8 data into here then reinterpreting a copy back doesn't make sense anyway.

So, we should just skip targets that don't contain our texture data, right? Sure, except for the fact that when they want to sample in the actual target area here (the upper bit), it'll load from local memory instead of the GPU, where the target data lives. Wave Rally does this with its 128x256 reflection target. Because the source is "created later" than the target, it doesn't get invalidated.

So I added a format check, that fixes Wave Rally and Tekken Tag, but Crime Life is still broken. I hate that game and its P8 nonsense. The format check is risky anyway, and having sources created after targets which are "partially stale" is setting up an invalidation nightmare.

Soooooo bugger this, let's just force it to CPU to work around it for now. This'll need a fair bit of thought.

@stenzek
Copy link
Contributor

stenzek commented Nov 16, 2023

Fixed in #10277.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants