Fix full_range of arrays

This commit is contained in:
Dzmitry Malyshau committed 2019-02-22 13:53:28 -05:00
1 parent c21420399a
commit 5ada8d9943
3 files changed
+3 -4

No files matched your search

-1
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
+1 -1
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(),
+2 -2
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(),