Compiles well, but I get the run time error on Ubuntu 20.04+GTX760:
tokyo@tokyo-Z87-DS3H:~/VulkanSponza/bin$ ./vulkanSponza
Material "terial__25"
Diffuse: "nza/lion.dds"
vulkanSponza: /home/tokyo/VulkanSponza/base/vulkanTextureLoader.hpp:121: void vkTools::VulkanTextureLoader::loadTexture(std::string, VkFormat, vkTools::VulkanTexture*, bool, VkImageUsageFlags): Assertion `!tex2D.empty()' failed.
Aborted (core dumped)
I have tried to debug this, but could not get it quite right. I have added the following line right before the assertion error assert(!tex2D.empty()); on the line 120 of /base/vulkanTextureLoader.hpp (with "#include <iostream>")
std::cout << filename.c_str() << std::endl;
And after executing this again I get some more information:
tokyo@tokyo-Z87-DS3H:~/VulkanSponza/bin$ ./vulkanSponza
./../data/textures/particle_smoke.ktx
./../data/textures/skysphere_night.ktx
./../data/sponza/dummy.dds
./../data/sponza/dummy_specular.dds
./../data/sponza/dummy_ddn.dds
Material "terial__25"
Diffuse: "nza/lion.dds"
./../data/nza/lion.dds
vulkanSponza: /home/tokyo/VulkanSponza/base/vulkanTextureLoader.hpp:121: void vkTools::VulkanTextureLoader::loadTexture(std::string, VkFormat, vkTools::VulkanTexture*, bool, VkImageUsageFlags): Assertion `!tex2D.empty()' failed.
Aborted (core dumped)
So you can see it loads some data alright, but then cuts "spo" from "sponza" when loading lion.dds, but I cannot see what exactly cuts it. This has something to do with Windows backslashes most likely, perhaps the replacement
std::replace(fileName.begin(), fileName.end(), '\', '/');
in src/vulkansponza.cpp is the culprit here, but I cannot see what this needs to be. In my previous experiences .mtl files often have Windows backslashes and these get mingled with Linux path slashes pretty badly, so I would often just replace them in the editor, but here I only see some big data .dds files. Please help me out.
The other repo, https://github.com/SaschaWillems/Vulkan, works fine and produces no such run time errors on Ubuntu 20.04 and Sponza runs fine there as gltfscenerendering example, but this one has more advanced experiments to study so it's also relevant to get it right.