mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
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:
+18
-18
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user