diff --git a/scripts/render-check.mjs b/scripts/render-check.mjs index 2b99a8f..1067f36 100644 --- a/scripts/render-check.mjs +++ b/scripts/render-check.mjs @@ -217,6 +217,14 @@ try { renderer.render(defaultEdits(), { width: w, height: h, clipping: 'shadows' }); 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({ clipPixels, clipRed: near(clipPixels[0], RED_MARK), @@ -233,6 +241,8 @@ try { shadowRed: near(shadowPixels[1], RED_MARK), shadowYellow: near(shadowPixels[2], YELLOW_MARK), shadowCyan: near(shadowPixels[3], [26, 217, 255]), + shadowFollowsExposure: near(shadowDarkPixel, [255, 255, 255]), + shadowDarkPixel, flagHonouredForBitmap: !same(proxyTop, proxyNoFlipTop), proxyTop: +proxyTop.toFixed(4), sidecarTop: +sideTop.toFixed(4), @@ -384,7 +394,8 @@ async function main() { `render check: shadow overlay clear=${JSON.stringify(result.shadowPixels[0])}` + ` red=${JSON.stringify(result.shadowPixels[1])}` + ` 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) { console.error( @@ -409,6 +420,13 @@ async function main() { ); 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) { console.error( 'render check FAILED: the clipping overlay does not follow Exposure; ' + diff --git a/src/components/Develop.tsx b/src/components/Develop.tsx index 222fa1f..de14d8b 100644 --- a/src/components/Develop.tsx +++ b/src/components/Develop.tsx @@ -2381,13 +2381,29 @@ export default function Develop({ )} - {clipPreview && ( + {(clipPreview || clipping === 'shadows') && (
- red - green - blue - two channels - all three + {clipPreview ? ( + <> + red + green + blue + two channels + all three + + ) : ( + <> + + + + one channel + + + + two channels + all three + + )}
)} {loupe && !adjustOpen && ( diff --git a/src/styles.css b/src/styles.css index 7817901..fbdad37 100644 --- a/src/styles.css +++ b/src/styles.css @@ -3435,10 +3435,21 @@ figcaption { .clip-dot.y { background: #ffe61a; } +.clip-dot.m { + background: #ff26d9; +} +.clip-dot.c { + background: #1ad9ff; +} .clip-dot.w { 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) { .admin-create-grid { grid-template-columns: 1fr 1fr;