Skip to content

Commit 5681f1a

Browse files
mvaligurskyMartin Valigursky
and
Martin Valigursky
authored
[Fix] Fix to occasional black pixels with bloom and sharpening (#7044)
Co-authored-by: Martin Valigursky <[email protected]>
1 parent 4061758 commit 5681f1a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/extras/render-passes/render-pass-compose.js

+3
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ const fragmentShader = /* glsl */ `
119119
float w = sharpening_amount * sharpness;
120120
vec3 res = (w * (a + b + d + e) + c) / (4.0 * w + 1.0);
121121
122+
// remove negative colors
123+
res = max(res, 0.0);
124+
122125
// convert back to HDR
123126
return toHDR(res);
124127
}

0 commit comments

Comments
 (0)