暂停PNG格式输出
parent
4d4c55f0ac
commit
6244917553
|
@ -119,7 +119,7 @@ public:
|
||||||
bool multiSampling = true; // 多重采样
|
bool multiSampling = true; // 多重采样
|
||||||
bool rotateModel = true; // 模型自旋转(暂时失效)
|
bool rotateModel = true; // 模型自旋转(暂时失效)
|
||||||
bool headless = false; // 无头开关
|
bool headless = false; // 无头开关
|
||||||
bool outputPNGimage = true; // 输出图片序列格式为PNG(四通道)
|
bool outputPNGimage = false; // 输出图片序列格式为PNG(四通道)
|
||||||
bool enableSaveToImageSequeue = false; // 图片序列开关(暂时弃用)
|
bool enableSaveToImageSequeue = false; // 图片序列开关(暂时弃用)
|
||||||
uint32_t outputFrameCount = 75; // 图片序列结束帧
|
uint32_t outputFrameCount = 75; // 图片序列结束帧
|
||||||
bool takeScreenShot = false; // 截屏(暂时弃用)
|
bool takeScreenShot = false; // 截屏(暂时弃用)
|
||||||
|
|
Binary file not shown.
|
@ -1770,26 +1770,8 @@ PlumageRender::PlumageRender()
|
||||||
{
|
{
|
||||||
if (colorSwizzle)
|
if (colorSwizzle)
|
||||||
{
|
{
|
||||||
uint8_t* pixels = new uint8_t[width * height * 4];
|
// 暂时不改,此处需要将BGR通道改成RGB格式
|
||||||
uint32_t index = 0;
|
stbi_write_png(filePath.c_str(), width, height, 4, data, static_cast<int>(subResourceLayout.rowPitch));
|
||||||
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));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue