#texture #hdr #graphics #gamedev #texture-format

bin+lib rgbe

A library for loading and handling RGBE-format HDR textures

1 unstable release

0.0.1 Feb 28, 2024

#11 in #texture-format

44 downloads per month

MIT/Apache

16KB
194 lines

rgbe: A library for handling RGBE-format HDR images

This crate contains types which correspond to the RGBE8 and RGB9E5 common-exponent unsigned float formats used to represent high dynamic range images. RGBE8 images can be loaded from Radiance HDR files and can also be loaded from and saved to PNG files which save the exponent in the alpha channel (compatible with hdrpng.js) for significantly smaller file sizes. RGBE8 images (as well as floating point images) can also be converted to RGB9E5 for use as GPU textures.

As well as the library, this package also contasins a command-line tool hdr2rgbe-png to compress Radiance HDR images into RGBE8 PNG, which results in much smaller file sizes.


lib.rs:

A library for loading and handling RGBE-format HDR textures.

Provides types for handling common-exponent floating point texture formats as well as conversions between them and independent floating-point channels. Supports the [RGBE8] format which is storable in Radiance HDR and PNG files, as well as the [RGB9E5] GPU texture format.

An intended use case for this library is to store HDR textures as RGBE8 PNG files and convert them to RGB9E5 for the GPU when loading.

Radiance HDR images can be converted to RGBE8 PNG files on the command line using the included hdr2rgbe-png tool.

Dependencies

~14MB
~83K SLoC