0

I am looking for a way to convert Texture2D directly to EXR format in byte array. I've done few research and this seems to be complicated than I thought.

Not really looking for a code since I don't have one. Just a suggestion on how to do this.

4

1 回答 1

0

Unity 5.6 刚刚发布,令人惊讶的是,它具有执行 Texture2D 到 EXR 转换的 API。

将 Texture2D 转换为 EXR (HDR)

byte []exrBytes  = texture.EncodeToEXR();

将 Texture2D 转换为压缩后的 EXR (HDR)

byte[] exrBytes = texture.EncodeToEXR(Texture2D.EXRFlags.CompressZIP);  

更多 EXR 编码标志可以在这里找到。

于 2016-12-14T13:40:46.113 回答