diff --git a/.gitignore b/.gitignore index 00eb5a3..8946a49 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,5 @@ build/ *.mp4 /data/output +*.glb +*.ktx diff --git a/base/VulkanTools.cpp b/base/VulkanTools.cpp index ff1cefa..d7c1691 100644 --- a/base/VulkanTools.cpp +++ b/base/VulkanTools.cpp @@ -27,8 +27,9 @@ const std::string getAssetPath() } else { - - return std::filesystem::path(VK_EXAMPLE_DATA_DIR); + std::filesystem::path dataPath = VK_EXAMPLE_DATA_DIR; + std::string strDataPath = dataPath.generic_string() ; + return strDataPath; } #endif diff --git a/base/vulkanexamplebase.cpp b/base/vulkanexamplebase.cpp index 5ccee60..778bbe4 100644 --- a/base/vulkanexamplebase.cpp +++ b/base/vulkanexamplebase.cpp @@ -485,6 +485,7 @@ void VulkanExampleBase::initVulkan() if (settings.selectedPhysicalDeviceIndex > gpuCount) { std::cerr << "wrong GPU selection,check selectedPhysicalDeviceIndex in config file,fallback to 0" << std::endl; + settings.selectedPhysicalDeviceIndex = 0; selectedDevice = 0; } diff --git a/base/vulkanexamplebase.h b/base/vulkanexamplebase.h index 354cd5f..7d331fd 100644 --- a/base/vulkanexamplebase.h +++ b/base/vulkanexamplebase.h @@ -82,8 +82,8 @@ public: static std::vector args; bool prepared = false; - uint32_t width = 1280; - uint32_t height = 720; + uint32_t width = 1920; + uint32_t height = 1080; float frameTimer = 1.0f; Camera camera; glm::vec2 mousePos; @@ -103,7 +103,7 @@ public: struct Settings { uint32_t selectedPhysicalDeviceIndex = 7; - bool validation = true; // 校验层开关 + bool validation = false; // 校验层开关 bool fullscreen = false; // 全屏开关 bool vsync = false; // 垂直同步开关 bool multiSampling = false; // 多重采样 @@ -111,7 +111,7 @@ public: bool headless = false; // 无头开关 bool outputPNGimage = false; bool enableSaveToImageSequeue = true; // 图片序列开关(暂时弃用) - uint32_t outputFrameCount = 50; // 图片序列结束帧 + uint32_t outputFrameCount = 480; // 图片序列结束帧 bool takeScreenShot = false; // 截屏(暂时弃用) uint32_t startFrameCount = 1; // 图片序列开始帧 diff --git a/src/render/render.cpp b/src/render/render.cpp index 3054655..1d20f69 100644 --- a/src/render/render.cpp +++ b/src/render/render.cpp @@ -203,7 +203,7 @@ PlumageRender::PlumageRender() models.scene.loadFromFile(filename, vulkanDevice, queue); auto tFileLoad = std::chrono::duration(std::chrono::high_resolution_clock::now() - tStart).count(); std::cout << "Loading took " << tFileLoad << " ms" << std::endl; - camera.setPosition({ 0.0f, 0.0f, -6.0f }); + camera.setPosition({ 0.0f, 0.5f, -6.0f }); camera.setRotation({ 0.0f, 0.0f, 0.0f }); } diff --git a/src/render/render.h b/src/render/render.h index a4e4dad..95e1b75 100644 --- a/src/render/render.h +++ b/src/render/render.h @@ -129,7 +129,7 @@ public: struct FilePath { //model path - std::string glTFModelFilePath = getAssetPath() + "models/DamagedHelmet/DamagedHelmet.gltf"; + std::string glTFModelFilePath = getAssetPath() + "models/free_porsche_911_carrera_4s.glb"; std::string modelVertShaderPath = getAssetPath() + "buster_drone/shaders/glsl/mesh.vert.spv"; std::string modelFragShaderPath = getAssetPath() + "buster_drone/shaders/glsl/mesh.frag.spv"; @@ -159,7 +159,7 @@ public: std::string brdfVertShaderPath = getAssetPath() + "shaders/genbrdflut.vert.spv"; std::string brdfFragShaderPath = getAssetPath() + "shaders/genbrdflut.frag.spv"; // environment map texture - std::string envMapFilePath = getAssetPath() + "environments/metro_noord_4k_hdr16f_cube.ktx"; + std::string envMapFilePath = getAssetPath() + "environments/7_4k_hdr16f_cube.ktx"; std::string emptyEnvmapFilePath = getAssetPath() + "textures/empty.ktx"; // pbr shader std::string pbrVertShaderPath = getAssetPath() + "shaders/pbr.vert.spv";