mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
gl renderer: Fix inset shadow offset calculation
This commit is contained in:
parent
47c4bf5be0
commit
8c9e203458
@ -18,10 +18,10 @@ void main() {
|
||||
RoundedRect inside = rounded_rect_shrink(outline, vec4(u_spread));
|
||||
|
||||
|
||||
|
||||
vec2 offset = vec2(u_offset.x, - u_offset.y);
|
||||
vec4 color = vec4(u_color.rgb * u_color.a, u_color.a);
|
||||
color = color * clamp (rounded_rect_coverage (outline, f.xy) -
|
||||
rounded_rect_coverage (inside, f.xy + u_offset),
|
||||
rounded_rect_coverage (inside, f.xy - offset),
|
||||
0.0, 1.0);
|
||||
setOutputColor(color);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user