FX vignetting, LIGHT vibrance/saturation, reticle unlock
- FX: new VIGNETTING 0-10 control (chip + slider). Darkens the four corners of the photo with a radial gradient whose radius is the photo diagonal/2, so the falloff stays circular on any aspect. Applied in preview (camera overlay, polaroid/wall window, plain library) and in exportEngine pass 6b, always on the picture, never on the mat. - LIGHT: new VIBRANCE -10..+10 (chroma-masked saturation in the tone shader: vivid pixels move least). Renamed the existing saturation control chip from COLOR to SATURATION - same param, clearer label. - Fix: <Shader> takes a RuntimeEffect, not a gradient SkShader; the preview vignette threw "Object is not a HostObject" when it got one. Use the declarative <RadialGradient> child on the Rect instead. - Preview: drop the "AE/AF LOCKED - TAP TO UNLOCK" banner; the lock reticle is now itself the unlock touch target.
This commit is contained in:
@@ -208,7 +208,7 @@ export async function processAndExportPhoto(
|
||||
FilterMode.Linear,
|
||||
MipmapMode.None
|
||||
);
|
||||
toneShader = toneEffect.makeShaderWithChildren([tone.dr, tone.hl, tone.sh], [imageShader]);
|
||||
toneShader = toneEffect.makeShaderWithChildren([tone.dr, tone.hl, tone.sh, tone.vib], [imageShader]);
|
||||
if (toneShader) {
|
||||
paint.setShader(toneShader);
|
||||
} else {
|
||||
@@ -371,6 +371,30 @@ export async function processAndExportPhoto(
|
||||
}
|
||||
}
|
||||
|
||||
// 6b. Vignetting: darken the four corners of the PHOTO. Radial gradient
|
||||
// (clear through the mid-frame, black at the corners) whose radius is the
|
||||
// photo diagonal/2, so the falloff stays circular on any aspect. Runs
|
||||
// before the frame step, so on a polaroid/wall export the darkening lands
|
||||
// on the picture inside the opening, never on the mat.
|
||||
// ponytail: one amount knob (the Fuji-style VIGNETTING control); split into
|
||||
// amount + radius/midpoint only if users ask to move the falloff.
|
||||
if ((adjustments.vignette ?? 0) > 0) {
|
||||
const v = Math.min(10, adjustments.vignette ?? 0) / 10;
|
||||
const vignetteShader = Skia.Shader.MakeRadialGradient(
|
||||
Skia.Point(width / 2, height / 2),
|
||||
Math.hypot(width, height) / 2,
|
||||
[Skia.Color('rgba(0,0,0,0)'), Skia.Color('rgba(0,0,0,0)'), Skia.Color('rgba(0,0,0,1)')],
|
||||
[0, 0.45, 1],
|
||||
TileMode.Clamp
|
||||
);
|
||||
if (vignetteShader) {
|
||||
const vignettePaint = Skia.Paint();
|
||||
vignettePaint.setShader(vignetteShader);
|
||||
vignettePaint.setAlphaf(0.9 * v);
|
||||
canvas.drawRect(Skia.XYWHRect(0, 0, width, height), vignettePaint);
|
||||
}
|
||||
}
|
||||
|
||||
// 7. Frame. RETRO POLAROID is not a border drawn on the photo: the whole
|
||||
// processed picture is composited, uncropped, into the window of a bigger
|
||||
// off-white card (real print proportions, see frameUtils) — the export IS
|
||||
|
||||
Reference in New Issue
Block a user