Skip to content

Commit

Permalink
[Fix] Fix to occasional black pixels with bloom and sharpening (#7044)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Valigursky <[email protected]>
  • Loading branch information
mvaligursky and Martin Valigursky authored Oct 16, 2024
1 parent 4061758 commit 5681f1a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/extras/render-passes/render-pass-compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ const fragmentShader = /* glsl */ `
float w = sharpening_amount * sharpness;
vec3 res = (w * (a + b + d + e) + c) / (4.0 * w + 1.0);
// remove negative colors
res = max(res, 0.0);
// convert back to HDR
return toHDR(res);
}
Expand Down

0 comments on commit 5681f1a

Please sign in to comment.