Skip to content

fix(ltk_texture): use image_dds for BC1/BC3 TEX decode, fix Dds::heig…#115

Merged
Crauzer merged 1 commit intoLeagueToolkit:mainfrom
FrogCsLoL:fix/ltk-texture-bc1-bc3-decode
Mar 18, 2026
Merged

fix(ltk_texture): use image_dds for BC1/BC3 TEX decode, fix Dds::heig…#115
Crauzer merged 1 commit intoLeagueToolkit:mainfrom
FrogCsLoL:fix/ltk-texture-bc1-bc3-decode

Conversation

@FrogCsLoL
Copy link
Contributor

Tex to png and dds to png causing black spots

image image
  • Replace texture2ddecoder BC1/BC3 with image_dds::Surface decode (already a dependency, used correctly for DDS) to fix corrupted colors/black pixels when decoding League TEX files
  • Add Rgba8Owned(Vec) variant to TexSurfaceData for direct RGBA passthrough without swizzle
  • Fix Dds::height() returning get_width() instead of get_height()

this should fix it, tested it.

@FrogCsLoL FrogCsLoL requested a review from alanpq March 7, 2026 16:06
Copy link
Contributor

@alanpq alanpq left a comment

Choose a reason for hiding this comment

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

do a local check before requesting review again

@FrogCsLoL FrogCsLoL requested a review from alanpq March 7, 2026 17:24
@FrogCsLoL
Copy link
Contributor Author

FrogCsLoL commented Mar 7, 2026

idk how to use github
image

@alanpq
Copy link
Contributor

alanpq commented Mar 7, 2026

can you squash allat back into the first commit before merge

…ht()

- Replace texture2ddecoder BC1/BC3 decode with image_dds (already a dep)
  to fix corrupted/black pixels caused by wrong pixel format assumptions
- Add Rgba8Owned variant to TexSurfaceData for direct RGBA passthrough
- Add ImageDds(#[from] image_dds::error::SurfaceError) to DecodeErr
- Fix Dds::height() returning width instead of height
@FrogCsLoL FrogCsLoL force-pushed the fix/ltk-texture-bc1-bc3-decode branch from 52bb0e8 to c321fb2 Compare March 7, 2026 18:28
@FrogCsLoL
Copy link
Contributor Author

image

done

@Crauzer Crauzer added the crate:ltk_texture Texture crate (TEX/DDS) label Mar 18, 2026
@Crauzer Crauzer merged commit ca8eff4 into LeagueToolkit:main Mar 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crate:ltk_texture Texture crate (TEX/DDS)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants