Skip to content

Commit 7cc3635

Browse files
committed
Fix transparency bug
1 parent a3113bd commit 7cc3635

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/GateEngine/UI/View.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ extension View {
817817
&& (pos.x < radius && pos.y > viewSize.height - radius)
818818
&& (radius - pos.distance(from: Vec2(radius, viewSize.height - radius)) < 0)
819819

820-
fsh.output.color = Vec4(backgroundColor.rgb, fsh.uniforms["opacity"]).discard(if: (radius > 0) && (topLeft || topRight || bottomRight || bottomLeft))
820+
fsh.output.color = Vec4(backgroundColor.rgb, backgroundColor.a * fsh.uniforms["opacity"]).discard(if: (radius > 0) && (topLeft || topRight || bottomRight || bottomLeft))
821821

822822
return fsh
823823
}()

0 commit comments

Comments
 (0)