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

[jak3] Bad eyes on Jak #3459

Closed
water111 opened this issue Apr 7, 2024 · 1 comment · Fixed by #3460
Closed

[jak3] Bad eyes on Jak #3459

water111 opened this issue Apr 7, 2024 · 1 comment · Fixed by #3460

Comments

@water111
Copy link
Collaborator

water111 commented Apr 7, 2024

The eyes on jak are using the wrong textures for drawing the pupil/iris, even after merc texture uploads are enabled.

In renderdoc, it's grabbing this weird rainbow thing instead of the iris texture:
image

The iris texture tbp is 179, which is also shared by hud-npcring-bar-01.

I printed out the sequence of texture uploads to 179, and eye rendering:

flush uploads for [ 4] tex-lcom-sky-pre
doing eye for [340] tex-lcom-tfrag
pupil background tex: 179, level-default-minimap/hud-npcring-bar-01
eye done
doing eye for [340] tex-lcom-tfrag
pupil background tex: 4578, common/autoeye-iris
eye done
flush uploads for [351] tex-l0-pris
flush uploads for [401] tex-lcom-pris
uploading tex 179: level-default-pris/bam-iris-16x16 bucket
flush uploads for [461] tex-lcom-sky-post
flush uploads for [563] tex-lcom-water
flush uploads for [568] tex-sprite
flush uploads for [575] tex-warp
flush uploads for [578] tex-hud-hud-alpha
uploading tex 179: level-default-minimap/hud-npcring-bar-01 bucket

I think there are two possible issues:

  • the eye drawing is done in the wrong bucket. Usually, you'd expect to do the eye drawing in the same bucket as the eye texture uploads.
    it makes sense to do eye textures and drawing in 401 tex-lcom-pris, but the game does the drawing in tex-lcom-tfrag instead.
  • the eye drawing is actually done like this, possibly some bug in the original game, and the upload to tbp 179 in bucket 340 shouldn't happen.
    there's a few places where the PC port uploads more textures than the original game did. This should be a safe thing to do, unless
    there was a bug and they just got lucky.
@water111
Copy link
Collaborator Author

water111 commented Apr 7, 2024

Evidence for the first one: setting (set! (-> *target* draw default-texture-page) 1) makes sense (it says that target uses the pris tpage), and makes the eyes work. Maybe defualt-texture-page is not being set correctly.

water111 added a commit that referenced this issue Apr 7, 2024
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 a pull request may close this issue.

1 participant