default texture, y is up
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user