API Reference · Lights

EnvironmentImage

Namespace: Ava3D

public sealed class EnvironmentImage

Immutable linear RGB radiance in an equirectangular image. Values above one are retained. Longitude wraps; row zero faces up. Replace the image to update an environment or room probe.

Properties

MemberDescription
int Height { get; }

Image height in texels.

string Name { get; }

Optional label for diagnostics.

int Width { get; }

Image width in texels.

Methods

MemberDescription
static EnvironmentImage FromLinearPixels(ReadOnlySpan<Vector3> pixels, int width, int height, string name = null)

Copies row-major, top-left-origin linear RGB pixels. Components must be finite and nonnegative; radiance is limited to 65504, the floating-point GPU texture range. At most 32 million pixels; invalid dimensions or pixels throw ArgumentException.

static EnvironmentImage FromRadiance(byte[] encoded, string name = null)

Reads Radiance RGBE (.hdr) bytes, including modern scanline RLE and flat RGBE. Supports the standard -Y +X orientation; other orientations, XYZE and legacy pixel-run encoding produce an actionable exception. File exposure metadata is not applied; use EnvironmentLight.Intensity.

See also