/// The curve a frame is drawn to the screen through.
///
/// Set with [`Config::with_tonemap`](crate::Config::with_tonemap); a curve is
/// a look, so it belongs to the whole run.
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum Tonemap {
/// Keeps colors where they are, and folds only the brightest light back
/// into range.
#[default]
Neutral,
/// The filmic curve: more contrast, and the brightest colors fade
/// towards white.
Aces,
/// No curve: light past the screen's range is clamped to it.
Off,
}
impl Tonemap {
/// This curve's index among the shader's curves.
pub(crate) fn index(self) -> u32 {
match self {
Self::Neutral => 0,
Self::Aces => 1,
Self::Off => 2,
}
}
}