pub trait DisplayTransform:
Send
+ Sync
+ Debug {
// Required method
fn stage(&self, target: &DisplayTarget) -> Stage;
// Provided methods
fn apply(&self, target: &DisplayTarget, scene: &[f32], out: &mut [Color32]) { ... }
fn apply_f32(&self, target: &DisplayTarget, scene: &[f32], out: &mut [f32]) { ... }
fn revision(&self) -> u64 { ... }
}Expand description
The application’s colour management at the end of the viewport.
Required Methods§
Sourcefn stage(&self, target: &DisplayTarget) -> Stage
fn stage(&self, target: &DisplayTarget) -> Stage
The stage for a target (the GPU path runs it in its shader).
Provided Methods§
Sourcefn apply(&self, target: &DisplayTarget, scene: &[f32], out: &mut [Color32])
fn apply(&self, target: &DisplayTarget, scene: &[f32], out: &mut [Color32])
Scene pixels (RGBA floats) to display colours, on the CPU. By default the stage’s arithmetic; override for a LUT or anything the stage cannot express (then deliver display pixels from the source, as the GPU path only runs stages).
Sourcefn apply_f32(&self, target: &DisplayTarget, scene: &[f32], out: &mut [f32])
fn apply_f32(&self, target: &DisplayTarget, scene: &[f32], out: &mut [f32])
Scene pixels (RGBA floats) to encoded floats for a target, on the CPU (an export, a surface of the application’s own): the stage’s arithmetic, alpha kept.