Name the channels in the shadow clipping warning too.
Shadow warnings were a flat blue, so a single crushed channel looked the same as all three. The shadow branch now uses the highlight palette: red/green/blue for one channel, yellow (red+green), magenta (red+blue) and cyan (green+blue) for pairs, white for all three. The render check covers both ends of the range, and `npm run predeploy` chains typecheck, tests, the render check and the build so a shader regression cannot reach a deploy. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
+18
-3
@@ -855,9 +855,24 @@ void main(){
|
||||
// the finished frame rather than the source, so holding Ctrl while moving
|
||||
// Exposure or Recovery shows the warnings appear and clear as you go.
|
||||
if (u_clip > 1.5) {
|
||||
// Shadow clipping: everything that has fallen to the bottom of the range.
|
||||
if (max(finalCol.r, max(finalCol.g, finalCol.b)) < 0.02) {
|
||||
finalCol = vec3(0.15, 0.4, 1.0);
|
||||
// Shadow clipping: which channels have fallen to the bottom of the range.
|
||||
// The palette mirrors the highlight one, so red/green/blue mean one channel
|
||||
// and the secondary colours name the pair that ran out of shadow detail:
|
||||
// yellow red+green, magenta red+blue, cyan green+blue.
|
||||
vec3 k = 1.0 - step(vec3(0.021), finalCol);
|
||||
float n = k.r + k.g + k.b;
|
||||
if (n > 0.5) {
|
||||
vec3 mark = vec3(1.0);
|
||||
if (n < 2.5) {
|
||||
if (n > 1.5) {
|
||||
if (k.r > 0.5 && k.g > 0.5) mark = vec3(1.0, 0.9, 0.1);
|
||||
else if (k.r > 0.5) mark = vec3(1.0, 0.15, 0.85);
|
||||
else mark = vec3(0.1, 0.85, 1.0);
|
||||
} else if (k.r > 0.5) mark = vec3(1.0, 0.12, 0.12);
|
||||
else if (k.g > 0.5) mark = vec3(0.1, 1.0, 0.2);
|
||||
else mark = vec3(0.15, 0.4, 1.0);
|
||||
}
|
||||
finalCol = mark;
|
||||
}
|
||||
} else if (u_clip > 0.5) {
|
||||
vec3 k = step(0.985, finalCol);
|
||||
|
||||
Reference in New Issue
Block a user