Plush

Blackbody#

PlushEngine · Type index

Namespace: PlushEngine.Effects (using PlushEngine.Effects;)

The color of a hot body by temperature: Planck's law integrated against the CIE 1931 color matching functions (Wyman, Sloan and Shirley's 2013 analytic fit, 380–780 nm), converted to linear Rec.709/sRGB and normalized to luminance 1. A hotter body reads white-yellow, a cooling one orange then deep red, and above ~7000 K bluish white. Brightness is a separate choice of the look (the built-in Streaks shader scales with T⁴). The renderer samples Table as a small engine texture; this is the reference it is built from.

public static class Blackbody

Members: Color · MinKelvin · Table · TableSize

Color#

public static Vector3 Color(float kelvin);

MinKelvin#

public const float MinKelvin = 300, MaxKelvin = 15000;

Table#

public static float[] Table();

TableSize RGBA texels from MinKelvin to MaxKelvin, spaced evenly in log temperature (Shaders/Models/Streaks.slang reads it the same way).

TableSize#

public const int TableSize = 256;

Source#