mirror of
https://github.com/bevyengine/bevy
synced 2025-02-16 14:08:32 +00:00
bevy_render2/bevy_pbr2: Update to wgpu 0.9 / naga 0.5 (#19)
This commit is contained in:
parent
3f70f92bff
commit
7c57725a63
3 changed files with 8 additions and 3 deletions
|
@ -29,4 +29,4 @@ bitflags = "1.2"
|
|||
# direct dependency required for derive macro
|
||||
bytemuck = { version = "1", features = ["derive"] }
|
||||
crevice = { path = "../../crates/crevice" }
|
||||
wgpu = "0.8"
|
||||
wgpu = "0.9"
|
||||
|
|
|
@ -356,7 +356,12 @@ fn fetch_shadow(light_id: i32, homogeneous_coords: vec4<f32>) -> f32 {
|
|||
// compute texture coordinates for shadow lookup
|
||||
let light_local = homogeneous_coords.xy * flip_correction * proj_correction + vec2<f32>(0.5, 0.5);
|
||||
// do the lookup, using HW PCF and comparison
|
||||
return textureSampleCompare(shadow_textures, shadow_textures_sampler, light_local, i32(light_id), homogeneous_coords.z * proj_correction);
|
||||
// NOTE: Due to the non-uniform control flow above, we must use the Level variant of
|
||||
// textureSampleCompare to avoid undefined behaviour due to some of the fragments in
|
||||
// a quad (2x2 fragments) being processed not being sampled, and this messing with
|
||||
// mip-mapping functionality. The shadow maps have no mipmaps so Level just samples
|
||||
// from LOD 0.
|
||||
return textureSampleCompareLevel(shadow_textures, shadow_textures_sampler, light_local, i32(light_id), homogeneous_coords.z * proj_correction);
|
||||
}
|
||||
|
||||
struct FragmentInput {
|
||||
|
|
|
@ -29,7 +29,7 @@ bevy_utils = { path = "../../crates/bevy_utils", version = "0.5.0" }
|
|||
image = { version = "0.23.12", default-features = false }
|
||||
|
||||
# misc
|
||||
wgpu = "0.8"
|
||||
wgpu = "0.9"
|
||||
naga = { git = "https://github.com/gfx-rs/naga", rev = "0cf5484bba530f1134badbd2a1c1a8e9daf2e9c3", features = ["glsl-in", "spv-out", "spv-in", "wgsl-in"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
bitflags = "1.2.1"
|
||||
|
|
Loading…
Add table
Reference in a new issue