gl renderer: Fix inset shadow offset calculation

This commit is contained in:
Timm Bäder 2017-12-01 08:32:00 +01:00
parent 47c4bf5be0
commit 8c9e203458

View File

@ -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);
}