pub struct DistanceAttenuation { /* private fields */ }Expand description
Lookup-table (plus some additional information) to handle distance attenuation of a light source.
Implementations§
Source§impl DistanceAttenuation
impl DistanceAttenuation
Sourcepub fn new(range: Range<f32>, f: impl FnMut(f32) -> f32) -> Self
pub fn new(range: Range<f32>, f: impl FnMut(f32) -> f32) -> Self
Creates a new distance attenuation table relative to a range of the clip space and a function based on the distance.
§Notes
The function takes only positive values as input.
Refer to Lut::from_fn for more information.