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

tr1/inject: improve texture injection performance #2414

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Jan 29, 2025

Checklist

  • I have read the coding conventions
  • I have added a changelog entry about what my pull request accomplishes, or it is an internal change
  • I have added a readme entry about my new feature or OG bug fix, or it is a different change

Description

This removes texture packing from the injection process. We instead inject the individual pages that come with the injections (which are packed optimally anyway, albeit with respect to themselves only). Packing will be re-introduced for unoptimized page groups at a later date when we overhaul the injection format.

I've also replaced the Colosseum door fix with a simple frame rotation adjustment, rather than replacing the full model. This in turn means one less texture page is injected here. Ref #1288 and LostArtefacts/TRXInjectionTool#23.

This removes texture packing from the injection process. We instead
inject the individual pages that come with the injections (which are
packed individually anyway). Packing will later be re-introduced for
unoptimized page groups only, but this is dependent on a format
refactor.
This replaces the full model swap for the first door in Colosseum with a
frame rotation fix, which is all that is needed. This reduces the number
of texture pages needed.
@lahm86 lahm86 added Internal The invisible stuff TR1 labels Jan 29, 2025
@lahm86 lahm86 self-assigned this Jan 29, 2025
@lahm86 lahm86 requested review from a team as code owners January 29, 2025 20:03
@lahm86 lahm86 requested review from rr-, walkawayy and aredfan and removed request for a team January 29, 2025 20:03
Copy link
Collaborator

@rr- rr- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we keep the 8 bit palette matching?

@lahm86
Copy link
Collaborator Author

lahm86 commented Jan 29, 2025

Did we keep the 8 bit palette matching?

That's still in the packer module, but unused as TR1 is promoted to 32-bit on read, and we expand the base palette if needed in the injection module (still TR1 only). Once TR2 injections are up to speed we'll certainly use the matching for 8-bit again.

@lahm86 lahm86 merged commit ec686bd into LostArtefacts:develop Jan 29, 2025
8 checks passed
@lahm86 lahm86 deleted the improve-injection-performance branch January 29, 2025 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internal The invisible stuff TR1
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants