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

Texture alpha needlessly extended #7

Open
Jacky720 opened this issue Feb 4, 2025 · 0 comments
Open

Texture alpha needlessly extended #7

Jacky720 opened this issue Feb 4, 2025 · 0 comments

Comments

@Jacky720
Copy link

Jacky720 commented Feb 4, 2025

I'm using this project as a basis for a Blender importer, and I've noticed this during testing.

The texture 09d1bf.tga in rai_def_mt.tri seems to be unpacking incorrectly. The TGA dumped when exporting Raiden as an FBX looks like this:

Image

while in my replica, I got some out of range errors regarding extend_alpha(). Removing the call to extend_alpha and instead passing the byte directly in paintPixels allowed me to instead export this:

Image

My current guess is that the alpha modification is only necessary for PSM == 0x14 (which I haven't implemented yet), and PSM == 0x13 textures like this should use the byte directly (it's also possible I should be scaling the alpha in some other, slightly less extreme way, but I'm not sure how to ascertain that exact value except by finding the maximum alpha used in this type of texture).

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

No branches or pull requests

1 participant