The sensor corrections, as shader source shared by every demosaicer. More...
Detailed Description
The sensor corrections, as shader source shared by every demosaicer.
One copy of the maths, because two demosaicers exist for the same frames – a sampler2D one for host-staged uploads and a samplerExternalOES one for Tegra's imported dma-bufs – and a correction that differed between them would show up as the picture changing when the capture rung changed, which reads as a capture bug rather than a shader one.
Order matters and is not arbitrary:
- subtract the black level, then renormalise, so the range that survives still spans 0..1 rather than being compressed toward black;
- white balance, which is only meaningful once the pedestal is gone – applying gain to an offset scales the offset too;
- exposure, a plain linear multiplier;
- saturation, in linear light where a luma-weighted mix is meaningful;
- the transfer curve, last, because everything above assumes linear samples and a curve applied earlier would bend all of it.
Go to the source code of this file.
Namespaces | |
| namespace | score |
| Base toolkit upon which the software is built. | |
| namespace | score::gfx |
| Graphics rendering pipeline for ossia score. | |
Macros | |
| #define | SCORE_GFX_CAPTURE_UNIFORMS |
| #define | SCORE_GFX_CAPTURE_ADJUST_FN |
Macro Definition Documentation
◆ SCORE_GFX_CAPTURE_ADJUST_FN
| #define SCORE_GFX_CAPTURE_ADJUST_FN |
adjustCapture(vec3) – applies the corrections to linear demosaiced RGB.
Every step is the identity at its default, so a pipeline that sets nothing passes the colour through unchanged.
◆ SCORE_GFX_CAPTURE_UNIFORMS
| #define SCORE_GFX_CAPTURE_UNIFORMS |
The material block for the capture path: the shared geometry fields, plus the corrections. Matches CaptureMaterialUBO field for field.