Loading...
Searching...
No Matches
score::gfx::CaptureAdjust Struct Reference

Sensor-side corrections, in the order the shader applies them. More...

Detailed Description

Sensor-side corrections, in the order the shader applies them.

Public Attributes

float blackLevel [3] {0.f, 0.f, 0.f}
 
float whiteBalance [3] {1.f, 1.f, 1.f}
 
float exposure {1.f}
 Linear multiplier, after white balance.
 
float gamma {1.f}
 
float saturation {1.f}
 0 collapses to luma, 1 leaves it alone.
 
ScaleMode scaleMode {ScaleMode::Stretch}
 

Friends

bool operator== (const CaptureAdjust &, const CaptureAdjust &) noexcept=default
 

Member Data Documentation

◆ blackLevel

float score::gfx::CaptureAdjust::blackLevel[3] {0.f, 0.f, 0.f}

Subtracted before anything else, normalised to the sample range. A sensor with a pedestal reads this much with the lens capped, and leaving it in washes the blacks and skews every gain applied after it.

◆ gamma

float score::gfx::CaptureAdjust::gamma {1.f}

Encoding exponent: the shader raises to 1/gamma. 1 leaves the signal linear; 2.2 approximates sRGB.

◆ scaleMode

ScaleMode score::gfx::CaptureAdjust::scaleMode {ScaleMode::Stretch}

How the frame is fitted to the viewport it is drawn into.

Stretch, not Original, because Stretch is what a scale of (1,1) means. Original scales the quad by texture/viewport, so defaulting to it would zoom and crop every capture already in use.

◆ whiteBalance

float score::gfx::CaptureAdjust::whiteBalance[3] {1.f, 1.f, 1.f}

Per-channel gain. Bayer has twice as many green sites as red or blue, so an uncorrected frame reads green; this is what makes grey grey.


The documentation for this struct was generated from the following file: