暂停PNG格式输出

ink-soul 2024-03-29 15:45:45 +08:00
parent 4d4c55f0ac
commit 6244917553
3 changed files with 3 additions and 21 deletions

View File

@ -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; // 截屏(暂时弃用)

Binary file not shown.

View File

@ -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<int>(subResourceLayout.rowPitch));
// 暂时不改此处需要将BGR通道改成RGB格式
stbi_write_png(filePath.c_str(), width, height, 4, data, static_cast<int>(subResourceLayout.rowPitch));
}
else
{