pub struct ScalarModel {
pub curve: [[f64; 4]; 3],
pub paper: [f64; 4],
pub toe_transition: [f64; 4],
pub shoulder_transition: [f64; 4],
pub base_density: [f64; 3],
pub print_shift: [f64; 3],
pub exposure_shift: f64,
pub reversal: bool,
}Expand description
The scalar model, flattened into the numbers another backend needs.
A GPU cannot call into this crate, and re-deriving the model from its parameters on the other side would be a second implementation that could drift. So the prepared render hands over the numbers it solved, in the shape a shader wants: per layer, a base density, a span, a slope and an inflection point; then the paper’s two numbers and the enlarger’s four.
Only the pure scalar path has one. The spectral exposure, the spectral print and the spectral scan integrate over wavelength, and a backend that wants them has to port the integration rather than the numbers.
Fields§
§curve: [[f64; 4]; 3]Per layer: d_min, d_max, gamma, log_e0.
paper: [f64; 4]The paper’s d_min, d_max, gamma and log_e0.
toe_transition: [f64; 4]How sharply each curve’s toe turns: the three layers, then the paper.
It rides on the curve rather than on the model because it is a property
of the material — see crate::curve.
shoulder_transition: [f64; 4]How sharply each curve’s shoulder turns: the three layers, then the
paper. Equal to toe_transition for every material whose two corners
were measured as one.
base_density: [f64; 3]The film’s minimum density in status terms: base, fog and mask.
print_shift: [f64; 3]The enlarger’s exposure shift per layer, in decades.
exposure_shift: f64Exposure offset applied before the curve, in decades.
reversal: boolWhether the film is its own picture. A reversal keeps its density and stops: there is no paper between the development and the eye.
Trait Implementations§
Source§impl Clone for ScalarModel
impl Clone for ScalarModel
impl Copy for ScalarModel
Source§impl Debug for ScalarModel
impl Debug for ScalarModel
Source§impl PartialEq for ScalarModel
impl PartialEq for ScalarModel
impl StructuralPartialEq for ScalarModel
Auto Trait Implementations§
impl Forget for ScalarModel
impl Freeze for ScalarModel
impl Move for ScalarModel
impl RefUnwindSafe for ScalarModel
impl Send for ScalarModel
impl Sync for ScalarModel
impl Unpin for ScalarModel
impl UnsafeUnpin for ScalarModel
impl UnwindSafe for ScalarModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more