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

[Tweak] Improve KD lava effect performance and stability #3501

Merged

Conversation

Archez
Copy link
Contributor

@Archez Archez commented Dec 9, 2023

The KD lava texture effect restoration required invalidating the texture cache every frame and introduced a performance cost that was noticeable on lower end systems.

To work around this I need to invalidate the lava texture used by the scenes DLs from KD's draw code. I'm doing this via the WORK_DISP buffer which executes before the POLY_OPA_DISP, which allows the texture to be invalidated before the scene is drawn. This should improve the performance in KD's room and retain the lava effect updating properly.

Using WORK_DISP for this increases its used size from 48 to 64 out of a max 256. The WORK_DISP seems to be used with the graph disassembler/crash handling, which is current disabled in SoH. Ideally this will be replaced with resource manager helpers on the LUS side in a future update.

I also added some texture size validation for HD textures to ensure all the lava textures are compatible with each other. When it is not (like from older texture packs), then the lava waving effect is disabled, and the cooling off effect just cools off to a black texture. This should prevent the crashes in KD's room seen when older texture packs are used.

Build Artifacts

@Archez Archez changed the base branch from develop to develop-macready December 17, 2023 05:54
@briaguya-ai briaguya-ai merged commit d370ca9 into HarbourMasters:develop-macready Dec 17, 2023
8 checks passed
@Archez Archez deleted the improve-kd-lava-performance branch December 17, 2023 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants