Show the shadow palette in the clipping legend and pin both overlay checks.
The shadow warning gained per-channel colours but the legend only explained the highlight palette, so the new marks had no key. The legend now switches to the shadow palette whenever shadow clipping is on, listing one channel, the three two-channel colours and all three. The render check also fails if the shadow overlay stops following Exposure, the way the highlight side already did. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
@@ -217,6 +217,14 @@ try {
|
|||||||
renderer.render(defaultEdits(), { width: w, height: h, clipping: 'shadows' });
|
renderer.render(defaultEdits(), { width: w, height: h, clipping: 'shadows' });
|
||||||
const shadowPixels = [2, 3, 4, 5].map(sampleBand);
|
const shadowPixels = [2, 3, 4, 5].map(sampleBand);
|
||||||
|
|
||||||
|
// And it has to move with the sliders, not just exist: -9 EV drives every
|
||||||
|
// channel of the clean band to black, so that band must turn white in shadow
|
||||||
|
// mode, just as it turns white at +6 EV in highlight mode.
|
||||||
|
const shadowEdits = defaultEdits();
|
||||||
|
shadowEdits.exposure = -9;
|
||||||
|
renderer.render(shadowEdits, { width: w, height: h, clipping: 'shadows' });
|
||||||
|
const shadowDarkPixel = sampleBand(2);
|
||||||
|
|
||||||
pre.textContent = 'RESULT ' + JSON.stringify({
|
pre.textContent = 'RESULT ' + JSON.stringify({
|
||||||
clipPixels,
|
clipPixels,
|
||||||
clipRed: near(clipPixels[0], RED_MARK),
|
clipRed: near(clipPixels[0], RED_MARK),
|
||||||
@@ -233,6 +241,8 @@ try {
|
|||||||
shadowRed: near(shadowPixels[1], RED_MARK),
|
shadowRed: near(shadowPixels[1], RED_MARK),
|
||||||
shadowYellow: near(shadowPixels[2], YELLOW_MARK),
|
shadowYellow: near(shadowPixels[2], YELLOW_MARK),
|
||||||
shadowCyan: near(shadowPixels[3], [26, 217, 255]),
|
shadowCyan: near(shadowPixels[3], [26, 217, 255]),
|
||||||
|
shadowFollowsExposure: near(shadowDarkPixel, [255, 255, 255]),
|
||||||
|
shadowDarkPixel,
|
||||||
flagHonouredForBitmap: !same(proxyTop, proxyNoFlipTop),
|
flagHonouredForBitmap: !same(proxyTop, proxyNoFlipTop),
|
||||||
proxyTop: +proxyTop.toFixed(4),
|
proxyTop: +proxyTop.toFixed(4),
|
||||||
sidecarTop: +sideTop.toFixed(4),
|
sidecarTop: +sideTop.toFixed(4),
|
||||||
@@ -384,7 +394,8 @@ async function main() {
|
|||||||
`render check: shadow overlay clear=${JSON.stringify(result.shadowPixels[0])}` +
|
`render check: shadow overlay clear=${JSON.stringify(result.shadowPixels[0])}` +
|
||||||
` red=${JSON.stringify(result.shadowPixels[1])}` +
|
` red=${JSON.stringify(result.shadowPixels[1])}` +
|
||||||
` yellow=${JSON.stringify(result.shadowPixels[2])}` +
|
` yellow=${JSON.stringify(result.shadowPixels[2])}` +
|
||||||
` cyan=${JSON.stringify(result.shadowPixels[3])}`,
|
` cyan=${JSON.stringify(result.shadowPixels[3])}` +
|
||||||
|
` | at -9EV the clean band is ${JSON.stringify(result.shadowDarkPixel)}`,
|
||||||
);
|
);
|
||||||
if (!result.matchTop || !result.matchBottom) {
|
if (!result.matchTop || !result.matchBottom) {
|
||||||
console.error(
|
console.error(
|
||||||
@@ -409,6 +420,13 @@ async function main() {
|
|||||||
);
|
);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if (!result.shadowFollowsExposure) {
|
||||||
|
console.error(
|
||||||
|
'render check FAILED: the shadow clipping overlay does not follow Exposure; ' +
|
||||||
|
`at -9EV the clean band stayed ${JSON.stringify(result.shadowDarkPixel)}.`,
|
||||||
|
);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
if (!result.clipFollowsExposure) {
|
if (!result.clipFollowsExposure) {
|
||||||
console.error(
|
console.error(
|
||||||
'render check FAILED: the clipping overlay does not follow Exposure; ' +
|
'render check FAILED: the clipping overlay does not follow Exposure; ' +
|
||||||
|
|||||||
@@ -2381,13 +2381,29 @@ export default function Develop({
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{clipPreview && (
|
{(clipPreview || clipping === 'shadows') && (
|
||||||
<div className="clip-legend">
|
<div className="clip-legend">
|
||||||
<span className="clip-dot r" /> red
|
{clipPreview ? (
|
||||||
<span className="clip-dot g" /> green
|
<>
|
||||||
<span className="clip-dot b" /> blue
|
<span className="clip-dot r" /> red
|
||||||
<span className="clip-dot y" /> two channels
|
<span className="clip-dot g" /> green
|
||||||
<span className="clip-dot w" /> all three
|
<span className="clip-dot b" /> blue
|
||||||
|
<span className="clip-dot y" /> two channels
|
||||||
|
<span className="clip-dot w" /> all three
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<span className="clip-dot r" />
|
||||||
|
<span className="clip-dot g" />
|
||||||
|
<span className="clip-dot b" />
|
||||||
|
<span className="clip-label">one channel</span>
|
||||||
|
<span className="clip-dot y" />
|
||||||
|
<span className="clip-dot m" />
|
||||||
|
<span className="clip-dot c" />
|
||||||
|
<span className="clip-label">two channels</span>
|
||||||
|
<span className="clip-dot w" /> all three
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{loupe && !adjustOpen && (
|
{loupe && !adjustOpen && (
|
||||||
|
|||||||
@@ -3435,10 +3435,21 @@ figcaption {
|
|||||||
.clip-dot.y {
|
.clip-dot.y {
|
||||||
background: #ffe61a;
|
background: #ffe61a;
|
||||||
}
|
}
|
||||||
|
.clip-dot.m {
|
||||||
|
background: #ff26d9;
|
||||||
|
}
|
||||||
|
.clip-dot.c {
|
||||||
|
background: #1ad9ff;
|
||||||
|
}
|
||||||
.clip-dot.w {
|
.clip-dot.w {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Groups the shadow palette dots so "one channel" reads with its own colours. */
|
||||||
|
.clip-legend .clip-label {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 760px) {
|
@media (max-width: 760px) {
|
||||||
.admin-create-grid {
|
.admin-create-grid {
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
|
|||||||
Reference in New Issue
Block a user