gpu/shaders: clamp clip coverage to [0.0, 1.0]

Fixes the "bleaching" artifacts of the painting program by ~wrnrlr.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-01-21 12:33:46 +01:00
parent d0d6c6c38e
commit 74eb0a4a34
2 changed files with 19 additions and 19 deletions
+18 -18
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -17,6 +17,6 @@ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = {{.FetchColorExpr}};
float cover = abs(texture(cover, vCoverUV).r);
float cover = min(abs(texture(cover, vCoverUV).r), 1.0);
fragColor *= cover;
}