Plush

EnvironmentMap#

PlushEngine · Type index

Namespace: PlushEngine

An equirectangular HDR environment decoded from a Radiance .hdr file: linear RGB as half floats (RGBA, row 0 = straight up), plus 9 spherical-harmonic coefficients of its diffuse irradiance (already convolved with the cosine lobe, so shading evaluates E(n) directly and uses albedo/π·E) and the GGX-prefiltered Specular chain. Imports derive both on load; exported packages preserve the prepared lighting so players do not repeat that work. Neither is authored. Directions are Y-up; longitude increases counter-clockwise seen from above, starting at +X.

public sealed class EnvironmentMap

Members: Direction · EnvironmentMap · Height · Id · Irradiance · Rgba · Source · Specular · Width

Direction#

public static Vector3 Direction(float u, float v);

Unit direction for an equirect texel center (u, v in 0..1; v = 0 is straight up).

EnvironmentMap#

public EnvironmentMap(string id, byte[] hdr);
public EnvironmentMap(string id, int width, int height, Half[] rgba);

A map from linear RGBA half floats already in memory (a reflection probe's capture); its Source is the same pixels as a flat .hdr, so it caches and packages like an imported one.

Height#

public int Height { get; }

Id#

public string Id { get; }

Irradiance#

public Vector3[] Irradiance { get; }

Rgba#

public Half[] Rgba { get; }

Source#

public byte[] Source { get; }

Specular#

public SpecularEnvironment Specular { get; }

Width#

public int Width { get; }

Source#