diff --git a/base/vulkanexamplebase.h b/base/vulkanexamplebase.h index 4b24f9b..e43804b 100644 --- a/base/vulkanexamplebase.h +++ b/base/vulkanexamplebase.h @@ -119,7 +119,7 @@ public: bool multiSampling = true; // 多重采样 bool rotateModel = true; // 模型自旋转(暂时失效) bool headless = false; // 无头开关 - bool outputPNGimage = true; // 输出图片序列格式为PNG(四通道) + bool outputPNGimage = false; // 输出图片序列格式为PNG(四通道) bool enableSaveToImageSequeue = false; // 图片序列开关(暂时弃用) uint32_t outputFrameCount = 75; // 图片序列结束帧 bool takeScreenShot = false; // 截屏(暂时弃用) diff --git a/data/output/video/device0/result.mp4 b/data/output/video/device0/result.mp4 index 92d286e..2fa2cd1 100644 Binary files a/data/output/video/device0/result.mp4 and b/data/output/video/device0/result.mp4 differ diff --git a/src/render/render.cpp b/src/render/render.cpp index 7119822..013409b 100644 --- a/src/render/render.cpp +++ b/src/render/render.cpp @@ -1770,26 +1770,8 @@ PlumageRender::PlumageRender() { if (colorSwizzle) { - uint8_t* pixels = new uint8_t[width * height * 4]; - uint32_t index = 0; - for (uint32_t j = height - 1; j >= 0; j--) - { - unsigned int* row = (unsigned int*)data; - for (int i = 0; i < width; ++i) - { - float r = (float)i / (float)width; - float g = (float)j / (float)height; - float b = 0.2f; - int ir = int(255.99 * r); - int ig = int(255.99 * g); - int ib = int(255.99 * b); - - pixels[index++] = ir; - pixels[index++] = ig; - pixels[index++] = ib; - } - } - stbi_write_png(filePath.c_str(), width, height, 4, pixels, static_cast(subResourceLayout.rowPitch)); + // 暂时不改,此处需要将BGR通道改成RGB格式 + stbi_write_png(filePath.c_str(), width, height, 4, data, static_cast(subResourceLayout.rowPitch)); } else {