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

[FF8] Research for WM + battle texture replacement #564

Merged

Conversation

myst6re
Copy link
Contributor

@myst6re myst6re commented Apr 17, 2023

Summary

Add partial support to battle textures

  • Fix texture holes in Worldmap

ACKs

  • I have updated the Changelog.md file
  • I did test my code on FF7
  • I did test my code on FF8

https://imgsli.com/MTg5NjQ2

@myst6re myst6re force-pushed the feature/ff8-battle-textures branch from e847232 to 1ae8024 Compare April 17, 2023 22:12
@julianxhokaxhiu
Copy link
Owner

Is it safe to assume that this patch fixed also the UV coords for WM? So in case we can delete the hext files for FF8 directly in this PR. What do you think?

@julianxhokaxhiu julianxhokaxhiu added the enhancement New feature or request label Apr 17, 2023
src/ff8/vram.cpp Outdated Show resolved Hide resolved
src/ff8/vram.cpp Outdated Show resolved Hide resolved
src/ff8/vram.cpp Outdated Show resolved Hide resolved
src/ff8/vram.cpp Outdated Show resolved Hide resolved
src/ff8/vram.cpp Outdated Show resolved Hide resolved
src/ff8/vram.cpp Outdated Show resolved Hide resolved
src/ff8/vram.cpp Outdated Show resolved Hide resolved
src/ff8/vram.cpp Outdated Show resolved Hide resolved
src/ff8/vram.cpp Outdated Show resolved Hide resolved
src/ff8/vram.cpp Outdated Show resolved Hide resolved
@myst6re
Copy link
Contributor Author

myst6re commented Apr 17, 2023

Is it safe to assume that this patch fixed also the UV coords for WM? So in case we can delete the hext files for FF8 directly in this PR. What do you think?

Nope, let me explain:

The Maki patch happen right after the parsing of file data, it prevent the game to alter the UVs (the game does it to use bilinear filtering on textures)

Later the game filters which vertices are currently displayed on the screen and produce a big array of GPU commands with various things like vertices. But it alters the UVs again in some cases in this big array. Later again, the game reads the big array and transform the UVs into floats. That's where my patch fixes things

So in short:

  1. WMX parsing
  2. UVs modified (2 added/substracted) <-- Maki patch to remove this
  3. Vertices targeting
  4. UVs modified (targeted to the right position in the texture chunk of the VRAM) <-- My PR stores the missing bits caused by this modification
  5. Big array of GPU commands created with the targeted vertices
  6. Execution of GPU commands
  7. UVs converted to float <-- My PR restores the missing bits here for more accurate floating values

@myst6re
Copy link
Contributor Author

myst6re commented Apr 17, 2023

I can integrate the maki patch into FFNx and make it an option in FFNx.toml if it is needed

@myst6re myst6re force-pushed the feature/ff8-battle-textures branch from 1ae8024 to 77180b5 Compare April 17, 2023 22:51
@julianxhokaxhiu
Copy link
Owner

I can integrate the maki patch into FFNx and make it an option in FFNx.toml if it is needed

No worries, it's not a high prio, we can include it in code any time :) Thanks for working on this in the meantime

@myst6re myst6re force-pushed the feature/ff8-battle-textures branch from 77180b5 to 20eb02b Compare May 1, 2023 14:15
@myst6re myst6re force-pushed the feature/ff8-battle-textures branch from 20eb02b to 963d9aa Compare June 10, 2023 15:13
@myst6re myst6re force-pushed the feature/ff8-battle-textures branch 2 times, most recently from 3b7f877 to 9602efb Compare July 2, 2023 17:21
@myst6re myst6re force-pushed the feature/ff8-battle-textures branch 4 times, most recently from 30626fe to ffc7569 Compare July 3, 2023 20:12
@myst6re myst6re force-pushed the feature/ff8-battle-textures branch from ffc7569 to 71131a4 Compare July 3, 2023 20:50
@myst6re myst6re marked this pull request as ready for review July 3, 2023 20:53
@julianxhokaxhiu
Copy link
Owner

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@julianxhokaxhiu julianxhokaxhiu merged commit 2fa543d into julianxhokaxhiu:master Jul 8, 2023
1 check passed
@julianxhokaxhiu julianxhokaxhiu changed the title Research for WM + battle texture replacement [FF8] Research for WM + battle texture replacement Jul 8, 2023
@julianxhokaxhiu
Copy link
Owner

Fantastic work there, thank you!

@julianxhokaxhiu julianxhokaxhiu linked an issue Jul 9, 2023 that may be closed by this pull request
7 tasks
@julianxhokaxhiu julianxhokaxhiu added this to the 1.16.0 milestone Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ FF8 ] Custom texture override
2 participants