mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 08:26:50 +00:00
Don't discard alpha in PNG/TGA formats. Refs #1479
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user