Don't discard alpha in PNG/TGA formats. Refs #1479

This commit is contained in:
baldurk
2019-08-01 17:03:43 +01:00
parent 78ae520e3a
commit 4b2d753521
-8
View File
@@ -1303,10 +1303,6 @@ bool ReplayController::SaveTexture(const TextureSave &saveData, const char *path
}
else if(sd.destType == FileType::PNG)
{
// discard alpha if requested
for(uint32_t p = 0; sd.alpha == AlphaMapping::Discard && p < td.width * td.height; p++)
subdata[0][p * 4 + 3] = 255;
int ret = stbi_write_png_to_func(fileWriteFunc, (void *)f, td.width, td.height, numComps,
subdata[0], rowPitch);
success = (ret != 0);
@@ -1316,10 +1312,6 @@ bool ReplayController::SaveTexture(const TextureSave &saveData, const char *path
}
else if(sd.destType == FileType::TGA)
{
// discard alpha if requested
for(uint32_t p = 0; sd.alpha == AlphaMapping::Discard && p < td.width * td.height; p++)
subdata[0][p * 4 + 3] = 255;
int ret = stbi_write_tga_to_func(fileWriteFunc, (void *)f, td.width, td.height, numComps,
subdata[0]);
success = (ret != 0);