Skip to content

[jak3] Fix crash with shadow in precursor ship#3934

Merged
water111 merged 3 commits into
masterfrom
w/shadow-crash-fix
Jun 1, 2025
Merged

[jak3] Fix crash with shadow in precursor ship#3934
water111 merged 3 commits into
masterfrom
w/shadow-crash-fix

Conversation

@water111
Copy link
Copy Markdown
Collaborator

@water111 water111 commented Jun 1, 2025

When the dp-bipedals get blown up by the nuke gun, their bones go to NaNs on the last frame. The shadow renderer doesn't handle this well and draws all possible triangles as single tris. This overflows the vif unpack field and triggered an assert when sizes inside the shadow renderer weren't consistent.

My guess is that this works on the real game either because:

  • their shadow renderer draws garbage data, but you can't tell because the screen is white from the nuke
  • no NaN on PS2 means that the shadow renderer behaved differently, not using all single tris.

As a workaround, if the bones are NaN, the shadow renderer treats them as 0, meaning there is no shadow drawn.

@xTVaser
Copy link
Copy Markdown
Member

xTVaser commented Jun 1, 2025

Hopefully also fixes #3009 but that was always difficult to reproduce

@water111 water111 merged commit 882c45f into master Jun 1, 2025
12 checks passed
@water111 water111 deleted the w/shadow-crash-fix branch June 1, 2025 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants