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

Artifact pixels when using -fixbc4x4 on certain DDS files #315

Open
wet-dog opened this issue Feb 2, 2023 · 3 comments
Open

Artifact pixels when using -fixbc4x4 on certain DDS files #315

wet-dog opened this issue Feb 2, 2023 · 3 comments
Labels
bug tools Applies to texconv, texdiag, texassemble, etc.

Comments

@wet-dog
Copy link

wet-dog commented Feb 2, 2023

I'm getting artifact pixels when running texconv -fixbc4x4 -m 1 -y file.dds on some files where the top-level width & height are not multiples of 4.

Input DDS
Output DDS

circleOutput

I'm using the latest January 31, 2023 release of texconv.exe.

@walbourn walbourn added bug tools Applies to texconv, texdiag, texassemble, etc. labels Feb 2, 2023
@walbourn walbourn pinned this issue Feb 2, 2023
@walbourn walbourn self-assigned this Feb 2, 2023
@walbourn
Copy link
Member

The -fixbc4x4 switch is a bit of a hack, so it really depends on how the original compressor handles 1x1, 2x1, 1x2, 2x2, etc. size blocks. Most of them do it by pixel replication which is probably what's showing up here.

I'll have to see if there's a good way to 'clear out' the originally unused pixels, but I'm not sure how to do that robustly.

@wet-dog
Copy link
Author

wet-dog commented Mar 13, 2023

Would it be possible for texconv to pad the images before compression?

@wet-dog wet-dog closed this as completed Mar 13, 2023
@wet-dog wet-dog reopened this Mar 13, 2023
@walbourn
Copy link
Member

DirectXTex compressor uses the same pixel replication pattern as D3DX did for blocks that are less than 4x4 in size, which is where the 'artifact' you are describing comes from.

@walbourn walbourn unpinned this issue Mar 30, 2023
@walbourn walbourn removed their assignment Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug tools Applies to texconv, texdiag, texassemble, etc.
Projects
None yet
Development

No branches or pull requests

2 participants