Hi! If you're finding this for the first time, start here.
This is a quick little note exploring the current state of High-Dynamic Range (HDR) and Wide-Color Gamuts (WCG) in Bevy.
Display-Referred and Scene-Referred Colors
Display-referred colors are defined by a display standard (typically sRGB, BT.709, BT.2020, BT.2100 or Display P3). sRGB and BT.709 are SDR, Display P3 and BT.2020 are WCG, BT.2100 is HDR + WCG. All display-referred colors have bounds on chromaticity and intensity, and usually have coefficients between 0 and 1.
Scene-referred colors are defined by quantities of light. They typically use the primaries from a display standard and are expressed in luminous units, such as lux or candela per square meter. They have bounded chromaticity but unbounded luminosity (meaning the light can be arbitrarily intense intense), which translates to allowing their coefficients to go above 1.
WebGPU
WebGPU allows us to create canvases in either the sRGB or Display P3 color spaces. Additionally, when the attachment format is set to rgba16float, WebGPU converts the output color values to the color space of the actual screen and then clamps them to the [0, 1] interval in that color space.