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

Dynamic smoke is horizontally striped with a blocky outline around a character (Jak & Daxter: The Lost Frontier) #20002

Closed
5 tasks done
eveninglatte opened this issue Feb 18, 2025 · 5 comments · Fixed by #20032
Labels
GE emulation Backend-independent GPU issues
Milestone

Comments

@eveninglatte
Copy link
Contributor

Game or games this happens in

UCES-01225 - Jak & Daxter: The Lost Frontier

What area of the game

I'm not sure - I think any time there's dynamic, "transparent" smoke/steam drawn on the screen and there are models (player character or environment) drawn beneath and/or (not sure) above it.

It's very visible in the Phoenix chase mission (when flying thru the smoke generated by the rocks jumping out of lava or when destroying the flying robots) or in the directly preceding first Dark Daxter mission (when using a circle-bound skill).
Can also be spotted after buying a yellow eco powerup that generates a yellow projectile after attacking which disappears in a cloud of smoke.

The bug is also possibly present when destroying regular planes in any point in the game, albeit it's much more difficult to spot and capture (since planes are usually in varying distance from the player and commonly out in the open with no models beneath them), to the point that I'm not sure if it's actually there.

What happens

The smoke effect is sometimes drawn with moving horizontal stripes. Additionally, when the player character (Jak, Dark Daxter, plane) enters the cloud of smoke they're not obscured by the smoke (as it happens on real hardware) but instead a very blocky (and, as far as I can tell, coinciding with the stripes) outline is drawn around them.

All of these were captured using the latest git build (25329cf) on Windows with a DX11 backend and at 1x resolution with a Debug build. As far as I was able to test it (Windows and Linux using hardware mentioned below), this issue persists regardless of resolution, graphics backend or any changes in settings and is not tied to a specific save-state (I saved and loaded in-game). However, I am willing to re-test if someone proposes a specific change to these that might fix it.

1st example (first Dark Daxter mission):

Image

2nd example (Phoenix chase mission - lava rock smoke):

Image

2nd example (Phoenix chase mission - flying robot destruction smoke):

Image

2nd example (Phoenix chase mission - steam vents):

Image

3rd example (yellow eco powerup - outline, smoke "colliding" with other models):

Image

3rd example (yellow eco powerup - no striping/outline, no models to directly "collide" with?):

Image

3rd example (yellow eco powerup - no striping/outline, NPC hit with the projectile and not moving):

Image

I did not manage to capture it, but when hit again in a short timeframe, the NPC won't stagger after the 2nd hit and keep moving through the smoke, also triggering the bug.

What should happen

The smoke should not be striped horizontally and the character (Jak, Dark Daxter, plane) and other models should be obscured by it. Below are videos (apologies for the quality) of the PSP in the same areas.

1st example (first Dark Daxter mission):

dark_daxter.webm

2nd example (Phoenix chase mission - lava rock smoke):

phoenix_chase.webm

Right now I have no real hardware equivalent of the 3rd example (I don't have any sufficient saves), but I can edit this post if needed.

GE frame capture

Not sure if this is important, but all of these were captured on Windows with a DX11 backend and at 1x resolution, using a Debug build option.

The frame dumps provided all depict two states from the 2nd example:

  1. Character (plane) approaching smoke cloud.
  2. Character (plane) inside of the smoke cloud.

The first pair were taken with HEAD at 20bd1c2, 1 commit before (w/o stripes and outline, "solid" smoke effect), the 2nd pair with HEAD at c6f20bd (w/ stripes and outline), and the 3rd pair with HEAD at 25329cf, the latest git version (w/ stripes and outline):

DUMP.zip

I can edit this post with more frame dumps from other examples if needed.

Platform

Windows

Mobile device model or graphics card (GPU)

Windows: NVIDIA GeForce GTX 1060 6GB (latest - 572.42 - drivers installed), Linux: i7-4600U iGPU

PPSSPP version affected

Windows: latest git version (25329cf), Linux: latest Flatpak version

Last working version

I managed to git bisect the introduction of stripes and the outline on Windows to c6f20bd and reverting does "fix" the 3rd example (the smoke stays on top of all of the models and is not properly hidden behind other objects), however in the 2nd example Jak's ship simply disappears when entering the smoke (1st and 2nd frame dumps), as if the smoke/other effects are non-transparent.

Graphics backend (3D API)

Other

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try changing graphics settings to determine if one causes the glitch (especially speed hacks or enhancements/replacements.)
  • Include logs or screenshots of issue.
@hrydgard hrydgard added this to the v1.20 milestone Feb 20, 2025
@hrydgard
Copy link
Owner

Hm, this is due to the game using a really stupid method (directly with geometry) to compensate for how the depth buffer is swizzled. The hardware has support for automatic de-swizzle but it doesn't use it.

I implemented workaround for this quite a while ago, I can't find the commit right now, but it must have somehow broken again... Or it didn't handle all needed cases.

@hrydgard
Copy link
Owner

Wait, I remembered wrong, it was Ratchet & Clank I fixed it for: #15859

This is probably very similar, but still something we're not handling yet then.

hrydgard added a commit that referenced this issue Feb 25, 2025
@hrydgard
Copy link
Owner

Just enabling the same workaround made for Ratchet seems to fix your framedump, so let's do it. The games probably run on the same engine and do the same kind of depth buffer trickery.

@hrydgard
Copy link
Owner

Please test, and re-open if that didn't help everywhere. If so, please provide framedumps of the problematic locations.

Thanks!

@hrydgard hrydgard added the GE emulation Backend-independent GPU issues label Feb 25, 2025
@hrydgard hrydgard modified the milestones: v1.20, v1.19.0 Feb 25, 2025
@eveninglatte
Copy link
Contributor Author

I re-tested (1x-4x, all Windows backends) with the latest git (3751a2b) and can confirm that all of the examples I provided are fixed and the graphics behaviour is consistent with the videos (apart from DX9, as is mentioned the linked Ratchet and Clank issue)! Thank you so much!

I did try poking around the compat settings before submitting this issue - I probably should've looked better. I'm still glad it was a simple fix!

I'll probably keep playing thru the game at some later date, so I'll come back to this issue if I see any such behaviour in the later parts (I don't anticipate it, though - I think the examples cover about 99% of the dynamic smoke encountered).

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants