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

[Merged by Bors] - Change default Image FilterMode to Linear #4465

Closed
wants to merge 9 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion crates/bevy_render/src/texture/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,15 @@ impl Default for Image {
sample_count: 1,
usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST,
},
sampler_descriptor: wgpu::SamplerDescriptor::default(),
sampler_descriptor: wgpu::SamplerDescriptor {
// At the time of writing, wgpu defaults to `Nearest` filtering. This causes
// artifacts when the image is scaled. Using `Linear` results in a more uniform,
// though potentially blurry image.
// See issue for details: https://github.com/bevyengine/bevy/issues/4464
mag_filter: wgpu::FilterMode::Linear,
min_filter: wgpu::FilterMode::Linear,
..Default::default()
},
}
}
}
Expand Down