Documentation
¶
Overview ¶
Package hdr decodes Radiance RGBE panoramas without reducing their dynamic range. It is separate from the ordinary, eight-bit scene image decoders.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BakeEnvironment ¶
BakeEnvironment decodes a 2:1 HDR panorama and bakes an RGBE environment atlas. Each texel retains its own exponent, so bright lights do not reduce the precision of dim sky and IBL colors elsewhere in the panorama. Decoding and convolution run once at asset loading, never during sampling.
func ImportEnvironment ¶
func ImportEnvironment(data []byte, width, samples int) (graphics.EnvironmentImages, error)
ImportEnvironment retains the original background and filters lighting.
Types ¶
type Panorama ¶
type Panorama struct {
// contains filtered or unexported fields
}
Panorama owns top-left, row-major RGBE pixels (four bytes per pixel). Sampling returns linear RGB; stored exposure/color corrections are already applied to the pixels and are not applied again. RGB primaries are preserved.
func Decode ¶
Decode accepts flat RGBE and component-RLE scanlines in all eight Radiance orientations. XYZE and obsolete pixel-run encoding are not supported. Image storage is bounded to 64 million pixels; the input is not retained.