mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-09 17:18:41 -06:00
use linear for min
This commit is contained in:
parent
99cc2d1e72
commit
811bd8d8b4
|
@ -40,7 +40,7 @@ var s_diffuse: sampler;
|
|||
@fragment
|
||||
fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
|
||||
let color: vec4<f32> = textureSample(t_diffuse, s_diffuse, in.uv, in.tex_index);
|
||||
if (color.a == 0.) {
|
||||
if (color.a < 0.5) {
|
||||
discard;
|
||||
}
|
||||
return color;
|
||||
|
|
|
@ -70,7 +70,7 @@ pub fn load_prefabs(
|
|||
address_mode_v: wgpu::AddressMode::ClampToEdge,
|
||||
address_mode_w: wgpu::AddressMode::ClampToEdge,
|
||||
mag_filter: wgpu::FilterMode::Nearest,
|
||||
min_filter: wgpu::FilterMode::Nearest, //TODO min_filter Linear, requires filtering sampler
|
||||
min_filter: wgpu::FilterMode::Linear,
|
||||
mipmap_filter: wgpu::FilterMode::Nearest,
|
||||
..Default::default()
|
||||
});
|
||||
|
@ -82,7 +82,7 @@ pub fn load_prefabs(
|
|||
binding: 0,
|
||||
visibility: wgpu::ShaderStages::FRAGMENT,
|
||||
ty: wgpu::BindingType::Texture {
|
||||
sample_type: wgpu::TextureSampleType::Float { filterable: false },
|
||||
sample_type: wgpu::TextureSampleType::Float { filterable: true },
|
||||
view_dimension: wgpu::TextureViewDimension::D2Array,
|
||||
multisampled: false,
|
||||
},
|
||||
|
@ -91,7 +91,7 @@ pub fn load_prefabs(
|
|||
wgpu::BindGroupLayoutEntry {
|
||||
binding: 1,
|
||||
visibility: wgpu::ShaderStages::FRAGMENT,
|
||||
ty: wgpu::BindingType::Sampler(wgpu::SamplerBindingType::NonFiltering),
|
||||
ty: wgpu::BindingType::Sampler(wgpu::SamplerBindingType::Filtering),
|
||||
count: None,
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue