mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Fix full_range of arrays
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user