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

Fix texel coordinate assignment #58

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

HeroicKatora
Copy link
Member

In operations with mismatching texel blocks, i.e. when compressing from a pixel texel into a packed form or exploding a packed form, the index generation would only run on 1024—the default chunk size—input and output texels at a time resulting in some fetch/write coordinates being corrupted to the 0th texel instead.

More specifically, it would always run on at most the chunk size texels but when mismatched texels are being used that is the count of super blocks. There are more reads and write happening. Each individually is stacked into a 'super block' that is the least common multiple along each individual axis. For instance, packing pixels into a 1x8 binary bit texture would use 8 input texels, one output texel, for each such super block which is 8 pixels wide. This would result in everything except the first eighth of each super block, which are 8*1024 input pixels (across rows), being wrongly filled with information from the 0th texel in the upper left corner effectively duplicating that single pixels color information a lot in images larger than 1024 pixels.

In operations with mismatching texel blocks, i.e. when compressing from
a pixel texel into a packed form or exploding a packed form, the index
generation would only run on 1024—the default chunk size—input and
output texels at a time resulting in some fetch/write coordinates being
corrupted to the 0th texel instead.

More specifically, it would always run on at most the chunk size texels
but when mismatched texels are being used that is the count of super
blocks. There are more reads and write happening. Each individually is
stacked into a 'super block' that is the least common multiple along
each individual axis. For instance, packing pixels into a 1x8 binary bit
texture would use 8 input texels, one output texel, for each such super
block which is 8 pixels wide. This would result in everything except the
first eighth of each super block, which are 8*1024 input pixels (across
rows), being wrongly filled with information from the 0th texel in the
upper left corner effectively duplicating that single pixels color
information *a lot* in images larger than 1024 pixels.
@HeroicKatora HeroicKatora merged commit a6306a6 into master Dec 19, 2024
7 checks passed
@HeroicKatora HeroicKatora deleted the fix-2024-12-19-black-white-binary branch December 19, 2024 01:20
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.

1 participant