diff --git a/gfx-examples/data/shadow-forward.frag b/gfx-examples/data/shadow-forward.frag index 0928adce86..9a2bd8fc67 100644 --- a/gfx-examples/data/shadow-forward.frag +++ b/gfx-examples/data/shadow-forward.frag @@ -39,7 +39,6 @@ void main() { // project into the light space vec4 light_local = light.proj * v_Position; // compute texture coordinates for shadow lookup - light_local.y *= -1.0; // difference in Vulkan target versus texture coordinates... light_local.xyw = (light_local.xyz/light_local.w + 1.0) / 2.0; light_local.z = i; // do the lookup, using HW PCF and comparison diff --git a/gfx-examples/src/shadow.rs b/gfx-examples/src/shadow.rs index 5200f6da93..56f52f059e 100644 --- a/gfx-examples/src/shadow.rs +++ b/gfx-examples/src/shadow.rs @@ -113,7 +113,7 @@ impl Light { let mx_view = Matrix4::look_at( self.pos, Point3::origin(), - Vector3::unit_z(), + -Vector3::unit_z(), ); let projection = PerspectiveFov { fovy: Deg(self.fov).into(), diff --git a/wgpu-native/src/device.rs b/wgpu-native/src/device.rs index b56003c2ee..fad6eb6342 100644 --- a/wgpu-native/src/device.rs +++ b/wgpu-native/src/device.rs @@ -442,8 +442,8 @@ pub fn device_create_texture( format: desc.format, full_range: hal::image::SubresourceRange { aspects, - levels: 0..1, //TODO: mips - layers: 0..1, //TODO + levels: 0 .. 1, //TODO: mips + layers: 0 .. desc.array_size as u16, }, swap_chain_link: None, life_guard: LifeGuard::new(),