diff --git a/modules/asset_loader/src/vkcv/asset/asset_loader.cpp b/modules/asset_loader/src/vkcv/asset/asset_loader.cpp index a572fdaaf3c2f08b571e363cd23050fa8a145569..e3d3072543bd33e1f5a67ae7dac61d229005947a 100644 --- a/modules/asset_loader/src/vkcv/asset/asset_loader.cpp +++ b/modules/asset_loader/src/vkcv/asset/asset_loader.cpp @@ -63,8 +63,7 @@ enum IndexType getIndexType(const enum fx::gltf::Accessor::ComponentType &t) case fx::gltf::Accessor::ComponentType::UnsignedInt: return IndexType::UINT32; default: - std::cerr << "ERROR: Index type not supported: " << - static_cast<uint16_t>(t) << std::endl; + vkcv_log(LogLevel::ERROR, "Index type not supported: %u", static_cast<uint16_t>(t)); return IndexType::UNDEFINED; } } @@ -368,7 +367,18 @@ int loadScene(const std::string &path, Scene &scene){ TextureData loadTexture(const std::filesystem::path& path) { TextureData texture; + uint8_t* data = stbi_load(path.string().c_str(), &texture.width, &texture.height, &texture.componentCount, 4); + + if (!data) { + vkcv_log(LogLevel::ERROR, "Texture could not be loaded from '%s'", path.c_str()); + + texture.width = 0; + texture.height = 0; + texture.componentCount = 0; + return texture; + } + texture.data.resize(texture.width * texture.height * 4); memcpy(texture.data.data(), data, texture.data.size()); return texture; diff --git a/projects/voxelization/src/BloomAndFlares.cpp b/projects/voxelization/src/BloomAndFlares.cpp index 3e0066b2b8bb5baad1bbb47ba4aa55cfa9455c94..fac57735a6544c197f880f78e1f512382607d048 100644 --- a/projects/voxelization/src/BloomAndFlares.cpp +++ b/projects/voxelization/src/BloomAndFlares.cpp @@ -96,7 +96,7 @@ BloomAndFlares::BloomAndFlares( compProg, { p_Core->getDescriptorSet(m_CompositeDescSet).layout }); // radial LUT - const auto texture = vkcv::asset::loadTexture("resources/radialLUT.png"); + const auto texture = vkcv::asset::loadTexture("resources/RadialLUT.png"); m_radialLut.fill((void*)texture.data.data(), texture.data.size()); } diff --git a/projects/voxelization/src/ShadowMapping.hpp b/projects/voxelization/src/ShadowMapping.hpp index 7e06fb58f492837b7a646dfa52c5dd50993df04e..8066d5bdc90a66c0823be4dc23cf6a12729e32c7 100644 --- a/projects/voxelization/src/ShadowMapping.hpp +++ b/projects/voxelization/src/ShadowMapping.hpp @@ -2,8 +2,6 @@ #include <vkcv/Core.hpp> #include <vkcv/camera/Camera.hpp> -#define GLM_DEPTH_ZERO_TO_ONE -#define GLM_FORCE_LEFT_HANDED #include <glm/glm.hpp> #include <glm/gtx/transform.hpp>