ImageData and Images now support the rg11b10f format.

This commit is contained in:
Alex Szpakowski
2019-09-21 14:46:45 -03:00
parent b5da34ffb1
commit c4fac73dc4
10 changed files with 295 additions and 133 deletions
+3 -3
View File
@@ -20,7 +20,7 @@
// LOVE
#include "EXRHandler.h"
#include "common/halffloat.h"
#include "common/floattypes.h"
#include "common/Exception.h"
// zlib (for tinyexr)
@@ -157,12 +157,12 @@ FormatHandler::DecodedImage EXRHandler::decode(Data *data)
{
img.format = PIXELFORMAT_RGBA16F;
half *rgba[4] = {nullptr};
float16 *rgba[4] = {nullptr};
getEXRChannels(exrHeader, exrImage, rgba);
try
{
img.data = (unsigned char *) loadEXRChannels(img.width, img.height, rgba, floatToHalf(1.0f));
img.data = (unsigned char *) loadEXRChannels(img.width, img.height, rgba, float32to16(1.0f));
}
catch (love::Exception &)
{