sahder位置修改和配置项准备

test-headless
ink-soul 2024-04-17 12:03:02 +08:00
parent 8461390496
commit b3836c99c3
4 changed files with 17 additions and 14 deletions

View File

@ -23,30 +23,33 @@ namespace PlumageConfig
bool validation = true; // 校验层开关 bool validation = true; // 校验层开关
bool fullscreen = false; // 全屏开关 bool fullscreen = false; // 全屏开关
bool vsync = false; // 垂直同步开关 bool vsync = false; // 垂直同步开关
bool headless = false; // ÎÞÍ·¿ª¹Ø
bool outputPNGimage = false;
bool multiSampling = false; // 多重采样 bool multiSampling = false; // 多重采样
VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_4_BIT; // 多重采样倍率 VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_4_BIT; // 多重采样倍率
bool rotateModel = true; // 模型自旋转 bool rotateModel = true; // 模型自旋转
uint32_t modelRotateSpeed = 2; uint32_t modelRotateSpeed = 2; // ×ÔÐýתËÙ¶È
bool headless = false; // ÎÞÍ·¿ª¹Ø
bool outputPNGimage = false;
//bool enableSaveToImageSequeue = true; // 图片序列开关(暂时弃用) //bool enableSaveToImageSequeue = true; // 图片序列开关(暂时弃用)
uint32_t startFrameIndex = 1; // 图片序列开始帧 uint32_t startFrameIndex = 1; // 图片序列开始帧
uint32_t endFrameIndex = 50; // 图片序列结束帧 uint32_t endFrameIndex = 50; // 图片序列结束帧
uint32_t videoFrameRate = 25; // 视频帧率 uint32_t videoFrameRate = 25; // 视频帧率
uint32_t selectedPhysicalDeviceIndex = 0; uint32_t selectedPhysicalDeviceIndex = 0;
float fovX; float fovX = 1.f;
float fovY; float fovY = 1.f;
float cX; float cX = 2.f;
float cY; float cY = 0.f;
glm::vec3 bottomCenter; glm::vec3 bottomCenter = glm::vec3(0.f,0.f,-6.f);
glm::vec3 bottomNormal; glm::vec3 bottomNormal = glm::vec3(0.f,1.0f,0.f);
}settings; }settings;
struct FilePath struct FilePath
{ //model path { //model path
std::string glTFModelFilePath = getAssetPath() + "models/DamagedHelmet/DamagedHelmet.gltf"; std::string glTFModelFilePath = getAssetPath() + "models/DamagedHelmet/kettle.glb";
std::string modelVertShaderPath = getAssetPath() + "buster_drone/shaders/glsl/mesh.vert.spv"; std::string modelVertShaderPath = getAssetPath() + "buster_drone/shaders/glsl/mesh.vert.spv";
std::string modelFragShaderPath = getAssetPath() + "buster_drone/shaders/glsl/mesh.frag.spv"; std::string modelFragShaderPath = getAssetPath() + "buster_drone/shaders/glsl/mesh.frag.spv";
@ -61,9 +64,9 @@ namespace PlumageConfig
std::string iblTexturesFilePath = getAssetPath() + "textures/hdr/gcanyon_cube.ktx"; std::string iblTexturesFilePath = getAssetPath() + "textures/hdr/gcanyon_cube.ktx";
//tonemapping //tonemapping
std::string tonemappingVertShaderPath = getAssetPath() + "buster_drone/shaders/glsl/genbrdflut.vert.spv"; std::string tonemappingVertShaderPath = getAssetPath() + "shaders/genbrdflut.vert.spv";
std::string tonemappingEnableFragShaderPath = getAssetPath() + "buster_drone/shaders/glsl/tonemapping_enable.frag.spv"; std::string tonemappingEnableFragShaderPath = getAssetPath() + "shaders/tonemapping_enable.frag.spv";
std::string tonemappingDisableFragShaderPath = getAssetPath() + "buster_drone/shaders/glsl/tonemapping_disable.frag.spv"; std::string tonemappingDisableFragShaderPath = getAssetPath() + "shaders/tonemapping_disable.frag.spv";
// cube map // cube map

View File

@ -203,7 +203,7 @@ PlumageRender::PlumageRender()
models.scene.loadFromFile(filename, vulkanDevice, queue); models.scene.loadFromFile(filename, vulkanDevice, queue);
auto tFileLoad = std::chrono::duration<double, std::milli>(std::chrono::high_resolution_clock::now() - tStart).count(); auto tFileLoad = std::chrono::duration<double, std::milli>(std::chrono::high_resolution_clock::now() - tStart).count();
std::cout << "Loading took " << tFileLoad << " ms" << std::endl; std::cout << "Loading took " << tFileLoad << " ms" << std::endl;
camera.setPosition({ 0.0f, 0.0f, -6.0f }); camera.setPosition({ 0.0f, 0.0f, -2.0f });
camera.setRotation({ 0.0f, 0.0f, 0.0f }); camera.setRotation({ 0.0f, 0.0f, 0.0f });
} }