pub enum ExposureMeter {
CentreWeightedLog2 {
centre_weight: f32,
},
}Expand description
How a frame’s light is metered for AutoExposure.
Variants§
CentreWeightedLog2
The centre-weighted mean of log2 luminance. The frame is halved (each pixel of the half-size frame a bilinear
sample at its centre: the mean of four), then cut into a 64 x 64 grid of cells over the frame; each cell takes
16 bilinear samples of the half-size frame (ExposureMeter::SAMPLE_OFFSETS from its centre in the frame’s 0..1
coordinates, each held under 1 - half a texel, and to the frame’s edge), each sample’s luminance
(ExposureMeter::LUMINANCE, 0 where not finite) taken as log2(Y + 1e-5). A cell’s value is the mean of its 16;
the frame’s is the mean of its cells’ values weighted by ExposureMeter::weight at their centres.
Implementations§
Source§impl ExposureMeter
impl ExposureMeter
Sourcepub const SAMPLE_OFFSETS: [[f32; 2]; 16]
pub const SAMPLE_OFFSETS: [[f32; 2]; 16]
A cell’s 4 x 4 samples’ offsets from its centre, in the frame’s 0..1 coordinates, x fastest.
Sourcepub const LUMINANCE_FLOOR: f32 = 1e-5
pub const LUMINANCE_FLOOR: f32 = 1e-5
What is added to a sample’s luminance before its log is taken.