|
Toast Engine
|
Decoding for high-dynamic-range images, used for imported environment maps. More...
#include <cstdint>#include <span>#include <string_view>#include <vector>

Go to the source code of this file.
Classes | |
| struct | assets::HdrImage |
| A decoded floating-point image, always four channels. More... | |
Functions | |
| auto | assets::decodeHdr (std::span< const uint8_t > bytes) -> HdrImage |
| Decodes a Radiance .hdr image held in memory. | |
Decoding for high-dynamic-range images, used for imported environment maps.
|
nodiscard |
Decodes a Radiance .hdr image held in memory.
Radiance is the format essentially every free environment library ships, and it decodes to linear radiance directly - no transfer function to undo and no exposure baked in, which is exactly what an environment map has to be. It is read here rather than converted to KTX2 at import: toktx only ingests PNG, so a KTX2 route would need the library driven directly, and a format this simple does not earn that
| bytes | Whole file contents |
bytes is not a readable HDR