floating point ImageData?
Posted: Thu Apr 30, 2015 4:12 am
It seems that Canvas:getImageData() always converts the pixels to UNSIGNED_BYTE, probably since ImageData wants it that way. Is there anyway I can get access to the floating point pixel data in my 'rgba32f' Canvas, from Lua? I know I can get there in a shader, but that also won't let me 'export' the data to Lua. Or is there another way? Also would like to get the f.p. Canvas contents into a .HDR or similar file format...but the raw floats would be okay. I guess I can write a version of Canvas::newImageData() in C++ that doesn't do the pixel format conversion, but I'm hoping to stay in Lua.