default texture, y is up

This commit is contained in:
2019-08-03 00:01:44 +02:00
parent 4f261fa708
commit 35bb18ace9
3 changed files with 10 additions and 8 deletions

View File

@@ -289,18 +289,20 @@ impl VulkanRenderer {
let (default_tex, default_tex_future) = {
let image = image::load_from_memory_with_format(include_bytes!("../models/Eye.png"),
ImageFormat::PNG).unwrap().to_rgba();
let image = image::load_from_memory_with_format(include_bytes!("../models/missing-texture.jpg"),
ImageFormat::JPEG).unwrap().to_rgba();
let image_data = image.into_raw().clone();
ImmutableImage::from_iter(
image_data.iter().cloned(),
Dimensions::Dim2d { width: 4096, height: 4096 },
Dimensions::Dim2d { width: 128, height: 128 },
Format::R8G8B8A8Unorm,
queue.clone(),
).unwrap()
};
default_tex_future.flush().unwrap();
let default_descriptor_set = Arc::new(PersistentDescriptorSet::start(pipeline.clone(), 0)
.add_sampled_image(default_tex.clone(), sampler.clone()).unwrap()
.build().unwrap()