Fix full_range of arrays

This commit is contained in:
Dzmitry Malyshau
2019-02-22 13:53:28 -05:00
parent c21420399a
commit 5ada8d9943
3 changed files with 3 additions and 4 deletions

View File

@@ -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

View File

@@ -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(),

View File

@@ -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(),