fix(raw): refine RAW highlight clipping threshold to preserve sunset sun color without white dome clipping

This commit is contained in:
2026-10-02 18:15:21 +07:00
parent 555623bdb1
commit b39d9559bb
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
// hashed bundle with it, which the STATIC rule below then served cache-first
// forever. Every navigation here now goes past the browser's own cache, so the
// build a visitor gets is the one the server has.
const VERSION = 'recipescam-v8';
const VERSION = 'recipescam-v9';
// nginx answers all three with the same index.html (SPA fallback), so they are one
// document under three keys: an offline navigation finds it whichever key it asks.
@@ -38,7 +38,7 @@ assert.match(code, /float3 lin = n \* mul\.rgb;/);
// with both, mean |dL| 21.5 against 11.1.
assert.match(
code,
/float hi = max\(max\(n\.r, n\.g\), n\.b\);\s*hi = max\(hi, max\(max\(lin\.r, lin\.g\), lin\.b\)\);\s*rgb = mix\(rgb, float3\(mx\), smoothstep\(0\.95, 1\.0, hi\)\);/
/float hi = max\(max\(n\.r, n\.g\), n\.b\);\s*hi = max\(hi, max\(max\(lin\.r, lin\.g\), lin\.b\)\);\s*rgb = mix\(rgb, float3\(mx\), smoothstep\(0\.99, 1\.02, hi\)\);/
);
// The inverse is built on the CPU side and has to be the first uniform of the
+1 -1
View File
@@ -145,7 +145,7 @@ half4 main(float2 pos) {
// The matrix was fitted luma-preserving, so mx is the value to hold.
float hi = max(max(n.r, n.g), n.b);
hi = max(hi, max(max(lin.r, lin.g), lin.b));
rgb = mix(rgb, float3(mx), smoothstep(0.95, 1.0, hi));
rgb = mix(rgb, float3(mx), smoothstep(0.99, 1.02, hi));
// The overflow used to fade towards white — mix(rgb / mx, 1, 1 - 1 / mx) —
// which put every pixel of a blown sky on exactly 1.0 and threw the two stops
// the sensor held above white away with it: LIGHT's HIGHLIGHT row then had a