Keep the highlight slider off the greys, and start each mode clean
The highlight knee opened at 0.45, so dropping HIGHLIGHT pulled a mid-grey down with the true highlights. It now opens at 0.65 (and the coefficient drops 0.32 -> 0.22 to stay monotonic), so the slider leaves everything up to a light grey untouched and still rolls the bright end off. Shadow is untouched — its 0.00..0.55 knee was already right. Switching between the library and the camera now drops the edits back to the recipe's own values, no frame and no custom mark. A frame was picked for the still it sat on and the mark was placed against that very photo, so neither may follow the user across the switch (or into a live capture), exactly like the sliders that were tuned on the photo in front of them.
This commit is contained in:
@@ -9,14 +9,15 @@ import { ColorAdjustments } from '../types';
|
||||
// turned saturated blues black under -SH and bright colours grey under -HL.
|
||||
//
|
||||
// Wide, soft knees so the knobs reach like a tone curve instead of biting only
|
||||
// at the very ends: HL rides the upper half (0.45..1.00), SH the lower half
|
||||
// (0.00..0.55), and the 0.50 midpoint moves less than 3%. Earlier narrow
|
||||
// at the very ends: HL rides only the top (0.65..1.00) so it leaves the greys
|
||||
// and midtones alone (a 0.45 knee dragged a mid-grey down) while SH rides the
|
||||
// lower half (0.00..0.55), and the 0.50 midpoint never moves. Earlier narrow
|
||||
// knees (0.80..1.00 / 0.00..0.30) made both sliders look dead on any photo
|
||||
// without true whites or blacks.
|
||||
//
|
||||
// Both knobs are pure additive shifts of the luma. That keeps the curve
|
||||
// monotonic (steepest knee slope 2.73/unit * 0.32 = 0.87, +SH overlap still
|
||||
// positive), so a brighter input can never come out darker. The earlier
|
||||
// monotonic (steepest knee slope 4.29/unit * 0.22 = 0.94, and the two knees
|
||||
// never overlap), so a brighter input can never come out darker. The earlier
|
||||
// multiplicative form was NOT monotonic: with hl=-1 a grey 0.73 came out
|
||||
// darker than 0.80.
|
||||
//
|
||||
@@ -38,10 +39,10 @@ vec4 main(vec2 xy) {
|
||||
vec4 c = src.eval(xy);
|
||||
vec3 rgb = clamp(c.rgb, 0.0, 1.0);
|
||||
float t = clamp(dot(rgb, vec3(0.2126, 0.7152, 0.0722)), 0.0, 1.0);
|
||||
float hlMask = smoothstep(0.45, 1.00, t);
|
||||
float hlMask = smoothstep(0.65, 1.00, t);
|
||||
float shMask = 1.0 - smoothstep(0.00, 0.55, t);
|
||||
// NOTE: never name a local 'out' — it is a reserved SkSL qualifier.
|
||||
float o = t + hl * 0.32 * hlMask + sh * 0.34 * shMask;
|
||||
float o = t + hl * 0.22 * hlMask + sh * 0.34 * shMask;
|
||||
// Dynamic range: gentle shadow lift + highlight roll (protect brights).
|
||||
o += dr * 0.12 * shMask * (1.0 - t);
|
||||
o -= dr * 0.18 * hlMask * t;
|
||||
|
||||
Reference in New Issue
Block a user