Add night adaptation control to ColorGrading (#4559)
In low-light conditions, peak luminance sensitivity of the eye shifts toward the blue end of the visible spectrum. This effect called the Purkinje effect occurs during the transition from photopic (cone-based) vision to scotopic (rod-based) vision. Because the rods and cones use the same neural pathways, a color shift is introduced as the rods take over to improve low-light perception. This function aims to (somewhat) replicate this color shift and peak luminance sensitivity increase to more faithfully reproduce scenes in low-light conditions as they would be perceived by a human observer (as opposed to an artificial observer such as a camera sensor). The night adaptation can be controlled using a 0..1 factor for artistic reasons: `ColorGrading::Builder::nightAdaptation()`.
This commit is contained in:
@@ -214,6 +214,7 @@ static void colorGradingUI(Settings& settings, float* rangePlot, float* curvePlo
|
||||
ImGui::Checkbox("Gamut mapping", &colorGrading.gamutMapping);
|
||||
|
||||
ImGui::SliderFloat("Exposure", &colorGrading.exposure, -10.0f, 10.0f);
|
||||
ImGui::SliderFloat("Night adaptation", &colorGrading.nightAdaptation, 0.0f, 1.0f);
|
||||
|
||||
if (ImGui::CollapsingHeader("White balance")) {
|
||||
int temperature = colorGrading.temperature * 100.0f;
|
||||
|
||||
Reference in New Issue
Block a user