Export 32bit floating point textures to 32bit floating point EXR files

This commit is contained in:
Reiner Dolp
2019-12-08 15:11:10 +01:00
committed by Baldur Karlsson
parent 723c293414
commit d3c4b97e2f
+8
View File
@@ -1506,6 +1506,14 @@ bool ReplayController::SaveTexture(const TextureSave &saveData, const char *path
int reqTypes[4] = {TINYEXR_PIXELTYPE_HALF, TINYEXR_PIXELTYPE_HALF, TINYEXR_PIXELTYPE_HALF,
TINYEXR_PIXELTYPE_HALF};
if(saveFmt.compByteWidth == 4)
{
for(size_t channel = 0; channel < 4; channel++)
{
reqTypes[channel] = TINYEXR_PIXELTYPE_FLOAT;
}
}
// must be in this order as many viewers don't pay attention to channels and just assume
// they are in this order
EXRChannelInfo bgraChannels[4] = {