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 incorrect filtering used in mipmap generation #2525

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

LaylBongers
Copy link
Contributor

The min filtering setting is used to down-sample, this is what is used for mipmap generation in this example. It was set to Nearest which will pick one of the pixels, which is incorrect behavior for down-sampling. Linear correctly averages the 4 pixels when down-sampling.

@LaylBongers
Copy link
Contributor Author

Difference in behavior in my application between these sampling modes making use of this example's code.

Nearest:
magecraft-player_UACdEUSPsr

Linear:
magecraft-player_NSv6HhjkOg

@cwfitzgerald
Copy link
Member

Doh! That's a big one, good catch. You need to regenerate the rest screenshot to get ci to pass. Go to wgpu/examples/mipmap/screenshot.png and delete it, then run cargo test --examples mipmap which will regenerate it.

@kvark
Copy link
Member

kvark commented Mar 7, 2022

Interesting how this went on unnoticed. Good catch!

@cwfitzgerald cwfitzgerald enabled auto-merge (squash) March 10, 2022 20:13
@cwfitzgerald cwfitzgerald merged commit 3c85fe6 into gfx-rs:master Mar 10, 2022
cwfitzgerald pushed a commit that referenced this pull request Oct 25, 2023
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.

3 participants