Skip to content

Commit

Permalink
bevy_pbr2: Do not use bilinear filtering for sampling depth textures
Browse files Browse the repository at this point in the history
  • Loading branch information
superdump committed Jul 13, 2021
1 parent f97942e commit f53baab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pipelined/bevy_pbr2/src/render/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ impl FromWorld for ShadowShaders {
address_mode_u: AddressMode::ClampToEdge,
address_mode_v: AddressMode::ClampToEdge,
address_mode_w: AddressMode::ClampToEdge,
mag_filter: FilterMode::Linear,
min_filter: FilterMode::Linear,
mag_filter: FilterMode::Nearest,
min_filter: FilterMode::Nearest,
mipmap_filter: FilterMode::Nearest,
compare: Some(CompareFunction::LessEqual),
..Default::default()
Expand All @@ -207,8 +207,8 @@ impl FromWorld for ShadowShaders {
address_mode_u: AddressMode::ClampToEdge,
address_mode_v: AddressMode::ClampToEdge,
address_mode_w: AddressMode::ClampToEdge,
mag_filter: FilterMode::Linear,
min_filter: FilterMode::Linear,
mag_filter: FilterMode::Nearest,
min_filter: FilterMode::Nearest,
mipmap_filter: FilterMode::Nearest,
compare: Some(CompareFunction::LessEqual),
..Default::default()
Expand Down
4 changes: 2 additions & 2 deletions pipelined/bevy_pbr2/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl FromWorld for PbrShaders {
visibility: ShaderStage::FRAGMENT,
ty: BindingType::Sampler {
comparison: true,
filtering: true,
filtering: false,
},
count: None,
},
Expand All @@ -110,7 +110,7 @@ impl FromWorld for PbrShaders {
visibility: ShaderStage::FRAGMENT,
ty: BindingType::Sampler {
comparison: true,
filtering: true,
filtering: false,
},
count: None,
},
Expand Down

0 comments on commit f53baab

Please sign in to comment.